From 71bfd382c6a8418f38694645cfd11fd3d49444d8 Mon Sep 17 00:00:00 2001 From: hanami <1021210354@qq.com> Date: Mon, 9 Sep 2024 18:12:10 +0800 Subject: [PATCH] fix: setting modal vertical padding --- lib/components/ModalBottomSheetWrap.dart | 14 +++++++++----- lib/components/SettingModalView.dart | 9 ++------- .../ThemeColorSelectorPanelModalView.dart | 5 ++--- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/lib/components/ModalBottomSheetWrap.dart b/lib/components/ModalBottomSheetWrap.dart index d138af4..d098f84 100644 --- a/lib/components/ModalBottomSheetWrap.dart +++ b/lib/components/ModalBottomSheetWrap.dart @@ -20,11 +20,15 @@ class ModalBottomSheetWrap extends StatelessWidget { borderRadius: const BorderRadius.all(Radius.circular(24)), child: ColoredBox( color: Theme.of(context).colorScheme.onPrimary, - child: SingleChildScrollView( - child: Column( - children: [ - child, - ], + + child: Container( + padding: EdgeInsets.symmetric(vertical: 20), + child: SingleChildScrollView( + child: Column( + children: [ + child, + ], + ), ), ), ), diff --git a/lib/components/SettingModalView.dart b/lib/components/SettingModalView.dart index 01bd165..8cd049d 100644 --- a/lib/components/SettingModalView.dart +++ b/lib/components/SettingModalView.dart @@ -52,17 +52,12 @@ class _SettingModalViewState extends State { Widget build(BuildContext context) { return ModalBottomSheetWrap( child: Container( - // height: 400, - padding: const EdgeInsets.only(top: 20), child: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox( - height: 28, - ), const Padding( - padding: EdgeInsets.symmetric(horizontal: 12), + padding: EdgeInsets.symmetric(horizontal: 12, vertical: 20), child: Text( 'Setting', style: TextStyle(fontSize: 24), @@ -168,7 +163,7 @@ class _SettingModalViewState extends State { ), ), const Padding( - padding: EdgeInsets.symmetric(vertical: 12, horizontal: 12), + padding: EdgeInsets.symmetric(vertical: 20, horizontal: 12), child: Text( 'About', style: TextStyle(fontSize: 24), diff --git a/lib/components/ThemeColorSelectorPanelModalView.dart b/lib/components/ThemeColorSelectorPanelModalView.dart index 253bfca..9b37bd9 100644 --- a/lib/components/ThemeColorSelectorPanelModalView.dart +++ b/lib/components/ThemeColorSelectorPanelModalView.dart @@ -11,14 +11,13 @@ class ThemeColorSelectorPanelModalView extends StatefulWidget { } class _ThemeColorSelectorPanelModalViewState extends State { - var _index = 0; - var appStore = Get.put(AppStore()); + AppStore appStore = Get.put(AppStore()); @override Widget build(BuildContext context) { return ModalBottomSheetWrap( child: Container( - padding: EdgeInsets.all(20), + padding: const EdgeInsets.symmetric(horizontal: 20), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [