mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-13 17:30:31 -07:00
chore:cleanup-packages breaking: remove isar (#474)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
ab6182f69d
commit
6357b9843c
81 changed files with 31400 additions and 25673 deletions
|
|
@ -173,14 +173,16 @@ class _LibraryFilterChipsState extends ConsumerState<LibraryFilterChips> {
|
|||
children: [
|
||||
Text(context.localized.groupBy),
|
||||
...GroupBy.values.map(
|
||||
(group) => RadioListTile.adaptive(
|
||||
value: group,
|
||||
(group) => RadioGroup(
|
||||
groupValue: groupBy,
|
||||
title: Text(group.value(context)),
|
||||
onChanged: (_) {
|
||||
provider.setGroupBy(group);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: RadioListTile.adaptive(
|
||||
value: group,
|
||||
title: Text(group.value(context)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:fladder/models/library_search/library_search_options.dart';
|
||||
import 'package:fladder/providers/library_search_provider.dart';
|
||||
import 'package:fladder/util/localization_helper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDialogue(
|
||||
BuildContext context, {
|
||||
|
|
@ -27,9 +28,7 @@ Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDia
|
|||
child: Text(context.localized.sortBy, style: Theme.of(context).textTheme.titleLarge),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
...SortingOptions.values.map((e) => RadioListTile.adaptive(
|
||||
value: e,
|
||||
title: Text(e.label(context)),
|
||||
...SortingOptions.values.map((e) => RadioGroup(
|
||||
groupValue: newSortingOptions,
|
||||
onChanged: (value) {
|
||||
state(
|
||||
|
|
@ -38,6 +37,10 @@ Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDia
|
|||
},
|
||||
);
|
||||
},
|
||||
child: RadioListTile.adaptive(
|
||||
value: e,
|
||||
title: Text(e.label(context)),
|
||||
),
|
||||
)),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 8),
|
||||
|
|
@ -49,9 +52,7 @@ Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDia
|
|||
),
|
||||
const SizedBox(height: 8),
|
||||
...SortingOrder.values.map(
|
||||
(e) => RadioListTile.adaptive(
|
||||
value: e,
|
||||
title: Text(e.label(context)),
|
||||
(e) => RadioGroup(
|
||||
groupValue: newSortOrder,
|
||||
onChanged: (value) {
|
||||
state(
|
||||
|
|
@ -60,6 +61,10 @@ Future<(SortingOptions? sortOptions, SortingOrder? sortingOrder)?> openSortByDia
|
|||
},
|
||||
);
|
||||
},
|
||||
child: RadioListTile.adaptive(
|
||||
value: e,
|
||||
title: Text(e.label(context)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class _LockScreenState extends ConsumerState<LockScreen> with WidgetsBindingObse
|
|||
void handleLogin(AccountModel user) {
|
||||
ref.read(lockScreenActiveProvider.notifier).update((state) => false);
|
||||
poppingLockScreen = true;
|
||||
context.router.popForced();
|
||||
context.router.pop();
|
||||
}
|
||||
|
||||
void tapLoggedInAccount(AccountModel user) async {
|
||||
|
|
|
|||
|
|
@ -24,13 +24,15 @@ List<Widget> buildClientSettingsTheme(BuildContext context, WidgetRef ref) {
|
|||
items: ThemeMode.values,
|
||||
selected: [ref.read(clientSettingsProvider.select((value) => value.themeMode))],
|
||||
onChanged: (values) => ref.read(clientSettingsProvider.notifier).setThemeMode(values.first),
|
||||
itemBuilder: (type, selected, tap) => RadioListTile(
|
||||
value: type,
|
||||
title: Text(type.label(context)),
|
||||
contentPadding: EdgeInsets.zero,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
itemBuilder: (type, selected, tap) => RadioGroup(
|
||||
groupValue: ref.read(clientSettingsProvider.select((value) => value.themeMode)),
|
||||
onChanged: (value) => tap(),
|
||||
child: RadioListTile(
|
||||
value: type,
|
||||
title: Text(type.label(context)),
|
||||
contentPadding: EdgeInsets.zero,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
@ -43,37 +45,39 @@ List<Widget> buildClientSettingsTheme(BuildContext context, WidgetRef ref) {
|
|||
items: [null, ...ColorThemes.values],
|
||||
selected: [(ref.read(clientSettingsProvider.select((value) => value.themeColor)))],
|
||||
onChanged: (values) => ref.read(clientSettingsProvider.notifier).setThemeColor(values.first),
|
||||
itemBuilder: (type, selected, tap) => RadioListTile<ColorThemes?>(
|
||||
groupValue: ref.read(clientSettingsProvider.select((value) => value.themeColor)),
|
||||
contentPadding: EdgeInsets.zero,
|
||||
value: type,
|
||||
itemBuilder: (type, selected, tap) => RadioGroup(
|
||||
onChanged: (value) => tap(),
|
||||
title: Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 24,
|
||||
width: 24,
|
||||
decoration: BoxDecoration(
|
||||
gradient: type == null
|
||||
? const SweepGradient(
|
||||
center: FractionalOffset.center,
|
||||
colors: <Color>[
|
||||
Color(0xFF4285F4), // blue
|
||||
Color(0xFF34A853), // green
|
||||
Color(0xFFFBBC05), // yellow
|
||||
Color(0xFFEA4335), // red
|
||||
Color(0xFF4285F4), // blue again to seamlessly transition to the start
|
||||
],
|
||||
stops: <double>[0.0, 0.25, 0.5, 0.75, 1.0],
|
||||
)
|
||||
: null,
|
||||
color: type?.color,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
groupValue: ref.read(clientSettingsProvider.select((value) => value.themeColor)),
|
||||
child: RadioListTile<ColorThemes?>(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
value: type,
|
||||
title: Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 24,
|
||||
width: 24,
|
||||
decoration: BoxDecoration(
|
||||
gradient: type == null
|
||||
? const SweepGradient(
|
||||
center: FractionalOffset.center,
|
||||
colors: <Color>[
|
||||
Color(0xFF4285F4), // blue
|
||||
Color(0xFF34A853), // green
|
||||
Color(0xFFFBBC05), // yellow
|
||||
Color(0xFFEA4335), // red
|
||||
Color(0xFF4285F4), // blue again to seamlessly transition to the start
|
||||
],
|
||||
stops: <double>[0.0, 0.25, 0.5, 0.75, 1.0],
|
||||
)
|
||||
: null,
|
||||
color: type?.color,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(type?.name ?? context.localized.dynamicText),
|
||||
],
|
||||
const SizedBox(width: 8),
|
||||
Text(type?.name ?? context.localized.dynamicText),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
@ -88,12 +92,14 @@ List<Widget> buildClientSettingsTheme(BuildContext context, WidgetRef ref) {
|
|||
items: DynamicSchemeVariant.values,
|
||||
selected: [(ref.read(clientSettingsProvider.select((value) => value.schemeVariant)))],
|
||||
onChanged: (values) => ref.read(clientSettingsProvider.notifier).setSchemeVariant(values.first),
|
||||
itemBuilder: (type, selected, tap) => RadioListTile<DynamicSchemeVariant>(
|
||||
groupValue: selected ? type : null,
|
||||
contentPadding: EdgeInsets.zero,
|
||||
value: type,
|
||||
itemBuilder: (type, selected, tap) => RadioGroup(
|
||||
onChanged: (value) => tap(),
|
||||
title: Text(type.label(context)),
|
||||
groupValue: selected ? type : null,
|
||||
child: RadioListTile<DynamicSchemeVariant>(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
value: type,
|
||||
title: Text(type.label(context)),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ class SettingsScaffold extends ConsumerWidget {
|
|||
if (AdaptiveLayout.layoutModeOf(context) == LayoutMode.single && context.tabsRouter.activeIndex != 0) {
|
||||
context.tabsRouter.setActiveIndex(0);
|
||||
} else {
|
||||
context.router.popForced();
|
||||
context.router.pop();
|
||||
}
|
||||
} else {
|
||||
context.router.popBack();
|
||||
|
|
|
|||
|
|
@ -70,10 +70,6 @@ class _SyncedScreenState extends ConsumerState<SyncedScreen> {
|
|||
onPressed: () => ref.read(syncProvider.notifier).removeAllSyncedData(),
|
||||
child: const Text("Clear drift database"),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () => ref.read(syncProvider.notifier).migrateFromIsar(),
|
||||
child: const Text("Migrate Isar to Drift"),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -42,23 +42,24 @@ class _QualityOptionsDialogue extends ConsumerWidget {
|
|||
shrinkWrap: true,
|
||||
children: qualityOptions?.entries
|
||||
.map(
|
||||
(entry) => RadioListTile(
|
||||
value: entry.value,
|
||||
groupValue: true,
|
||||
onChanged: (value) async {
|
||||
final newModel = await playbackModel?.setQualityOption(
|
||||
qualityOptions.map(
|
||||
(key, value) => MapEntry(key, key == entry.key ? true : false),
|
||||
),
|
||||
);
|
||||
ref.read(playBackModel.notifier).update((state) => newModel);
|
||||
if (newModel != null) {
|
||||
await ref.read(playbackModelHelper).shouldReload(newModel);
|
||||
}
|
||||
context.router.maybePop();
|
||||
},
|
||||
title: Text(entry.key.label(context)),
|
||||
),
|
||||
(entry) => RadioGroup(
|
||||
groupValue: true,
|
||||
onChanged: (value) async {
|
||||
final newModel = await playbackModel?.setQualityOption(
|
||||
qualityOptions.map(
|
||||
(key, value) => MapEntry(key, key == entry.key ? true : false),
|
||||
),
|
||||
);
|
||||
ref.read(playBackModel.notifier).update((state) => newModel);
|
||||
if (newModel != null) {
|
||||
await ref.read(playbackModelHelper).shouldReload(newModel);
|
||||
}
|
||||
context.router.maybePop();
|
||||
},
|
||||
child: RadioListTile(
|
||||
value: entry.value,
|
||||
title: Text(entry.key.label(context)),
|
||||
)),
|
||||
)
|
||||
.toList() ??
|
||||
[],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue