mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 16:19:03 +03:30
Back button of pages navigate to home
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '../../config/routes.dart';
|
||||||
import '../../models/cycles_models.dart';
|
import '../../models/cycles_models.dart';
|
||||||
import '../../providers/connectivity.dart';
|
import '../../providers/connectivity.dart';
|
||||||
import '../../providers/cycles.dart';
|
import '../../providers/cycles.dart';
|
||||||
@@ -21,6 +22,7 @@ class _CycleDetailScreenState extends State<CycleDetailScreen> {
|
|||||||
bool isInit = true;
|
bool isInit = true;
|
||||||
bool isEmpty = false;
|
bool isEmpty = false;
|
||||||
CycleDetailObject? datas;
|
CycleDetailObject? datas;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeDependencies() async {
|
void didChangeDependencies() async {
|
||||||
if (isInit) {
|
if (isInit) {
|
||||||
@@ -50,11 +52,22 @@ class _CycleDetailScreenState extends State<CycleDetailScreen> {
|
|||||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Cycles', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Cycles',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@@ -84,6 +97,7 @@ class _CycleDetailScreenState extends State<CycleDetailScreen> {
|
|||||||
: ConnectionErrorBox();
|
: ConnectionErrorBox();
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:cssd/widgets/ItemScreens/Details/item_detail_box.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '../../config/routes.dart';
|
||||||
import '../../providers/connectivity.dart';
|
import '../../providers/connectivity.dart';
|
||||||
import '../../widgets/Global/internet_error.dart';
|
import '../../widgets/Global/internet_error.dart';
|
||||||
|
|
||||||
@@ -22,6 +23,7 @@ class _ItemDetailScreenState extends State<ItemDetailScreen> {
|
|||||||
bool isInit = true;
|
bool isInit = true;
|
||||||
bool isEmpty = false;
|
bool isEmpty = false;
|
||||||
ItemDetailObject? datas;
|
ItemDetailObject? datas;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeDependencies() async {
|
void didChangeDependencies() async {
|
||||||
if (isInit) {
|
if (isInit) {
|
||||||
@@ -50,11 +52,22 @@ class _ItemDetailScreenState extends State<ItemDetailScreen> {
|
|||||||
final _media = MediaQuery.of(context);
|
final _media = MediaQuery.of(context);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Items', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Items',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@@ -86,6 +99,7 @@ class _ItemDetailScreenState extends State<ItemDetailScreen> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import '../../config/routes.dart';
|
||||||
import '../../models/label_models.dart';
|
import '../../models/label_models.dart';
|
||||||
import '../../providers/connectivity.dart';
|
import '../../providers/connectivity.dart';
|
||||||
import '../../providers/labels.dart';
|
import '../../providers/labels.dart';
|
||||||
@@ -20,6 +21,7 @@ class _LabelDetailScreenState extends State<LabelDetailScreen> {
|
|||||||
bool isEmpty = false;
|
bool isEmpty = false;
|
||||||
bool isInit = true;
|
bool isInit = true;
|
||||||
LabelDetailsObject? datas;
|
LabelDetailsObject? datas;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeDependencies() async {
|
void didChangeDependencies() async {
|
||||||
if (isInit) {
|
if (isInit) {
|
||||||
@@ -50,11 +52,22 @@ class _LabelDetailScreenState extends State<LabelDetailScreen> {
|
|||||||
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
// final double _pixelRatio = (_media.size.height / _media.size.width * 7 / 5);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Labels', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Labels',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@@ -84,6 +97,7 @@ class _LabelDetailScreenState extends State<LabelDetailScreen> {
|
|||||||
: ConnectionErrorBox();
|
: ConnectionErrorBox();
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ class _MyItemsDetailScreenState extends State<MyItemsDetailScreen> {
|
|||||||
bool isInit = true;
|
bool isInit = true;
|
||||||
bool isEmpty = false;
|
bool isEmpty = false;
|
||||||
ItemDetailObject? datas;
|
ItemDetailObject? datas;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeDependencies() async {
|
void didChangeDependencies() async {
|
||||||
if (isInit) {
|
if (isInit) {
|
||||||
@@ -51,11 +52,22 @@ class _MyItemsDetailScreenState extends State<MyItemsDetailScreen> {
|
|||||||
final _media = MediaQuery.of(context);
|
final _media = MediaQuery.of(context);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('My Items', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'My Items',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@@ -92,6 +104,7 @@ class _MyItemsDetailScreenState extends State<MyItemsDetailScreen> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:fluttertoast/fluttertoast.dart';
|
import 'package:fluttertoast/fluttertoast.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
|
||||||
class ItemsTransferScreen extends StatefulWidget {
|
class ItemsTransferScreen extends StatefulWidget {
|
||||||
final bool? isAdmin;
|
final bool? isAdmin;
|
||||||
final ItemDetailObject? items;
|
final ItemDetailObject? items;
|
||||||
@@ -80,7 +79,13 @@ class _ItemsTransferScreenState extends State<ItemsTransferScreen> {
|
|||||||
final _media = MediaQuery.of(context);
|
final _media = MediaQuery.of(context);
|
||||||
final double _deviceWidth = _media.size.width;
|
final double _deviceWidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _deviceWidth / 100;
|
final double _deviceBlockSize = _deviceWidth / 100;
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
FocusManager.instance.primaryFocus?.unfocus();
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
@@ -133,7 +138,8 @@ class _ItemsTransferScreenState extends State<ItemsTransferScreen> {
|
|||||||
deviceBlockSize: _deviceBlockSize,
|
deviceBlockSize: _deviceBlockSize,
|
||||||
textInputType: TextInputType.visiblePassword,
|
textInputType: TextInputType.visiblePassword,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
Provider.of<UsersProvider>(context, listen: false)
|
Provider.of<UsersProvider>(context,
|
||||||
|
listen: false)
|
||||||
.searchUsers(value);
|
.searchUsers(value);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -223,7 +229,8 @@ class _ItemsTransferScreenState extends State<ItemsTransferScreen> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.0,
|
height: 10.0,
|
||||||
),
|
),
|
||||||
ItemCard(_deviceBlockSize, itemData!),
|
ItemCard(
|
||||||
|
_deviceBlockSize, itemData!),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 5.0,
|
height: 5.0,
|
||||||
),
|
),
|
||||||
@@ -237,8 +244,8 @@ class _ItemsTransferScreenState extends State<ItemsTransferScreen> {
|
|||||||
TransferDataBox(
|
TransferDataBox(
|
||||||
deviceBlockSize:
|
deviceBlockSize:
|
||||||
_deviceBlockSize,
|
_deviceBlockSize,
|
||||||
user:
|
user: Provider.of<
|
||||||
Provider.of<UsersProvider>(
|
UsersProvider>(
|
||||||
context)
|
context)
|
||||||
.selectedUserForItems,
|
.selectedUserForItems,
|
||||||
)
|
)
|
||||||
@@ -285,7 +292,8 @@ class _ItemsTransferScreenState extends State<ItemsTransferScreen> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
text: 'Transfer',
|
text: 'Transfer',
|
||||||
isLoadingButton: myItemProvider
|
isLoadingButton:
|
||||||
|
myItemProvider
|
||||||
.isloadingButton,
|
.isloadingButton,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -317,6 +325,7 @@ class _ItemsTransferScreenState extends State<ItemsTransferScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ class _MyPackagesDetailScreenState extends State<MyPackagesDetailScreen> {
|
|||||||
bool isInit = true;
|
bool isInit = true;
|
||||||
bool isEmpty = false;
|
bool isEmpty = false;
|
||||||
PackageDetailObject? datas;
|
PackageDetailObject? datas;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeDependencies() async {
|
void didChangeDependencies() async {
|
||||||
if (isInit) {
|
if (isInit) {
|
||||||
@@ -51,11 +52,22 @@ class _MyPackagesDetailScreenState extends State<MyPackagesDetailScreen> {
|
|||||||
final _media = MediaQuery.of(context);
|
final _media = MediaQuery.of(context);
|
||||||
final double _deviceWidth = _media.size.width;
|
final double _deviceWidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _deviceWidth / 100;
|
final double _deviceBlockSize = _deviceWidth / 100;
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('My Packages', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'My Packages',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@@ -92,6 +104,7 @@ class _MyPackagesDetailScreenState extends State<MyPackagesDetailScreen> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import 'package:provider/provider.dart';
|
|||||||
class PackageTransferScreen extends StatefulWidget {
|
class PackageTransferScreen extends StatefulWidget {
|
||||||
final bool? isAdmin;
|
final bool? isAdmin;
|
||||||
final PackageDetailObject? packages;
|
final PackageDetailObject? packages;
|
||||||
|
|
||||||
const PackageTransferScreen({
|
const PackageTransferScreen({
|
||||||
super.key,
|
super.key,
|
||||||
this.isAdmin,
|
this.isAdmin,
|
||||||
@@ -73,7 +74,13 @@ class _PackageTransferScreenState extends State<PackageTransferScreen> {
|
|||||||
final _media = MediaQuery.of(context);
|
final _media = MediaQuery.of(context);
|
||||||
final double _deviceWidth = _media.size.width;
|
final double _deviceWidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _deviceWidth / 100;
|
final double _deviceBlockSize = _deviceWidth / 100;
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
FocusManager.instance.primaryFocus?.unfocus();
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
@@ -81,7 +88,12 @@ class _PackageTransferScreenState extends State<PackageTransferScreen> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Package Details', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Package Details',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@@ -121,7 +133,8 @@ class _PackageTransferScreenState extends State<PackageTransferScreen> {
|
|||||||
deviceBlockSize: _deviceBlockSize,
|
deviceBlockSize: _deviceBlockSize,
|
||||||
textInputType: TextInputType.visiblePassword,
|
textInputType: TextInputType.visiblePassword,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
Provider.of<UsersProvider>(context, listen: false)
|
Provider.of<UsersProvider>(context,
|
||||||
|
listen: false)
|
||||||
.searchUsers(value);
|
.searchUsers(value);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -142,10 +155,11 @@ class _PackageTransferScreenState extends State<PackageTransferScreen> {
|
|||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return TransferDataBox(
|
return TransferDataBox(
|
||||||
deviceBlockSize: _deviceBlockSize,
|
deviceBlockSize: _deviceBlockSize,
|
||||||
user: userResults.usersBox?[index],
|
user:
|
||||||
|
userResults.usersBox?[index],
|
||||||
clickColor: kDarkPurple,
|
clickColor: kDarkPurple,
|
||||||
isClicked:
|
isClicked: userResults
|
||||||
userResults.selectedUserIndex ==
|
.selectedUserIndex ==
|
||||||
index,
|
index,
|
||||||
onTap: (userId) {
|
onTap: (userId) {
|
||||||
Provider.of<UsersProvider>(
|
Provider.of<UsersProvider>(
|
||||||
@@ -161,11 +175,13 @@ class _PackageTransferScreenState extends State<PackageTransferScreen> {
|
|||||||
context,
|
context,
|
||||||
listen: false)
|
listen: false)
|
||||||
.selectedUserForPackages =
|
.selectedUserForPackages =
|
||||||
userResults.usersBox?[index];
|
userResults
|
||||||
|
.usersBox?[index];
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
itemCount: userResults.usersBox?.length,
|
itemCount:
|
||||||
|
userResults.usersBox?.length,
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -216,7 +232,8 @@ class _PackageTransferScreenState extends State<PackageTransferScreen> {
|
|||||||
deviceBlockSize:
|
deviceBlockSize:
|
||||||
_deviceBlockSize,
|
_deviceBlockSize,
|
||||||
user: Provider.of<
|
user: Provider.of<
|
||||||
UsersProvider>(context)
|
UsersProvider>(
|
||||||
|
context)
|
||||||
.selectedUserForPackages,
|
.selectedUserForPackages,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@@ -273,6 +290,7 @@ class _PackageTransferScreenState extends State<PackageTransferScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,13 @@ class _PackageDetailScreenState extends State<PackageDetailScreen> {
|
|||||||
final _media = MediaQuery.of(context);
|
final _media = MediaQuery.of(context);
|
||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
@@ -98,6 +104,7 @@ class _PackageDetailScreenState extends State<PackageDetailScreen> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import '../../config/routes.dart';
|
||||||
import '../../providers/connectivity.dart';
|
import '../../providers/connectivity.dart';
|
||||||
import '../../providers/test_results.dart';
|
import '../../providers/test_results.dart';
|
||||||
import '../../widgets/Global/internet_error.dart';
|
import '../../widgets/Global/internet_error.dart';
|
||||||
@@ -18,6 +19,7 @@ class TestDetailsScreen extends StatefulWidget {
|
|||||||
class _TestDetailsScreenState extends State<TestDetailsScreen> {
|
class _TestDetailsScreenState extends State<TestDetailsScreen> {
|
||||||
bool isInit = true;
|
bool isInit = true;
|
||||||
Map<String, Object>? datas;
|
Map<String, Object>? datas;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeDependencies() async {
|
void didChangeDependencies() async {
|
||||||
if (isInit) {
|
if (isInit) {
|
||||||
@@ -42,11 +44,22 @@ class _TestDetailsScreenState extends State<TestDetailsScreen> {
|
|||||||
final double _devicewidth = _media.size.width;
|
final double _devicewidth = _media.size.width;
|
||||||
final double _deviceBlockSize = _devicewidth / 100;
|
final double _deviceBlockSize = _devicewidth / 100;
|
||||||
// print(datas);
|
// print(datas);
|
||||||
return SafeArea(
|
return PopScope(
|
||||||
|
canPop: false,
|
||||||
|
onPopInvoked: (didPop) {
|
||||||
|
if (didPop) return;
|
||||||
|
Navigator.of(context).pushNamed(Routes.homePage);
|
||||||
|
},
|
||||||
|
child: SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
titleSpacing: -10,
|
titleSpacing: -10,
|
||||||
title: Text('Test Results', style: TextStyle(color: Colors.white,),),
|
title: Text(
|
||||||
|
'Test Results',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
@@ -74,6 +87,7 @@ class _TestDetailsScreenState extends State<TestDetailsScreen> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user