mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 09:08:55 +03:30
beta commit
This commit is contained in:
@@ -1,35 +1,35 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../config/routes.dart';
|
||||
|
||||
class TestResultAddButton extends StatelessWidget {
|
||||
const TestResultAddButton({
|
||||
Key key,
|
||||
@required double deviceBlockSize,
|
||||
}) : _deviceBlockSize = deviceBlockSize,
|
||||
super(key: key);
|
||||
|
||||
final double _deviceBlockSize;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
customBorder: CircleBorder(),
|
||||
onTap: () {
|
||||
Navigator.of(context).pushNamed(Routes.testResultAddScreen);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(5),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.redAccent,
|
||||
),
|
||||
child: Icon(
|
||||
Icons.add,
|
||||
size: 10 * _deviceBlockSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../config/routes.dart';
|
||||
|
||||
class TestResultAddButton extends StatelessWidget {
|
||||
const TestResultAddButton({
|
||||
Key? key,
|
||||
required double deviceBlockSize,
|
||||
}) : _deviceBlockSize = deviceBlockSize,
|
||||
super(key: key);
|
||||
|
||||
final double _deviceBlockSize;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
customBorder: CircleBorder(),
|
||||
onTap: () {
|
||||
Navigator.of(context).pushNamed(Routes.testResultAddScreen);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(5),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.redAccent,
|
||||
),
|
||||
child: Icon(
|
||||
Icons.add,
|
||||
size: 10 * _deviceBlockSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,76 +1,77 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../providers/test_results.dart';
|
||||
|
||||
class TestResultChip extends StatelessWidget {
|
||||
const TestResultChip({
|
||||
Key key,
|
||||
@required double deviceBlockSize,
|
||||
@required String label,
|
||||
@required String id,
|
||||
@required String labelID,
|
||||
@required String testType,
|
||||
@required String hospital,
|
||||
@required String username,
|
||||
@required String fDate,
|
||||
@required String uDate,
|
||||
}) : _deviceBlockSize = deviceBlockSize,
|
||||
_id = id,
|
||||
_labelID = labelID,
|
||||
_testType = testType,
|
||||
_hispotal = hospital,
|
||||
_label = label,
|
||||
_username = username,
|
||||
_fDate = fDate,
|
||||
_uDate = uDate,
|
||||
super(key: key);
|
||||
|
||||
final double _deviceBlockSize;
|
||||
final String _id;
|
||||
final String _labelID;
|
||||
final String _testType;
|
||||
final String _hispotal;
|
||||
final String _label;
|
||||
final String _username;
|
||||
final String _fDate;
|
||||
final String _uDate;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(children: <Widget>[
|
||||
SizedBox(
|
||||
width: _deviceBlockSize,
|
||||
),
|
||||
Chip(
|
||||
backgroundColor: Colors.black,
|
||||
label: Text(
|
||||
_label,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
deleteIcon: Icon(
|
||||
Icons.close,
|
||||
color: Colors.white,
|
||||
),
|
||||
onDeleted: () {
|
||||
var labelProviderObject = Provider.of<TestResultsProvider>(context);
|
||||
labelProviderObject.setFilters(
|
||||
_id,
|
||||
_labelID,
|
||||
_username,
|
||||
_testType,
|
||||
_hispotal,
|
||||
_fDate,
|
||||
_uDate,
|
||||
);
|
||||
labelProviderObject.setLoading();
|
||||
labelProviderObject.getTestResults().then((_) {
|
||||
labelProviderObject.resetLoading();
|
||||
});
|
||||
},
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../providers/test_results.dart';
|
||||
|
||||
class TestResultChip extends StatelessWidget {
|
||||
const TestResultChip({
|
||||
Key? key,
|
||||
required double deviceBlockSize,
|
||||
required String label,
|
||||
required String id,
|
||||
required String labelID,
|
||||
required String testType,
|
||||
required String hospital,
|
||||
required String username,
|
||||
required String fDate,
|
||||
required String uDate,
|
||||
}) : _deviceBlockSize = deviceBlockSize,
|
||||
_id = id,
|
||||
_labelID = labelID,
|
||||
_testType = testType,
|
||||
_hispotal = hospital,
|
||||
_label = label,
|
||||
_username = username,
|
||||
_fDate = fDate,
|
||||
_uDate = uDate,
|
||||
super(key: key);
|
||||
|
||||
final double _deviceBlockSize;
|
||||
final String _id;
|
||||
final String _labelID;
|
||||
final String _testType;
|
||||
final String _hispotal;
|
||||
final String _label;
|
||||
final String _username;
|
||||
final String _fDate;
|
||||
final String _uDate;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(children: <Widget>[
|
||||
SizedBox(
|
||||
width: _deviceBlockSize,
|
||||
),
|
||||
Chip(
|
||||
backgroundColor: Colors.black,
|
||||
label: Text(
|
||||
_label,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
deleteIcon: Icon(
|
||||
Icons.close,
|
||||
color: Colors.white,
|
||||
),
|
||||
onDeleted: () {
|
||||
var labelProviderObject =
|
||||
Provider.of<TestResultsProvider>(context, listen: false);
|
||||
labelProviderObject.setFilters(
|
||||
_id,
|
||||
_labelID,
|
||||
_username,
|
||||
_testType,
|
||||
_hispotal,
|
||||
_fDate,
|
||||
_uDate,
|
||||
);
|
||||
labelProviderObject.setLoading();
|
||||
labelProviderObject.getTestResults().then((_) {
|
||||
labelProviderObject.resetLoading();
|
||||
});
|
||||
},
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,93 +1,63 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
|
||||
import '../../../config/routes.dart';
|
||||
|
||||
// class TestResultFloatingButton extends StatelessWidget {
|
||||
// const TestResultFloatingButton({
|
||||
// Key key,
|
||||
// @required double deviceBlockSize,
|
||||
// }) : _deviceBlockSize = deviceBlockSize,
|
||||
// super(key: key);
|
||||
|
||||
// final double _deviceBlockSize;
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return InkWell(
|
||||
// onTap: () {
|
||||
// Navigator.of(context).popAndPushNamed(Routes.testResultAddScreen);
|
||||
// },
|
||||
// child: Container(
|
||||
// padding: EdgeInsets.all(5),
|
||||
// decoration: BoxDecoration(
|
||||
// shape: BoxShape.circle,
|
||||
// color: Color.fromRGBO(0, 190, 190, 1),
|
||||
// ),
|
||||
// child: Icon(
|
||||
// Icons.add,
|
||||
// size: 10 * _deviceBlockSize,
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
class TestResultFloatingButton extends StatelessWidget {
|
||||
const TestResultFloatingButton({
|
||||
Key key,
|
||||
@required double deviceBlockSize,
|
||||
}) : _deviceBlockSize = deviceBlockSize,
|
||||
super(key: key);
|
||||
|
||||
final double _deviceBlockSize;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
InkWell(
|
||||
customBorder: CircleBorder(),
|
||||
onTap: () {
|
||||
Navigator.of(context).pushNamed(Routes.testScanScreen);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(2.5 * _deviceBlockSize),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.black,
|
||||
),
|
||||
child: Icon(
|
||||
FontAwesomeIcons.barcode,
|
||||
size: 7.1 * _deviceBlockSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 2 * _deviceBlockSize,
|
||||
),
|
||||
InkWell(
|
||||
customBorder: CircleBorder(),
|
||||
onTap: () {
|
||||
Navigator.of(context).pushReplacementNamed(Routes.testResultAddScreen);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(_deviceBlockSize),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Color.fromRGBO(0, 190, 190, 1),
|
||||
),
|
||||
child: Icon(
|
||||
Icons.add,
|
||||
size: 10 * _deviceBlockSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
import 'package:cssd/config/colors.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../config/routes.dart';
|
||||
|
||||
class TestResultFloatingButton extends StatelessWidget {
|
||||
const TestResultFloatingButton({
|
||||
Key? key,
|
||||
required double deviceBlockSize,
|
||||
}) : _deviceBlockSize = deviceBlockSize,
|
||||
super(key: key);
|
||||
|
||||
final double _deviceBlockSize;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
InkWell(
|
||||
customBorder: CircleBorder(),
|
||||
onTap: () {
|
||||
Navigator.of(context).pushNamed(Routes.testScanScreen);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(2.5 * _deviceBlockSize),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.black,
|
||||
),
|
||||
child: Icon(
|
||||
Icons.qr_code_scanner,
|
||||
size: 7.1 * _deviceBlockSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 2 * _deviceBlockSize,
|
||||
),
|
||||
InkWell(
|
||||
customBorder: CircleBorder(),
|
||||
onTap: () {
|
||||
Navigator.of(context)
|
||||
.pushReplacementNamed(Routes.testResultAddScreen);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(_deviceBlockSize),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: kLightBlue,
|
||||
),
|
||||
child: Icon(
|
||||
Icons.add,
|
||||
size: 10 * _deviceBlockSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../providers/test_results.dart';
|
||||
|
||||
class TestResultSearchBox extends StatelessWidget {
|
||||
const TestResultSearchBox({
|
||||
Key key,
|
||||
@required this.searchCTRL,
|
||||
@required double deviceBlockSize,
|
||||
}) : _deviceBlockSize = deviceBlockSize,
|
||||
super(key: key);
|
||||
|
||||
final TextEditingController searchCTRL;
|
||||
final double _deviceBlockSize;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TextField(
|
||||
onEditingComplete: () {
|
||||
FocusScope.of(context).unfocus();
|
||||
},
|
||||
onChanged: (value) {
|
||||
Provider.of<TestResultsProvider>(context, listen: false).search(value);
|
||||
},
|
||||
controller: searchCTRL,
|
||||
decoration: InputDecoration(
|
||||
icon: Icon(
|
||||
FontAwesomeIcons.search,
|
||||
size: 6 * _deviceBlockSize,
|
||||
),
|
||||
labelStyle: TextStyle(
|
||||
fontWeight: FontWeight.w100,
|
||||
fontSize: 4 * _deviceBlockSize,
|
||||
),
|
||||
labelText: 'Search by test name',
|
||||
isDense: true,
|
||||
contentPadding: EdgeInsets.symmetric(vertical: 2, horizontal: 3),
|
||||
),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 5 * _deviceBlockSize,
|
||||
),
|
||||
keyboardType: TextInputType.visiblePassword,
|
||||
);
|
||||
}
|
||||
}
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../providers/test_results.dart';
|
||||
|
||||
class TestResultSearchBox extends StatelessWidget {
|
||||
const TestResultSearchBox({
|
||||
Key? key,
|
||||
required this.searchCTRL,
|
||||
required double deviceBlockSize,
|
||||
}) : _deviceBlockSize = deviceBlockSize,
|
||||
super(key: key);
|
||||
|
||||
final TextEditingController searchCTRL;
|
||||
final double _deviceBlockSize;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TextField(
|
||||
onEditingComplete: () {
|
||||
FocusScope.of(context).unfocus();
|
||||
},
|
||||
onChanged: (value) {
|
||||
Provider.of<TestResultsProvider>(context, listen: false).search(value);
|
||||
},
|
||||
controller: searchCTRL,
|
||||
decoration: InputDecoration(
|
||||
icon: Icon(
|
||||
FontAwesomeIcons.search,
|
||||
size: 6 * _deviceBlockSize,
|
||||
),
|
||||
labelStyle: TextStyle(
|
||||
fontWeight: FontWeight.w100,
|
||||
fontSize: 4 * _deviceBlockSize,
|
||||
),
|
||||
labelText: 'Search by test name',
|
||||
isDense: true,
|
||||
contentPadding: EdgeInsets.symmetric(vertical: 2, horizontal: 3),
|
||||
),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 5 * _deviceBlockSize,
|
||||
),
|
||||
keyboardType: TextInputType.visiblePassword,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user