mirror of
https://github.com/darkmoonight/Rain.git
synced 2025-06-28 20:19:58 +00:00
Fix refresh
This commit is contained in:
parent
aa125fcdc1
commit
6d0d0efe36
1 changed files with 62 additions and 62 deletions
|
@ -32,12 +32,7 @@ class _ListWeatherCardState extends State<ListWeatherCard> {
|
|||
Widget build(BuildContext context) {
|
||||
final textTheme = context.textTheme;
|
||||
final titleMedium = textTheme.titleMedium;
|
||||
return RefreshIndicator(
|
||||
onRefresh: () async {
|
||||
await weatherController.updateCacheCard(true);
|
||||
setState(() {});
|
||||
},
|
||||
child: Obx(
|
||||
return Obx(
|
||||
() => weatherController.weatherCards.isEmpty
|
||||
? Center(
|
||||
child: SingleChildScrollView(
|
||||
|
@ -95,7 +90,12 @@ class _ListWeatherCardState extends State<ListWeatherCard> {
|
|||
),
|
||||
];
|
||||
},
|
||||
body: WeatherCardList(searchCity: filter),
|
||||
body: RefreshIndicator(
|
||||
onRefresh: () async {
|
||||
await weatherController.updateCacheCard(true);
|
||||
setState(() {});
|
||||
},
|
||||
child: WeatherCardList(searchCity: filter),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue