This commit is contained in:
Odein
2023-11-22 14:53:35 +04:30
parent 22d0390e90
commit cd3b1080f5
298 changed files with 800 additions and 413 deletions
+24 -22
View File
@@ -41,28 +41,30 @@ class _FormPageState extends State<FormPage> {
setState(() {
_isLoading = true;
});
prvObject.createTestResult(values, batchId).then((result) {
setState(() {
_isLoading = false;
});
if (result == 'done') {
showDialog(
context: context,
builder: (ctx) => AlertDialog(
content: Text('Test added.'),
actions: <Widget>[
TextButton(
onPressed: () {
Navigator.of(ctx).pop();
},
child: Text('Ok'),
)
],
),
).then((value) =>
Navigator.of(context).popAndPushNamed(Routes.testResultScreen));
}
});
prvObject.createTestResult(values, batchId).then(
(result) {
setState(() {
_isLoading = false;
});
if (result == 'done') {
showDialog(
context: context,
builder: (ctx) => AlertDialog(
content: Text('Test added.'),
actions: <Widget>[
TextButton(
onPressed: () {
Navigator.of(ctx).pop();
},
child: Text('Ok'),
)
],
),
).then((value) =>
Navigator.of(context).popAndPushNamed(Routes.testResultScreen));
}
},
);
}
}