opt: func

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-07 13:07:15 +08:00
parent 6353ecc13e
commit 286193f08f
99 changed files with 204 additions and 270 deletions

View File

@@ -323,11 +323,11 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
min: 1,
max: 100,
value: _ratio.first,
onChanged: (value) async {
onChanged: (value) {
if (value >= 10 && value <= 90) {
_ratio[0] = value;
_ratio[1] = 100 - value;
await GStorage.setting.put(
GStorage.setting.put(
SettingBoxKey.dynamicDetailRatio,
_ratio,
);
@@ -355,9 +355,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
bottom: false,
child: context.orientation == Orientation.portrait
? refreshIndicator(
onRefresh: () async {
await _dynamicDetailController.onRefresh();
},
onRefresh: _dynamicDetailController.onRefresh,
child: _buildBody(context.orientation, theme),
)
: _buildBody(context.orientation, theme),
@@ -425,9 +423,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
key: _key,
backgroundColor: Colors.transparent,
body: refreshIndicator(
onRefresh: () async {
await _dynamicDetailController.onRefresh();
},
onRefresh: _dynamicDetailController.onRefresh,
child: CustomScrollView(
controller:
_dynamicDetailController.scrollController,