mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-16 14:29:35 +00:00
123
This commit is contained in:
parent
edd5a01482
commit
eef72c6aa6
13 changed files with 1341 additions and 1012 deletions
|
|
@ -6,12 +6,11 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:vaani/generated/l10n.dart';
|
||||
import 'package:vaani/features/settings/app_settings_provider.dart';
|
||||
import 'package:vaani/features/settings/view/buttons.dart';
|
||||
import 'package:vaani/features/settings/view/simple_settings_page.dart';
|
||||
import 'package:vaani/generated/l10n.dart';
|
||||
import 'package:vaani/globals.dart';
|
||||
import 'package:vaani/shared/extensions/duration_format.dart';
|
||||
|
||||
class DownloadSettingsPage extends HookConsumerWidget {
|
||||
const DownloadSettingsPage({
|
||||
|
|
@ -22,7 +21,7 @@ class DownloadSettingsPage extends HookConsumerWidget {
|
|||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final appSettings = ref.watch(appSettingsProvider);
|
||||
final downloadSettings = appSettings.downloadSettings;
|
||||
final primaryColor = Theme.of(context).colorScheme.primary;
|
||||
// final primaryColor = Theme.of(context).colorScheme.primary;
|
||||
|
||||
return SimpleSettingsPage(
|
||||
title: Text(S.of(context).playerSettings),
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class PlayerSettingsPage extends HookConsumerWidget {
|
|||
if (newSpeedOptions != null) {
|
||||
ref.read(appSettingsProvider.notifier).update(
|
||||
appSettings.copyWith.playerSettings(
|
||||
speedOptions: newSpeedOptions..sort(),
|
||||
speedOptions: [...newSpeedOptions]..sort(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:vaani/features/player/view/mini_player_bottom_padding.dart';
|
||||
|
||||
class SimpleSettingsPage extends HookConsumerWidget {
|
||||
const SimpleSettingsPage({
|
||||
|
|
@ -15,30 +14,43 @@ class SimpleSettingsPage extends HookConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
|
||||
return Scaffold(
|
||||
// appBar: AppBar(
|
||||
// title: title,
|
||||
// ),
|
||||
appBar: AppBar(
|
||||
title: title,
|
||||
),
|
||||
// body: body,
|
||||
// an app bar which is bigger than the default app bar but on scroll shrinks to the default app bar with the title being animated
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
SliverAppBar(
|
||||
expandedHeight: 200.0,
|
||||
floating: false,
|
||||
pinned: true,
|
||||
flexibleSpace: FlexibleSpaceBar(
|
||||
title: title,
|
||||
// background: Theme.of(context).primaryColor,
|
||||
),
|
||||
),
|
||||
// SliverAppBar(
|
||||
// expandedHeight: 100.0,
|
||||
// floating: false,
|
||||
// pinned: true,
|
||||
// flexibleSpace: FlexibleSpaceBar(
|
||||
// title: title,
|
||||
// // background: Theme.of(context).primaryColor,
|
||||
// ),
|
||||
// ),
|
||||
if (sections != null)
|
||||
SliverList(
|
||||
delegate: SliverChildListDelegate(
|
||||
[
|
||||
ClipRRect(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(20)),
|
||||
// borderRadius: const BorderRadius.all(Radius.circular(20)),
|
||||
child: SettingsList(
|
||||
lightTheme: SettingsThemeData(
|
||||
settingsListBackground: colorScheme.surface,
|
||||
settingsSectionBackground: colorScheme.surfaceContainer,
|
||||
// inactiveTitleColor:
|
||||
// trailingTextColor: colorScheme.primary,
|
||||
// settingsTileTextColor:
|
||||
),
|
||||
darkTheme: SettingsThemeData(
|
||||
settingsListBackground: colorScheme.surface,
|
||||
settingsSectionBackground: colorScheme.surfaceContainer,
|
||||
),
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
sections: sections!,
|
||||
|
|
@ -48,7 +60,7 @@ class SimpleSettingsPage extends HookConsumerWidget {
|
|||
),
|
||||
),
|
||||
// some padding at the bottom
|
||||
const SliverPadding(padding: EdgeInsets.only(bottom: 20)),
|
||||
// const SliverPadding(padding: EdgeInsets.only(bottom: 20)),
|
||||
// SliverToBoxAdapter(child: MiniPlayerBottomPadding()),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue