add slide to stock and cleanup
This commit is contained in:
parent
b892cc485f
commit
1222f15766
5 changed files with 17 additions and 39 deletions
|
|
@ -52,7 +52,6 @@ class _AddStockPageState extends State<AddStockPage> with WidgetsBindingObserver
|
|||
|
||||
Future<bool> _getMedicinesCache() async {
|
||||
final cache = await cacheGetMedicineList(context);
|
||||
print('cache: $cache');
|
||||
|
||||
if (cache.isNotEmpty) {
|
||||
_medicineList = cache;
|
||||
|
|
@ -65,7 +64,6 @@ class _AddStockPageState extends State<AddStockPage> with WidgetsBindingObserver
|
|||
|
||||
void autoRun() async {
|
||||
final medicines = await _getMedicinesCache();
|
||||
print('medicines: $medicines');
|
||||
|
||||
if (!medicines) {
|
||||
if (await InternetConnectionChecker.instance.hasConnection) {
|
||||
|
|
@ -75,7 +73,7 @@ class _AddStockPageState extends State<AddStockPage> with WidgetsBindingObserver
|
|||
showNotification(context, 'Error: No Internet Connection', false);
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
context.push('/main');
|
||||
context.pop();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue