Fix add loading and home list issue

This commit is contained in:
fhkhd
2023-12-29 19:16:32 +03:30
parent 2a4d72c605
commit 6b99e16d95
3 changed files with 31 additions and 53 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ class _ItemAddScreenState extends State<ItemAddScreen> {
void _saveForm(String name, String size, String specific, String udi,String description) {
setState(() {
isLoading = true;
isLoading = false;
});
if (!_form.currentState!.validate()) {
return;
+22 -20
View File
@@ -24,7 +24,6 @@ import 'TestPages/test_verify_screen.dart';
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final userData = Provider.of<Auth>(context, listen: false).user;
return SafeArea(
child: Scaffold(
drawer: Selector<ConnectivityProvider, String>(
@@ -34,7 +33,12 @@ class HomePage extends StatelessWidget {
),
appBar: AppBar(
centerTitle: true,
title: Text('CSSD', style: TextStyle(color: Colors.white,),),
title: Text(
'CSSD',
style: TextStyle(
color: Colors.white,
),
),
backgroundColor: Colors.black,
iconTheme: IconThemeData(color: Colors.white),
actions: <Widget>[
@@ -258,24 +262,22 @@ class HomePage extends StatelessWidget {
),
),
Divider(height: 2),
userData['roles']?.contains('User') ?? false
? Container()
: SelectionItem(
firstLine: 'TEST TO VERIFY',
secondLine: 'Verify and reject Test Results',
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) {
return Consumer<Auth>(
builder: (ctx, auth, _) {
return TestVerifyScreen();
},
);
},
),
),
),
SelectionItem(
firstLine: 'TEST TO VERIFY',
secondLine: 'Verify and reject Test Results',
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) {
return Consumer<Auth>(
builder: (ctx, auth, _) {
return TestVerifyScreen();
},
);
},
),
),
),
BarcodeSelectionItem(),
],
),