mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-12 18:08:55 +03:30
'3.1.1'
This commit is contained in:
@@ -89,11 +89,12 @@ class _CycleAddScreenState extends State<CycleAddScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Cycles'),
|
||||
title: Text('Cycles', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context)
|
||||
|
||||
@@ -54,11 +54,12 @@ class _CycleDetailScreenState extends State<CycleDetailScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Cycles'),
|
||||
title: Text('Cycles', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -104,11 +104,12 @@ class _CycleFilterScreenState extends State<CycleFilterScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Cycles'),
|
||||
title: Text('Cycles', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context)
|
||||
|
||||
@@ -77,11 +77,12 @@ class _CycleResultScreenState extends State<CycleResultScreen> {
|
||||
),
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Home'),
|
||||
title: Text('Home', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -35,11 +35,12 @@ class _CycleScanScreenState extends State<CycleScanScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Cycles'),
|
||||
title: Text('Cycles', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -93,10 +93,11 @@ class _CycleUpdateScreenState extends State<CycleUpdateScreen> {
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
backgroundColor: Colors.black,
|
||||
title: Text('Cycles'),
|
||||
title: Text('Cycles', style: TextStyle(color: Colors.white,),),
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context)
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'package:cssd/widgets/ItemScreens/Add/item_save_button.dart';
|
||||
import 'package:cssd/widgets/ItemScreens/Add/upload_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:random_string/random_string.dart';
|
||||
|
||||
@@ -27,9 +26,9 @@ class _ItemAddScreenState extends State<ItemAddScreen> {
|
||||
TextEditingController nameCTRL = new TextEditingController();
|
||||
TextEditingController specificCTRL = new TextEditingController();
|
||||
TextEditingController sizeCTRL = new TextEditingController();
|
||||
TextEditingController dateCTRL = new TextEditingController();
|
||||
final _form = GlobalKey<FormState>();
|
||||
bool isInit = true;
|
||||
bool isLoading = false;
|
||||
ItemFilterObject? filters;
|
||||
final batchId = randomString(10);
|
||||
|
||||
@@ -41,25 +40,70 @@ class _ItemAddScreenState extends State<ItemAddScreen> {
|
||||
nameCTRL.text = '';
|
||||
sizeCTRL.text = '';
|
||||
specificCTRL.text = '';
|
||||
dateCTRL.text = DateFormat('y-M-d').format(DateTime.now());
|
||||
super.initState();
|
||||
}
|
||||
|
||||
void _saveForm(String name, String size, String specific, String udi,String description) {
|
||||
setState(() {
|
||||
isLoading = true;
|
||||
});
|
||||
if (!_form.currentState!.validate()) {
|
||||
return;
|
||||
}
|
||||
Provider.of<ItemProvider>(context, listen: false)
|
||||
.createItemResult(
|
||||
name,
|
||||
size,
|
||||
specific,
|
||||
udi,
|
||||
description,
|
||||
batchId,
|
||||
)
|
||||
.then(
|
||||
(result) {
|
||||
setState(() {
|
||||
isLoading = false;
|
||||
});
|
||||
if (result == 'done') {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
content: Text('Item added.'),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(ctx).pop();
|
||||
},
|
||||
child: Text('Ok'),
|
||||
)
|
||||
],
|
||||
),
|
||||
).then((value) => Navigator.of(context)
|
||||
.popAndPushNamed(Routes.itemResultScreen));
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangeDependencies() async {
|
||||
if (isInit) {
|
||||
setState(() {
|
||||
isLoading = true;
|
||||
});
|
||||
var itemProviderObject = Provider.of<ItemProvider>(context);
|
||||
itemProviderObject.catchImages.clear();
|
||||
itemProviderObject.getItemResults().then(
|
||||
(result) {
|
||||
setState(
|
||||
() {
|
||||
isInit = false;
|
||||
isLoading = false;
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
isInit = false;
|
||||
super.didChangeDependencies();
|
||||
}
|
||||
|
||||
@@ -85,11 +129,12 @@ class _ItemAddScreenState extends State<ItemAddScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Items'),
|
||||
title: Text('Items', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context)
|
||||
@@ -99,7 +144,7 @@ class _ItemAddScreenState extends State<ItemAddScreen> {
|
||||
body: Consumer<ConnectivityProvider>(
|
||||
builder: (ct, connection, _) {
|
||||
return connection.conStatus != 'offline'
|
||||
? isInit
|
||||
? isLoading
|
||||
? Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.black,
|
||||
@@ -315,16 +360,16 @@ class _ItemAddScreenState extends State<ItemAddScreen> {
|
||||
height: 70,
|
||||
),
|
||||
ItemAddSaveButton(
|
||||
form: _form,
|
||||
nameCTRL: nameCTRL,
|
||||
udiCTRL: udiCTRL,
|
||||
descriptionCTRL: descriptionCTRL,
|
||||
sizeCTRL: sizeCTRL,
|
||||
specificCTRL: specificCTRL,
|
||||
batchId: batchId,
|
||||
dateValue: dateCTRL.text,
|
||||
onTap: (){
|
||||
_saveForm(
|
||||
nameCTRL.text,
|
||||
sizeCTRL.text,
|
||||
specificCTRL.text,
|
||||
udiCTRL.text,
|
||||
descriptionCTRL.text,
|
||||
);
|
||||
},
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
isLoading: isInit,
|
||||
),
|
||||
SizedBox(
|
||||
height: 100,
|
||||
|
||||
@@ -54,11 +54,12 @@ class _ItemDetailScreenState extends State<ItemDetailScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Items'),
|
||||
title: Text('Items', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -99,11 +99,12 @@ class _ItemFilterScreenState extends State<ItemFilterScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Items'),
|
||||
title: Text('Items', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context)
|
||||
|
||||
@@ -74,11 +74,12 @@ class _ItemResultScreenState extends State<ItemResultScreen> {
|
||||
),
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Home'),
|
||||
title: Text('Home', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
@@ -191,6 +192,8 @@ class _ItemResultScreenState extends State<ItemResultScreen> {
|
||||
searchCTRL: searchCTRL,
|
||||
text: 'item',
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
textInputType: TextInputType.visiblePassword,
|
||||
text2: "Udi",
|
||||
onChanged: (value) {
|
||||
Provider.of<ItemProvider>(context, listen: false)
|
||||
.search(value);
|
||||
|
||||
@@ -33,11 +33,12 @@ class _ItemScanScreenState extends State<ItemScanScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Items'),
|
||||
title: Text('Items', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -84,10 +84,11 @@ class _ItemUpdateScreenState extends State<ItemUpdateScreen> {
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
backgroundColor: Colors.black,
|
||||
title: Text('Items'),
|
||||
title: Text('Items', style: TextStyle(color: Colors.white,),),
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context)
|
||||
|
||||
@@ -88,11 +88,12 @@ class _LabelAddScreenState extends State<LabelAddScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Labels'),
|
||||
title: Text('Labels', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context)
|
||||
|
||||
@@ -54,11 +54,12 @@ class _LabelDetailScreenState extends State<LabelDetailScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Labels'),
|
||||
title: Text('Labels', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -95,11 +95,12 @@ class _LabelFilterScreenState extends State<LabelFilterScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Labels'),
|
||||
title: Text('Labels', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context)
|
||||
|
||||
@@ -72,11 +72,12 @@ class _LabelResultScreenState extends State<LabelResultScreen> {
|
||||
),
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Home'),
|
||||
title: Text('Home', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -36,11 +36,12 @@ class _LabelScanScreenState extends State<LabelScanScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Labels'),
|
||||
title: Text('Labels', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -107,10 +107,11 @@ class _LabelUpdateScreenState extends State<LabelUpdateScreen> {
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
backgroundColor: Colors.black,
|
||||
title: Text('Labels'),
|
||||
title: Text('Labels', style: TextStyle(color: Colors.white,),),
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context)
|
||||
|
||||
@@ -94,7 +94,7 @@ class _ForgetPassScreenState extends State<ForgetPassScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: Text('CSSD'),
|
||||
title: Text('CSSD', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
),
|
||||
body: Selector<ConnectivityProvider, String>(
|
||||
|
||||
@@ -106,7 +106,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: Text('CSSD'),
|
||||
title: Text('CSSD', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
),
|
||||
body: Selector<ConnectivityProvider, String>(
|
||||
|
||||
@@ -83,7 +83,7 @@ class _RePassScreenState extends State<RePassScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: Text('CSSD'),
|
||||
title: Text('CSSD', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
),
|
||||
body: Selector<ConnectivityProvider, String>(
|
||||
|
||||
@@ -88,10 +88,11 @@ class _RegisterState extends State<Register> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Login'),
|
||||
title: Text('Login', style: TextStyle(color: Colors.white,),),
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -90,7 +90,7 @@ class _VerifyPassScreenState extends State<VerifyPassScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: Text('CSSD'),
|
||||
title: Text('CSSD', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
),
|
||||
body: Selector<ConnectivityProvider, String>(
|
||||
|
||||
@@ -173,6 +173,8 @@ class _MyItemsMineScreenState extends State<MyItemsMineScreen> {
|
||||
ResultSearchBox(
|
||||
searchCTRL: searchCTRL,
|
||||
text: 'item',
|
||||
text2: "Udi",
|
||||
textInputType: TextInputType.visiblePassword,
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
onChanged: (value) {
|
||||
if (userData['roles']?.contains('User')) {
|
||||
|
||||
@@ -42,11 +42,12 @@ class _MyItemsResultScreenState extends State<MyItemsResultScreen>
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Home'),
|
||||
title: Text('Home', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
@@ -54,6 +55,7 @@ class _MyItemsResultScreenState extends State<MyItemsResultScreen>
|
||||
bottom: TabBar(
|
||||
controller: _tabController,
|
||||
indicatorColor: kBlue,
|
||||
labelColor: Colors.white,
|
||||
tabs: [
|
||||
Tab(
|
||||
text: 'Mine',
|
||||
|
||||
@@ -55,11 +55,12 @@ class _MyItemsDetailScreenState extends State<MyItemsDetailScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('My Items'),
|
||||
title: Text('My Items', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -68,11 +68,12 @@ class _MyItemsFilterScreenState extends State<MyItemsFilterScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('My Items'),
|
||||
title: Text('My Items', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context)
|
||||
|
||||
@@ -74,11 +74,12 @@ class _MyItemsHistoryScreenState extends State<MyItemsHistoryScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('My Items'),
|
||||
title: Text('My Items', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -33,11 +33,12 @@ class _MyItemsScanScreenState extends State<MyItemsScanScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('My Items'),
|
||||
title: Text('My Items', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -85,11 +85,12 @@ class _ItemsTransferScreenState extends State<ItemsTransferScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Item Details'),
|
||||
title: Text('Item Details', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
@@ -122,7 +123,7 @@ class _ItemsTransferScreenState extends State<ItemsTransferScreen> {
|
||||
text: 'user',
|
||||
text2: 'name or ID',
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
textInputType: TextInputType.name,
|
||||
textInputType: TextInputType.visiblePassword,
|
||||
onChanged: (value) {
|
||||
Provider.of<UsersProvider>(context, listen: false)
|
||||
.searchUsers(value);
|
||||
|
||||
@@ -42,11 +42,12 @@ class _MyPackagesResultScreenState extends State<MyPackagesResultScreen>
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Home'),
|
||||
title: Text('Home', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
@@ -54,6 +55,7 @@ class _MyPackagesResultScreenState extends State<MyPackagesResultScreen>
|
||||
bottom: TabBar(
|
||||
controller: _tabController,
|
||||
indicatorColor: kPurple,
|
||||
labelColor: Colors.white,
|
||||
tabs: [
|
||||
Tab(
|
||||
text: 'Mine',
|
||||
|
||||
@@ -55,11 +55,12 @@ class _MyPackagesDetailScreenState extends State<MyPackagesDetailScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('My Packages'),
|
||||
title: Text('My Packages', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -65,11 +65,12 @@ class _MyPackageFilterScreenState extends State<MyPackageFilterScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('My Packages'),
|
||||
title: Text('My Packages', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context)
|
||||
|
||||
@@ -74,11 +74,12 @@ class _MyPackagesHistoryScreenState extends State<MyPackagesHistoryScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('My Packages'),
|
||||
title: Text('My Packages', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -33,11 +33,12 @@ class _MyPackagesScanScreenState extends State<MyPackagesScanScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('My Packages'),
|
||||
title: Text('My Packages', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -81,11 +81,12 @@ class _PackageTransferScreenState extends State<PackageTransferScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Package Details'),
|
||||
title: Text('Package Details', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
@@ -118,7 +119,7 @@ class _PackageTransferScreenState extends State<PackageTransferScreen> {
|
||||
text: 'user',
|
||||
text2: 'name or ID',
|
||||
deviceBlockSize: _deviceBlockSize,
|
||||
textInputType: TextInputType.name,
|
||||
textInputType: TextInputType.visiblePassword,
|
||||
onChanged: (value) {
|
||||
Provider.of<UsersProvider>(context, listen: false)
|
||||
.searchUsers(value);
|
||||
|
||||
@@ -48,23 +48,6 @@ class _PackageAddScreenState extends State<PackageAddScreen> {
|
||||
(result) {
|
||||
setState(
|
||||
() {
|
||||
// itemVals = [
|
||||
// {'id': '', 'name-udi': ''}
|
||||
// ];
|
||||
// for (var item in result) {
|
||||
// itemVals.add(item);
|
||||
// packageProviderObject.itemVals = itemVals;
|
||||
// }
|
||||
// initialItemValue.text = itemVals[1]['name-udi'];
|
||||
// packageProviderObject.initialItemValue = initialItemValue.text;
|
||||
|
||||
// itemVals.forEach(
|
||||
// (item) {
|
||||
// if (item['id'] == '') {
|
||||
// selectedItemsCTRL.text = item['name']!;
|
||||
// }
|
||||
// },
|
||||
// );
|
||||
isInit = false;
|
||||
},
|
||||
);
|
||||
@@ -95,11 +78,12 @@ class _PackageAddScreenState extends State<PackageAddScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Packages'),
|
||||
title: Text('Packages', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context)
|
||||
|
||||
@@ -49,11 +49,12 @@ class _PackageDetailScreenState extends State<PackageDetailScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Packages'),
|
||||
title: Text('Packages', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -92,11 +92,12 @@ class _PackageFilterScreenState extends State<PackageFilterScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Packages'),
|
||||
title: Text('Packages', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context)
|
||||
|
||||
@@ -74,11 +74,12 @@ class _PackageResultScreenState extends State<PackageResultScreen> {
|
||||
),
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Home'),
|
||||
title: Text('Home', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -33,11 +33,12 @@ class _PackageScanScreenState extends State<PackageScanScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Packages'),
|
||||
title: Text('Packages', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -81,10 +81,11 @@ class _PackageUpdateScreenState extends State<PackageUpdateScreen> {
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
backgroundColor: Colors.black,
|
||||
title: Text('Packages'),
|
||||
title: Text('Packages', style: TextStyle(color: Colors.white,),),
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context)
|
||||
|
||||
@@ -60,11 +60,12 @@ class _TestResultAddScreenState extends State<TestResultAddScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Test Results'),
|
||||
title: Text('Test Results', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
// padding: EdgeInsets.all(0),
|
||||
|
||||
@@ -46,11 +46,12 @@ class _TestDetailsScreenState extends State<TestDetailsScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Test Results'),
|
||||
title: Text('Test Results', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:barcode_scan2/barcode_scan2.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
@@ -139,11 +138,12 @@ class _TestFilterScreenState extends State<TestFilterScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Test Results'),
|
||||
title: Text('Test Results', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).popAndPushNamed(
|
||||
|
||||
@@ -74,8 +74,10 @@ class _FormPageState extends State<FormPage> {
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
var providerObject = Provider.of<TestResultsProvider>(context);
|
||||
String testTypeName = Provider.of<TestResultsProvider>(context).testType;
|
||||
String testCode = Provider.of<TestResultsProvider>(context).testCode;
|
||||
providerObject.catchImages.clear();
|
||||
Provider.of<Inputs>(context, listen: false)
|
||||
.getInputs(
|
||||
testResultId: '',
|
||||
@@ -107,11 +109,11 @@ class _FormPageState extends State<FormPage> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: Text('Add Test Result'),
|
||||
title: Text('Add Test Result', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
actions: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(Icons.save),
|
||||
icon: Icon(Icons.save, color: Colors.white,),
|
||||
onPressed: () {
|
||||
_saveForm();
|
||||
},
|
||||
@@ -120,6 +122,7 @@ class _FormPageState extends State<FormPage> {
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () {
|
||||
|
||||
@@ -82,11 +82,12 @@ class _TestResultScreenState extends State<TestResultScreen> {
|
||||
TestResultFloatingButton(deviceBlockSize: _deviceBlockSize),
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Home'),
|
||||
title: Text('Home', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -30,11 +30,12 @@ class _TestScanScreenState extends State<TestScanScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Test Results'),
|
||||
title: Text('Test Results', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -76,11 +76,12 @@ class _TestVerifyScreenState extends State<TestVerifyScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Home'),
|
||||
title: Text('Home', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
@@ -34,14 +34,16 @@ class HomePage extends StatelessWidget {
|
||||
),
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: Text('CSSD'),
|
||||
title: Text('CSSD', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
actions: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 10.0),
|
||||
child: IconButton(
|
||||
icon: Icon(
|
||||
Icons.power_settings_new,
|
||||
color: Colors.white,
|
||||
),
|
||||
onPressed: () {
|
||||
showDialog(
|
||||
@@ -159,9 +161,6 @@ class HomePage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
Divider(
|
||||
height: 2,
|
||||
),
|
||||
SelectionItem(
|
||||
firstLine: 'CYCLES',
|
||||
secondLine: 'List, Details & Add a one',
|
||||
|
||||
@@ -48,11 +48,12 @@ class _MyInfoScreenState extends State<MyInfoScreen> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
titleSpacing: -10,
|
||||
title: Text('Dashboard'),
|
||||
title: Text('Dashboard', style: TextStyle(color: Colors.white,),),
|
||||
backgroundColor: Colors.black,
|
||||
leading: IconButton(
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left,
|
||||
color: Colors.white,
|
||||
size: 35,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
|
||||
Reference in New Issue
Block a user