This commit is contained in:
erfan hayat'bakhsh
2020-08-01 14:16:20 +04:30
parent 30f10dca2e
commit e4d29c4e3c
71 changed files with 5018 additions and 2319 deletions
+54 -54
View File
@@ -3,7 +3,7 @@ import 'package:cssd/models/test_result_models.dart';
import 'package:cssd/providers/connectivity.dart';
// import 'package:cssd/providers/test_result.dart';
import 'package:cssd/providers/test_results.dart';
import 'package:cssd/widgets/Global/splash_screen%20copy.dart';
import 'package:cssd/widgets/Global/internet_error.dart';
import 'package:cssd/widgets/TestResultScreens/Main/filter_chip_box.dart';
import 'package:cssd/widgets/TestResultScreens/Main/floating_button.dart';
import 'package:cssd/widgets/TestResultScreens/Main/search_box.dart';
@@ -342,10 +342,10 @@ class TestItemBox extends StatelessWidget {
SizedBox(
height: 15,
),
item.result == 'Verified'
item.result == 'Accepted'
? Text(
'Verified',
style: TextStyle(color: Colors.blueAccent),
'Accepted',
style: TextStyle(color: Colors.green),
)
: Text(
'Rejected',
@@ -366,56 +366,56 @@ class TestItemBox extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
item.result != 'Verified'
? InkWell(
onTap: () {
showDialog(
context: context,
builder: (ctx) => AlertDialog(
title: Text('Delete'),
content: Text(
'Are you sure for delete this test?'),
actions: <Widget>[
FlatButton(
onPressed: () {
Provider.of<TestResultsProvider>(
context)
.removeTestResult(
item.id.toString())
.then((_) {
Navigator.of(ctx).pop();
});
},
child: Text('Yes'),
),
FlatButton(
onPressed: () {
Navigator.of(ctx).pop();
},
child: Text('No'),
),
],
),
);
},
child: Container(
padding: EdgeInsets.all(7),
width: 10 * _deviceBlockSize,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.red,
),
child: Icon(
Icons.delete,
size: 6 * _deviceBlockSize,
color: Colors.white,
),
),
)
: Container(),
SizedBox(
width: _deviceBlockSize,
),
// item.result != 'Accepted'
// ? InkWell(
// onTap: () {
// showDialog(
// context: context,
// builder: (ctx) => AlertDialog(
// title: Text('Delete'),
// content: Text(
// 'Are you sure for delete this test?'),
// actions: <Widget>[
// FlatButton(
// onPressed: () {
// Provider.of<TestResultsProvider>(
// context)
// .removeTestResult(
// item.id.toString())
// .then((_) {
// Navigator.of(ctx).pop();
// });
// },
// child: Text('Yes'),
// ),
// FlatButton(
// onPressed: () {
// Navigator.of(ctx).pop();
// },
// child: Text('No'),
// ),
// ],
// ),
// );
// },
// child: Container(
// padding: EdgeInsets.all(7),
// width: 10 * _deviceBlockSize,
// decoration: BoxDecoration(
// shape: BoxShape.circle,
// color: Colors.red,
// ),
// child: Icon(
// Icons.delete,
// size: 6 * _deviceBlockSize,
// color: Colors.white,
// ),
// ),
// )
// : Container(),
// SizedBox(
// width: _deviceBlockSize,
// ),
InkWell(
onTap: () {
Navigator.of(context).pushNamed(