mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00
chore: SafeArea
This commit is contained in:
parent
0a604a9ad5
commit
92dde7286f
11
.vscode/launch.json
vendored
11
.vscode/launch.json
vendored
@ -17,6 +17,17 @@
|
||||
"dev"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "spotube (mobile-skia)",
|
||||
"type": "dart",
|
||||
"request": "launch",
|
||||
"program": "lib/main.dart",
|
||||
"args": [
|
||||
"--flavor",
|
||||
"dev",
|
||||
"--no-enable-impeller"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "spotube (profile)",
|
||||
"type": "dart",
|
||||
|
@ -25,7 +25,9 @@ class SettingsMetadataProviderFormPage extends HookConsumerWidget {
|
||||
Widget build(BuildContext context, ref) {
|
||||
final formKey = useMemoized(() => GlobalKey<FormBuilderState>(), []);
|
||||
|
||||
return Scaffold(
|
||||
return SafeArea(
|
||||
bottom: false,
|
||||
child: Scaffold(
|
||||
headers: [
|
||||
TitleBar(
|
||||
title: Text(title),
|
||||
@ -66,7 +68,8 @@ class SettingsMetadataProviderFormPage extends HookConsumerWidget {
|
||||
);
|
||||
}
|
||||
|
||||
final field = fields[index] as MetadataFormFieldInputObject;
|
||||
final field =
|
||||
fields[index] as MetadataFormFieldInputObject;
|
||||
return FormBuilderField(
|
||||
name: field.id,
|
||||
initialValue: field.defaultValue,
|
||||
@ -103,7 +106,8 @@ class SettingsMetadataProviderFormPage extends HookConsumerWidget {
|
||||
? TextInputType.number
|
||||
: TextInputType.text,
|
||||
features: [
|
||||
if (field.variant == FormFieldVariant.password)
|
||||
if (field.variant ==
|
||||
FormFieldVariant.password)
|
||||
const InputFeature.passwordToggle(),
|
||||
],
|
||||
),
|
||||
@ -145,6 +149,7 @@ class SettingsMetadataProviderFormPage extends HookConsumerWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,9 @@ class SettingsMetadataProviderPage extends HookConsumerWidget {
|
||||
[plugins.asData?.value.plugins, pluginReposSnapshot.asData?.value],
|
||||
);
|
||||
|
||||
return Scaffold(
|
||||
return SafeArea(
|
||||
bottom: false,
|
||||
child: Scaffold(
|
||||
headers: const [
|
||||
TitleBar(
|
||||
title: Text("Metadata provider plugin"),
|
||||
@ -87,9 +89,10 @@ class SettingsMetadataProviderPage extends HookConsumerWidget {
|
||||
child: IconButton.secondary(
|
||||
icon: const Icon(SpotubeIcons.download),
|
||||
onPressed: () async {
|
||||
if (formKey.currentState?.saveAndValidate() ?? false) {
|
||||
final url = formKey.currentState?.fields["plugin_url"]
|
||||
?.value as String;
|
||||
if (formKey.currentState?.saveAndValidate() ??
|
||||
false) {
|
||||
final url = formKey.currentState
|
||||
?.fields["plugin_url"]?.value as String;
|
||||
|
||||
if (url.isNotEmpty) {
|
||||
final pluginConfig = await pluginsNotifier
|
||||
@ -148,7 +151,8 @@ class SettingsMetadataProviderPage extends HookConsumerWidget {
|
||||
separatorBuilder: (context, index) => const Gap(12),
|
||||
itemBuilder: (context, index) {
|
||||
final plugin = plugins.asData!.value.plugins[index];
|
||||
final isDefault = plugins.asData!.value.defaultPlugin == index;
|
||||
final isDefault =
|
||||
plugins.asData!.value.defaultPlugin == index;
|
||||
return MetadataInstalledPluginItem(
|
||||
plugin: plugin,
|
||||
isDefault: isDefault,
|
||||
@ -237,6 +241,7 @@ class SettingsMetadataProviderPage extends HookConsumerWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:spotube/models/metadata/metadata.dart';
|
||||
import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart';
|
||||
import 'package:spotube/provider/metadata_plugin/core/auth.dart';
|
||||
import 'package:spotube/provider/metadata_plugin/utils/paginated.dart';
|
||||
|
||||
class MetadataPluginAlbumReleasesNotifier
|
||||
@ -17,7 +17,7 @@ class MetadataPluginAlbumReleasesNotifier
|
||||
|
||||
@override
|
||||
build() async {
|
||||
ref.watch(metadataPluginProvider);
|
||||
ref.watch(metadataPluginAuthenticatedProvider);
|
||||
return await fetch(0, 20);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:spotube/models/metadata/metadata.dart';
|
||||
import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart';
|
||||
import 'package:spotube/provider/metadata_plugin/core/auth.dart';
|
||||
import 'package:spotube/provider/metadata_plugin/utils/family_paginated.dart';
|
||||
|
||||
class MetadataPluginBrowseSectionItemsNotifier
|
||||
@ -19,7 +19,7 @@ class MetadataPluginBrowseSectionItemsNotifier
|
||||
|
||||
@override
|
||||
build(arg) async {
|
||||
ref.watch(metadataPluginProvider);
|
||||
ref.watch(metadataPluginAuthenticatedProvider);
|
||||
return await fetch(0, 20);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:spotube/models/metadata/metadata.dart';
|
||||
import 'package:spotube/provider/metadata_plugin/metadata_plugin_provider.dart';
|
||||
import 'package:spotube/provider/metadata_plugin/core/auth.dart';
|
||||
import 'package:spotube/provider/metadata_plugin/utils/paginated.dart';
|
||||
|
||||
class MetadataPluginBrowseSectionsNotifier
|
||||
@ -19,7 +19,7 @@ class MetadataPluginBrowseSectionsNotifier
|
||||
|
||||
@override
|
||||
build() async {
|
||||
ref.watch(metadataPluginProvider);
|
||||
ref.watch(metadataPluginAuthenticatedProvider);
|
||||
return await fetch(0, 20);
|
||||
}
|
||||
}
|
||||
|
@ -69,9 +69,8 @@ abstract class ServiceUtils {
|
||||
}
|
||||
|
||||
return "$title ${artists.map((e) => e.replaceAll(",", " ")).join(", ")}"
|
||||
.toLowerCase()
|
||||
.replaceAll(RegExp(r"\s*\[[^\]]*]"), ' ')
|
||||
.replaceAll(RegExp(r"\sfeat\.|\sft\."), ' ')
|
||||
.replaceAll(RegExp(r"\sfeat\.|\sft\.", caseSensitive: false), ' ')
|
||||
.replaceAll(RegExp(r"\s+"), ' ')
|
||||
.trim();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user