|
|
|
|
@ -436,8 +436,10 @@ class _CreateTRAFRequestPageState extends State<CreateTRAFRequestPage> {
|
|
|
|
|
trafRequest?.trafContacts = userBasedOnSearch.map((item) => TrafContacts(id: 0, trafId: 0, name: item.userName, userId: item.userId)).toList();
|
|
|
|
|
|
|
|
|
|
Utils.showLoading(context);
|
|
|
|
|
await Provider.of<TrafRequestProvider>(context, listen: false).addTraf(trafRequest!.toJson());
|
|
|
|
|
bool isSuccess = await Provider.of<TrafRequestProvider>(context, listen: false).addTraf(trafRequest!.toJson());
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
if (isSuccess) {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|