mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 15:18:56 +03:30
Fix status of package in detail screens
This commit is contained in:
@@ -164,6 +164,9 @@ class Url {
|
|||||||
static String changeItemStatus(String id) {
|
static String changeItemStatus(String id) {
|
||||||
return '$baseUrl/Items/ChangeStatus/$id';
|
return '$baseUrl/Items/ChangeStatus/$id';
|
||||||
}
|
}
|
||||||
|
static String changePackageStatus(String id) {
|
||||||
|
return '$baseUrl/Packages/ChangeStatus/$id';
|
||||||
|
}
|
||||||
|
|
||||||
static String repairItems(String id) {
|
static String repairItems(String id) {
|
||||||
return '$baseUrl/transfer-items/ChangeRepair/$id';
|
return '$baseUrl/transfer-items/ChangeRepair/$id';
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class PackageDetailObject extends Equatable {
|
|||||||
final List<String> items;
|
final List<String> items;
|
||||||
final String userName;
|
final String userName;
|
||||||
final String userCreator;
|
final String userCreator;
|
||||||
|
final String status;
|
||||||
|
|
||||||
PackageDetailObject({
|
PackageDetailObject({
|
||||||
required this.id,
|
required this.id,
|
||||||
@@ -44,6 +45,7 @@ class PackageDetailObject extends Equatable {
|
|||||||
required this.items,
|
required this.items,
|
||||||
required this.userName,
|
required this.userName,
|
||||||
required this.userCreator,
|
required this.userCreator,
|
||||||
|
required this.status
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -230,6 +230,7 @@ class _PackageResultScreenState extends State<PackageResultScreen> {
|
|||||||
// 0,
|
// 0,
|
||||||
// items.length - 3,
|
// items.length - 3,
|
||||||
// ); // remove extra ,
|
// ); // remove extra ,
|
||||||
|
|
||||||
return PackageItemBox(
|
return PackageItemBox(
|
||||||
deviceBlockSize: _deviceBlockSize,
|
deviceBlockSize: _deviceBlockSize,
|
||||||
item:
|
item:
|
||||||
|
|||||||
+10
-11
@@ -40,8 +40,10 @@ class ItemProvider extends ChangeNotifier {
|
|||||||
specific: '',
|
specific: '',
|
||||||
);
|
);
|
||||||
int pageNumber = 1;
|
int pageNumber = 1;
|
||||||
|
|
||||||
void resetPageNumber() => pageNumber = 1;
|
void resetPageNumber() => pageNumber = 1;
|
||||||
bool isloading = false;
|
bool isloading = false;
|
||||||
|
|
||||||
void resetLoading() {
|
void resetLoading() {
|
||||||
isloading = false;
|
isloading = false;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
@@ -53,6 +55,7 @@ class ItemProvider extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool isloadingButton = false;
|
bool isloadingButton = false;
|
||||||
|
|
||||||
void resetLoadingButton() {
|
void resetLoadingButton() {
|
||||||
isloadingButton = false;
|
isloadingButton = false;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
@@ -250,8 +253,7 @@ class ItemProvider extends ChangeNotifier {
|
|||||||
items = [];
|
items = [];
|
||||||
searchBoxValue = value;
|
searchBoxValue = value;
|
||||||
originalItems!.forEach((result) {
|
originalItems!.forEach((result) {
|
||||||
if (
|
if (result.udi
|
||||||
result.udi
|
|
||||||
.toString()
|
.toString()
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.contains(searchBoxValue.toLowerCase()) ||
|
.contains(searchBoxValue.toLowerCase()) ||
|
||||||
@@ -266,8 +268,7 @@ class ItemProvider extends ChangeNotifier {
|
|||||||
result.udi
|
result.udi
|
||||||
.toString()
|
.toString()
|
||||||
.toUpperCase()
|
.toUpperCase()
|
||||||
.contains(searchBoxValue.toLowerCase())
|
.contains(searchBoxValue.toLowerCase())) {
|
||||||
) {
|
|
||||||
items!.add(result);
|
items!.add(result);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -342,7 +343,7 @@ class ItemProvider extends ChangeNotifier {
|
|||||||
size: 'null',
|
size: 'null',
|
||||||
createdAt: '2019-09-18 10:02:03',
|
createdAt: '2019-09-18 10:02:03',
|
||||||
udi: 'null',
|
udi: 'null',
|
||||||
status: 0,
|
status: 'null',
|
||||||
filePath: [],
|
filePath: [],
|
||||||
packageId: 'null',
|
packageId: 'null',
|
||||||
);
|
);
|
||||||
@@ -377,10 +378,11 @@ class ItemProvider extends ChangeNotifier {
|
|||||||
return result!;
|
return result!;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> changeStatus(String id) async {
|
Future<bool> changeStatus(String id, String value) async {
|
||||||
print(id);
|
print(id);
|
||||||
var response = await http.post(
|
var response = await http.post(
|
||||||
Uri.parse(Url.changeItemStatus(id)),
|
Uri.parse(Url.changeItemStatus(id)),
|
||||||
|
body: json.encode({'status': value}),
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': User.token,
|
'Authorization': User.token,
|
||||||
'X-Requested-With': 'XMLHttpRequest',
|
'X-Requested-With': 'XMLHttpRequest',
|
||||||
@@ -392,7 +394,7 @@ class ItemProvider extends ChangeNotifier {
|
|||||||
var itemData = json.decode(response.body);
|
var itemData = json.decode(response.body);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (itemData['status'] == 'Success') {
|
if (itemData['data']['transfers']['status'] == 'approved') {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@@ -407,10 +409,7 @@ class ItemProvider extends ChangeNotifier {
|
|||||||
final taskId = await FlutterDownloader.enqueue(
|
final taskId = await FlutterDownloader.enqueue(
|
||||||
url: Url.exportItems,
|
url: Url.exportItems,
|
||||||
savedDir: baseStorage!.path,
|
savedDir: baseStorage!.path,
|
||||||
headers: {
|
headers: {'Authorization': User.token, "Accept": "*"},
|
||||||
'Authorization': User.token,
|
|
||||||
"Accept": "*"
|
|
||||||
},
|
|
||||||
showNotification: true,
|
showNotification: true,
|
||||||
openFileFromNotification: true,
|
openFileFromNotification: true,
|
||||||
saveInPublicStorage: true,
|
saveInPublicStorage: true,
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import 'package:http/http.dart' as http;
|
|||||||
|
|
||||||
class PackageProvider extends ChangeNotifier {
|
class PackageProvider extends ChangeNotifier {
|
||||||
List<ItemResultObject>? filteredItems;
|
List<ItemResultObject>? filteredItems;
|
||||||
|
|
||||||
// List<Map<String, dynamic>> itemVals = [];
|
// List<Map<String, dynamic>> itemVals = [];
|
||||||
List<String> itemVals = [];
|
List<String> itemVals = [];
|
||||||
|
|
||||||
@@ -51,6 +52,32 @@ class PackageProvider extends ChangeNotifier {
|
|||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<bool> changeStatus(String id, String value) async {
|
||||||
|
print(id);
|
||||||
|
var response = await http.post(
|
||||||
|
Uri.parse(Url.changePackageStatus(id)),
|
||||||
|
body: json.encode({'status': value}),
|
||||||
|
headers: {
|
||||||
|
'Authorization': User.token,
|
||||||
|
'X-Requested-With': 'XMLHttpRequest',
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"Accept": "application/json"
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
var packageData = json.decode(response.body);
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (packageData['data']['transfers']['status'] == 'approved') {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
changeItemValByScan(String value, int index) {
|
changeItemValByScan(String value, int index) {
|
||||||
for (var item in filteredItems!) {
|
for (var item in filteredItems!) {
|
||||||
if (item.udi == value) {
|
if (item.udi == value) {
|
||||||
@@ -73,8 +100,10 @@ class PackageProvider extends ChangeNotifier {
|
|||||||
// udi: '',
|
// udi: '',
|
||||||
);
|
);
|
||||||
int pageNumber = 1;
|
int pageNumber = 1;
|
||||||
|
|
||||||
void resetPageNumber() => pageNumber = 1;
|
void resetPageNumber() => pageNumber = 1;
|
||||||
bool isloading = false;
|
bool isloading = false;
|
||||||
|
|
||||||
void resetLoading() {
|
void resetLoading() {
|
||||||
isloading = false;
|
isloading = false;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
@@ -86,6 +115,7 @@ class PackageProvider extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool isloadingButton = false;
|
bool isloadingButton = false;
|
||||||
|
|
||||||
void resetLoadingButton() {
|
void resetLoadingButton() {
|
||||||
isloadingButton = false;
|
isloadingButton = false;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
@@ -340,7 +370,7 @@ class PackageProvider extends ChangeNotifier {
|
|||||||
items: [],
|
items: [],
|
||||||
userName: 'null',
|
userName: 'null',
|
||||||
userCreator: 'null',
|
userCreator: 'null',
|
||||||
);
|
status: 'null');
|
||||||
}
|
}
|
||||||
var data = json.decode(response.body)['data'];
|
var data = json.decode(response.body)['data'];
|
||||||
List<String> itemsList = [];
|
List<String> itemsList = [];
|
||||||
@@ -363,7 +393,7 @@ class PackageProvider extends ChangeNotifier {
|
|||||||
userName: data['user'] != null ? data['user']['name'] : '',
|
userName: data['user'] != null ? data['user']['name'] : '',
|
||||||
userCreator: data['creator'] != null ? data['creator']['name'] : '',
|
userCreator: data['creator'] != null ? data['creator']['name'] : '',
|
||||||
items: itemsList,
|
items: itemsList,
|
||||||
);
|
status: data['status']);
|
||||||
return result!;
|
return result!;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class ItemItemBox extends StatelessWidget {
|
|||||||
child: Card(
|
child: Card(
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(8),
|
padding: EdgeInsets.symmetric(vertical: 8),
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
@@ -51,6 +51,7 @@ class ItemItemBox extends StatelessWidget {
|
|||||||
// width: 3 * _deviceBlockSize,
|
// width: 3 * _deviceBlockSize,
|
||||||
// ),
|
// ),
|
||||||
// Spacer(),
|
// Spacer(),
|
||||||
|
SizedBox(width: 4,),
|
||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
@@ -144,7 +145,8 @@ class ItemItemBox extends StatelessWidget {
|
|||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text('Delete'),
|
title: Text('Delete'),
|
||||||
content: Text(
|
content: Text(
|
||||||
'Are you sure you want delete this Item?',),
|
'Are you sure you want delete this Item?',
|
||||||
|
),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
TextButton(
|
TextButton(
|
||||||
child: Text('Yes'),
|
child: Text('Yes'),
|
||||||
@@ -219,7 +221,10 @@ class ItemItemBox extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
userData['roles']?.contains('User') ?? false
|
userData['roles']?.contains('User') ?? false
|
||||||
? Container()
|
? Container()
|
||||||
: InkWell(
|
: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: <Widget>[
|
||||||
|
InkWell(
|
||||||
customBorder: CircleBorder(),
|
customBorder: CircleBorder(),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showDialog(
|
showDialog(
|
||||||
@@ -227,24 +232,23 @@ class ItemItemBox extends StatelessWidget {
|
|||||||
builder: (context) {
|
builder: (context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text(
|
title: Text(
|
||||||
item!.status == 1
|
'Are you Reject this item?'
|
||||||
? 'Are you Reject this item?'
|
|
||||||
: 'Are you Confirm this item?',
|
|
||||||
),
|
),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Provider.of<ItemProvider>(context,
|
Provider.of<ItemProvider>(context,
|
||||||
listen: false)
|
listen: false)
|
||||||
.changeStatus(item!.id)
|
.changeStatus(item!.id, "rejected")
|
||||||
.then(
|
.then(
|
||||||
(value) {
|
(value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
print('true');
|
print('true');
|
||||||
}
|
}
|
||||||
Navigator.of(context)
|
Navigator.of(context).pop();
|
||||||
.popAndPushNamed(Routes
|
// Navigator.of(context)
|
||||||
.itemResultScreen);
|
// .popAndPushNamed(Routes
|
||||||
|
// .itemResultScreen);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -266,15 +270,75 @@ class ItemItemBox extends StatelessWidget {
|
|||||||
width: 8 * _deviceBlockSize,
|
width: 8 * _deviceBlockSize,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
color: item!.status == 1 ? kPink : kBlue,
|
color: kPink
|
||||||
),
|
),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
item!.status == 1 ? Icons.close : Icons.check,
|
Icons.close ,
|
||||||
size: 4 * _deviceBlockSize,
|
size: 4 * _deviceBlockSize,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 5,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
customBorder: CircleBorder(),
|
||||||
|
onTap: () {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: Text(
|
||||||
|
'Are you Confirm this item?',
|
||||||
|
),
|
||||||
|
actions: <Widget>[
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Provider.of<ItemProvider>(context,
|
||||||
|
listen: false)
|
||||||
|
.changeStatus(item!.id, "approved")
|
||||||
|
.then(
|
||||||
|
(value) {
|
||||||
|
if (value) {
|
||||||
|
print('true');
|
||||||
|
}
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
// Navigator.of(context)
|
||||||
|
// .popAndPushNamed(Routes
|
||||||
|
// .itemResultScreen);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Text('Yes'),
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
child: Text('No'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(7),
|
||||||
|
width: 8 * _deviceBlockSize,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: kBlue,
|
||||||
|
),
|
||||||
|
child: Icon(
|
||||||
|
Icons.check,
|
||||||
|
size: 4 * _deviceBlockSize,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 5.0,
|
width: 5.0,
|
||||||
),
|
),
|
||||||
@@ -304,6 +368,7 @@ class ItemItemBox extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
SizedBox(width: 4,)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -264,6 +264,33 @@ class PackageDetailsDataBox extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Divider(),
|
Divider(),
|
||||||
|
SizedBox(
|
||||||
|
height: 5,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
width: 35 * _deviceBlockSize,
|
||||||
|
child: Text(
|
||||||
|
'Status',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.grey,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 45 * _deviceBlockSize,
|
||||||
|
child: Text(
|
||||||
|
datas.status == 'approved' ? 'Confirmed' : 'Rejected',
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
color: datas.status == 'approved' ? kBlue : kPink,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.clip,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 30,
|
height: 30,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '../../../config/colors.dart';
|
||||||
import '../../../config/routes.dart';
|
import '../../../config/routes.dart';
|
||||||
|
|
||||||
class PackageItemBox extends StatelessWidget {
|
class PackageItemBox extends StatelessWidget {
|
||||||
@@ -127,7 +128,12 @@ class PackageItemBox extends StatelessWidget {
|
|||||||
// ),
|
// ),
|
||||||
userData['roles']?.contains('User') ?? false
|
userData['roles']?.contains('User') ?? false
|
||||||
? Container()
|
? Container()
|
||||||
: InkWell(
|
: userData['roles']?.contains('User') ?? false
|
||||||
|
? Container()
|
||||||
|
: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: <Widget>[
|
||||||
|
InkWell(
|
||||||
customBorder: CircleBorder(),
|
customBorder: CircleBorder(),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showDialog(
|
showDialog(
|
||||||
@@ -169,6 +175,122 @@ class PackageItemBox extends StatelessWidget {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
width: 5.0,
|
width: 5.0,
|
||||||
),
|
),
|
||||||
|
InkWell(
|
||||||
|
customBorder: CircleBorder(),
|
||||||
|
onTap: () {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: Text(
|
||||||
|
'Are you Reject this item?'
|
||||||
|
),
|
||||||
|
actions: <Widget>[
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Provider.of<PackageProvider>(context,
|
||||||
|
listen: false)
|
||||||
|
.changeStatus(item!.id, "rejected")
|
||||||
|
.then(
|
||||||
|
(value) {
|
||||||
|
if (value) {
|
||||||
|
print('true');
|
||||||
|
}
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
// Navigator.of(context)
|
||||||
|
// .popAndPushNamed(Routes
|
||||||
|
// .packageResultScreen);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Text('Yes'),
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
child: Text('No'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(7),
|
||||||
|
width: 8 * _deviceBlockSize,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: kPink
|
||||||
|
),
|
||||||
|
child: Icon(
|
||||||
|
Icons.close ,
|
||||||
|
size: 4 * _deviceBlockSize,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 5,
|
||||||
|
),
|
||||||
|
InkWell(
|
||||||
|
customBorder: CircleBorder(),
|
||||||
|
onTap: () {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: Text(
|
||||||
|
'Are you Confirm this item?',
|
||||||
|
),
|
||||||
|
actions: <Widget>[
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Provider.of<PackageProvider>(context,
|
||||||
|
listen: false)
|
||||||
|
.changeStatus(item!.id, "approved")
|
||||||
|
.then(
|
||||||
|
(value) {
|
||||||
|
if (value) {
|
||||||
|
print('true');
|
||||||
|
}
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
// Navigator.of(context)
|
||||||
|
// .popAndPushNamed(Routes
|
||||||
|
// .packageResultScreen);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Text('Yes'),
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
child: Text('No'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(7),
|
||||||
|
width: 8 * _deviceBlockSize,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: kBlue,
|
||||||
|
),
|
||||||
|
child: Icon(
|
||||||
|
Icons.check,
|
||||||
|
size: 4 * _deviceBlockSize,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 5,
|
||||||
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
customBorder: CircleBorder(),
|
customBorder: CircleBorder(),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -193,6 +315,11 @@ class PackageItemBox extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user