add setting

This commit is contained in:
jyuesong
2022-01-17 17:13:53 +08:00
parent 352d4e162c
commit afd2b30616
4 changed files with 151 additions and 57 deletions

View File

@@ -21,10 +21,13 @@ class _OtherPageState extends ConsumerState<OtherPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: const EdgeInsets.symmetric(horizontal: 15,vertical: 15,),
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
margin: const EdgeInsets.symmetric(
horizontal: 15,
vertical: 15,
),
decoration: BoxDecoration(
color: ref.watch(themeProvider).themeColor.settingBgColor(),
borderRadius: const BorderRadius.all(
Radius.circular(15),
),
),
@@ -34,7 +37,7 @@ class _OtherPageState extends ConsumerState<OtherPage> {
children: [
Padding(
padding: const EdgeInsets.symmetric(
vertical: 10,
vertical: 8,
horizontal: 15,
),
child: Row(
@@ -59,7 +62,7 @@ class _OtherPageState extends ConsumerState<OtherPage> {
),
Padding(
padding: const EdgeInsets.symmetric(
vertical: 10,
vertical: 8,
horizontal: 15,
),
child: Row(
@@ -84,7 +87,102 @@ class _OtherPageState extends ConsumerState<OtherPage> {
),
Padding(
padding: const EdgeInsets.symmetric(
vertical: 10,
vertical: 8,
horizontal: 15,
),
child: Row(
children: [
Text(
"查看日志",
style: TextStyle(
color: ref.watch(themeProvider).themeColor.taskTitleColor(),
fontSize: 16,
),
),
const Spacer(),
const Icon(
CupertinoIcons.right_chevron,
size: 16,
),
],
),
),
],
),
),
Container(
margin: const EdgeInsets.symmetric(
horizontal: 15,
vertical: 15,
),
decoration: BoxDecoration(
color: ref.watch(themeProvider).themeColor.settingBgColor(),
borderRadius: const BorderRadius.all(
Radius.circular(15),
),
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(
top: 5,
bottom: 0,
left: 15,
right: 15,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"夜间模式",
style: TextStyle(
color: ref.watch(themeProvider).themeColor.taskTitleColor(),
fontSize: 16,
),
),
const Spacer(),
CupertinoSwitch(
value: ref.watch(themeProvider).isInDartMode(),
onChanged: (open) {
ref.watch(themeProvider).changeThemeReal(open);
}),
],
),
),
const Divider(
indent: 15,
),
Padding(
padding: const EdgeInsets.symmetric(
vertical: 8,
horizontal: 15,
),
child: Row(
children: [
Text(
"查看日志",
style: TextStyle(
color: ref.watch(themeProvider).themeColor.taskTitleColor(),
fontSize: 16,
),
),
const Spacer(),
const Icon(
CupertinoIcons.right_chevron,
size: 16,
),
],
),
),
Divider(
indent: 15,
),
Padding(
padding: const EdgeInsets.symmetric(
vertical: 8,
horizontal: 15,
),
child: Row(