mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-12 10:18:56 +03:30
Fix add loading and home list issue
This commit is contained in:
@@ -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
@@ -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(),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user