mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: refreshIndicator
Closes #139 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -5,7 +5,7 @@ Widget refreshIndicator({
|
|||||||
required Widget child,
|
required Widget child,
|
||||||
}) {
|
}) {
|
||||||
return RefreshIndicator(
|
return RefreshIndicator(
|
||||||
displacement: 20,
|
displacement: 10,
|
||||||
onRefresh: onRefresh,
|
onRefresh: onRefresh,
|
||||||
child: child,
|
child: child,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:PiliPlus/common/widgets/icon_button.dart';
|
import 'package:PiliPlus/common/widgets/icon_button.dart';
|
||||||
|
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||||
import 'package:PiliPlus/common/widgets/stat/danmu.dart';
|
import 'package:PiliPlus/common/widgets/stat/danmu.dart';
|
||||||
import 'package:PiliPlus/common/widgets/stat/view.dart';
|
import 'package:PiliPlus/common/widgets/stat/view.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -98,7 +99,7 @@ class _MediaListPanelState extends State<MediaListPanel> {
|
|||||||
child: Material(
|
child: Material(
|
||||||
color: Theme.of(context).colorScheme.surface,
|
color: Theme.of(context).colorScheme.surface,
|
||||||
child: widget.loadPrevious != null
|
child: widget.loadPrevious != null
|
||||||
? RefreshIndicator(
|
? refreshIndicator(
|
||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
await widget.loadPrevious!();
|
await widget.loadPrevious!();
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user