mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-14 23:19:30 +00:00
feat: extensive settings for media controls through notification (#28)
* feat: add notification settings customisation options * feat: add notification settings page and update routing
This commit is contained in:
parent
721b0a87fc
commit
3cf0a0b124
21 changed files with 1391 additions and 376 deletions
53
lib/settings/view/simple_settings_page.dart
Normal file
53
lib/settings/view/simple_settings_page.dart
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_settings_ui/flutter_settings_ui.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
|
||||
class SimpleSettingsPage extends HookConsumerWidget {
|
||||
const SimpleSettingsPage({
|
||||
super.key,
|
||||
this.title,
|
||||
this.sections,
|
||||
});
|
||||
|
||||
final Widget? title;
|
||||
final List<AbstractSettingsSection>? sections;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Scaffold(
|
||||
// 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,
|
||||
),
|
||||
),
|
||||
if (sections != null)
|
||||
SliverList(
|
||||
delegate: SliverChildListDelegate(
|
||||
[
|
||||
ClipRRect(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(20)),
|
||||
child: SettingsList(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
sections: sections!,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue