mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 19:08:55 +03:30
Improve navigation back
This commit is contained in:
@@ -77,7 +77,12 @@ class _CycleResultScreenState extends State<CycleResultScreen> {
|
||||
),
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Home', style: TextStyle(color: Colors.white,),),
|
||||
title: Text(
|
||||
'Home',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
@@ -85,7 +90,7 @@ class _CycleResultScreenState extends State<CycleResultScreen> {
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
onPressed: () => Navigator.of(context).pushNamed(Routes.homePage),
|
||||
),
|
||||
),
|
||||
body: Consumer<ConnectivityProvider>(
|
||||
@@ -198,37 +203,40 @@ class _CycleResultScreenState extends State<CycleResultScreen> {
|
||||
color: Colors.black,
|
||||
),
|
||||
)
|
||||
:
|
||||
cycleResults.items?.length != 0 ?
|
||||
ListView.builder(
|
||||
controller: sc,
|
||||
itemBuilder: (context, index) {
|
||||
String labels = '';
|
||||
for (var label in cycleResults
|
||||
.items![index].label) {
|
||||
labels += label;
|
||||
labels += ' , ';
|
||||
}
|
||||
if (labels.length >= 3) {
|
||||
labels = labels.substring(
|
||||
0,
|
||||
labels.length -
|
||||
3); // remove extra ,
|
||||
}
|
||||
return CycleItemBox(
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
item: cycleResults.items?[index],
|
||||
labels: labels,
|
||||
: cycleResults.items?.length != 0
|
||||
? ListView.builder(
|
||||
controller: sc,
|
||||
itemBuilder: (context, index) {
|
||||
String labels = '';
|
||||
for (var label in cycleResults
|
||||
.items![index].label) {
|
||||
labels += label;
|
||||
labels += ' , ';
|
||||
}
|
||||
if (labels.length >= 3) {
|
||||
labels = labels.substring(
|
||||
0,
|
||||
labels.length -
|
||||
3); // remove extra ,
|
||||
}
|
||||
return CycleItemBox(
|
||||
deviceBlockSize:
|
||||
_deviceBlockSize,
|
||||
item:
|
||||
cycleResults.items?[index],
|
||||
labels: labels,
|
||||
);
|
||||
},
|
||||
itemCount:
|
||||
cycleResults.items?.length,
|
||||
shrinkWrap: true,
|
||||
)
|
||||
: Container(
|
||||
child: Center(
|
||||
child: Text(
|
||||
"There is no item to show."),
|
||||
),
|
||||
);
|
||||
},
|
||||
itemCount: cycleResults.items?.length,
|
||||
shrinkWrap: true,
|
||||
) :
|
||||
Container(
|
||||
child: Center(
|
||||
child: Text("There is no item to show."),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user