fix : twice back press for exit application on live stock
This commit is contained in:
@@ -3,9 +3,6 @@ import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'package:rasadyar_livestock/data/repository/livestock/livestock_repository.dart';
|
||||
import 'package:rasadyar_livestock/data/repository/livestock/livestock_repository_imp.dart';
|
||||
import 'package:rasadyar_livestock/injection/live_stock_di.dart';
|
||||
import 'package:rasadyar_livestock/presentation/page/map/view.dart';
|
||||
import 'package:rasadyar_livestock/presentation/page/profile/view.dart';
|
||||
import 'package:rasadyar_livestock/presentation/page/request_tagging/view.dart';
|
||||
@@ -14,9 +11,13 @@ import 'package:rasadyar_livestock/presentation/routes/app_pages.dart';
|
||||
|
||||
class RootLogic extends GetxController {
|
||||
List<Widget> pages = [
|
||||
MapPage(),
|
||||
Navigator(
|
||||
key: Get.nestedKey(0),
|
||||
onGenerateRoute: (settings) => GetPageRoute(page: () => MapPage()),
|
||||
),
|
||||
|
||||
Navigator(
|
||||
key: Get.nestedKey(1),
|
||||
initialRoute: LiveStockRoutes.requests,
|
||||
onGenerateRoute: (settings) {
|
||||
switch (settings.name) {
|
||||
@@ -30,7 +31,10 @@ class RootLogic extends GetxController {
|
||||
},
|
||||
),
|
||||
|
||||
ProfilePage(),
|
||||
Navigator(
|
||||
key: Get.nestedKey(2),
|
||||
onGenerateRoute: (settings) => GetPageRoute(page: () => ProfilePage()),
|
||||
),
|
||||
];
|
||||
|
||||
RxInt currentIndex = 0.obs;
|
||||
@@ -48,7 +52,7 @@ class RootLogic extends GetxController {
|
||||
}
|
||||
});
|
||||
|
||||
/* GetIt.instance.allReady().then((value) async {
|
||||
/* GetIt.instance.allReady().then((value) async {
|
||||
await diLiveStock.get<LivestockRepositoryImp>().addLocations(generateRandomPoints());
|
||||
});*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user