mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-27 04:47:56 +00:00
pull to refresh
This commit is contained in:
@@ -63,20 +63,25 @@ class ACsView extends StatelessWidget {
|
||||
opacity: 0.4,
|
||||
),
|
||||
),
|
||||
child: state is AcsLoadingState
|
||||
? const Center(
|
||||
child: DefaultContainer(
|
||||
width: 50, height: 50, child: CircularProgressIndicator()),
|
||||
)
|
||||
: Container(
|
||||
padding: const EdgeInsets.only(top: 40),
|
||||
alignment: AlignmentDirectional.center,
|
||||
child:
|
||||
deviceModel != null ? AcInterface(ac: deviceModel!) : const ACsList(),
|
||||
),
|
||||
child: state is AcsLoadingState
|
||||
? const Center(
|
||||
child: DefaultContainer(
|
||||
width: 50, height: 50, child: CircularProgressIndicator()),)
|
||||
: RefreshIndicator(
|
||||
onRefresh: () async {
|
||||
BlocProvider.of<ACsBloc>(context).add(AcsInitial(allAcs: deviceModel != null ? false : true));
|
||||
},
|
||||
child:ListView(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: 40),
|
||||
alignment: AlignmentDirectional.center,
|
||||
child: deviceModel != null ? AcInterface(ac: deviceModel!) : const ACsList(),
|
||||
),
|
||||
],
|
||||
),),
|
||||
),
|
||||
);
|
||||
));
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user