mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 09:18:56 +03:30
commit
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user