update to add resume app from sleep
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:rogapp/pages/destination/destination_controller.dart';
|
||||
import 'package:rogapp/pages/index/index_controller.dart';
|
||||
|
||||
class DestinationBinding extends Bindings {
|
||||
@override
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
|
||||
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:camera_camera/camera_camera.dart';
|
||||
@ -12,25 +11,19 @@ import 'package:geolocator/geolocator.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:rogapp/model/Rogaining.dart';
|
||||
import 'package:rogapp/model/destination.dart';
|
||||
import 'package:rogapp/pages/camera/camera_page.dart';
|
||||
import 'package:rogapp/pages/index/index_controller.dart';
|
||||
import 'package:rogapp/routes/app_pages.dart';
|
||||
import 'package:rogapp/services/action_service.dart';
|
||||
import 'package:rogapp/services/destination_service.dart';
|
||||
import 'package:rogapp/services/external_service.dart';
|
||||
import 'package:rogapp/services/location_line_service.dart';
|
||||
import 'package:rogapp/services/location_service.dart';
|
||||
import 'package:rogapp/services/maxtrix_service.dart';
|
||||
import 'package:rogapp/services/perfecture_service.dart';
|
||||
import 'package:rogapp/services/reacking_service.dart';
|
||||
import 'package:rogapp/utils/database_helper.dart';
|
||||
import 'package:rogapp/widgets/bottom_sheet_new.dart';
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:rogapp/widgets/bottom_sheet_widget.dart';
|
||||
import 'package:sqflite/sqlite_api.dart';
|
||||
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
|
||||
|
||||
class DestinationController extends GetxController {
|
||||
@ -51,7 +44,7 @@ class DestinationController extends GetxController {
|
||||
var is_at_start = false.obs;
|
||||
var is_at_goal = false.obs;
|
||||
var is_photo_shoot = false.obs;
|
||||
DateTime last_goal_at = DateTime.now().subtract(Duration(days:1));
|
||||
DateTime last_goal_at = DateTime.now().subtract(const Duration(days:1));
|
||||
//List<Rogaining> rogainings = <Rogaining>[].obs;
|
||||
|
||||
bool checking_in = false;
|
||||
@ -115,8 +108,8 @@ class DestinationController extends GetxController {
|
||||
void startTimerLocation(GeoJsonFeature fs, double distance) {
|
||||
print("---- in startTimer ----");
|
||||
//skip_gps = true;
|
||||
double checkin_radious = fs.properties!['checkin_radius'] ?? double.infinity;
|
||||
if(checkin_radious >= distance){
|
||||
double checkinRadious = fs.properties!['checkin_radius'] ?? double.infinity;
|
||||
if(checkinRadious >= distance){
|
||||
indexController.currentFeature.clear();
|
||||
Destination d = festuretoDestination(fs);
|
||||
for(Destination de in destinations){
|
||||
@ -135,14 +128,14 @@ class DestinationController extends GetxController {
|
||||
print("=== passed dest is ${d.location_id} ${d.checkedin} ====");
|
||||
skip_gps = true;
|
||||
print("---- in startTimer ----");
|
||||
double checkin_radious = d.checkin_radious ?? double.infinity;
|
||||
bool auto_checkin = d.auto_checkin == 0 ? false : true;
|
||||
bool location_already_checked_in = d.checkedin ?? false;
|
||||
bool isUser_logged_in = indexController.currentUser.length > 0 ? true : false;
|
||||
double checkinRadious = d.checkin_radious ?? double.infinity;
|
||||
bool autoCheckin = d.auto_checkin == 0 ? false : true;
|
||||
bool locationAlreadyCheckedIn = d.checkedin ?? false;
|
||||
bool isuserLoggedIn = indexController.currentUser.isNotEmpty ? true : false;
|
||||
//make current destination
|
||||
print("---- checkin_radious ${checkin_radious} ----");
|
||||
print("---- distance ${distance} ----");
|
||||
if(checkin_radious >= distance){
|
||||
print("---- checkin_radious $checkinRadious ----");
|
||||
print("---- distance $distance ----");
|
||||
if(checkinRadious >= distance){
|
||||
//currentSelectedDestinations.add(d);
|
||||
indexController.currentDestinationFeature.clear();
|
||||
indexController.currentDestinationFeature.add(d);
|
||||
@ -202,9 +195,9 @@ class DestinationController extends GetxController {
|
||||
}
|
||||
|
||||
print("---- location checkin radious ${d.checkin_radious} ----");
|
||||
print("---- already checked in ${location_already_checked_in} ----");
|
||||
if(checkin_radious >= distance && location_already_checked_in == false && is_in_rog.value == true){
|
||||
if(auto_checkin){
|
||||
print("---- already checked in $locationAlreadyCheckedIn ----");
|
||||
if(checkinRadious >= distance && locationAlreadyCheckedIn == false && is_in_rog.value == true){
|
||||
if(autoCheckin){
|
||||
if(!checking_in){
|
||||
print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ make checkin ${d.sub_loc_id}@@@@@@@@@@@");
|
||||
makeCheckin(d, true,"");
|
||||
@ -255,11 +248,11 @@ class DestinationController extends GetxController {
|
||||
}
|
||||
}
|
||||
print("---- cp --- ${d.cp} -----");
|
||||
print("--- at goal ${is_at_goal} ---");
|
||||
print("--- rog counted ${rogaining_counted} ---");
|
||||
print("--- loc already checked in ${location_already_checked_in} ---");
|
||||
print("--- at goal $is_at_goal ---");
|
||||
print("--- rog counted $rogaining_counted ---");
|
||||
print("--- loc already checked in $locationAlreadyCheckedIn ---");
|
||||
print("==== date diff is ${DateTime.now().difference(last_goal_at).inHours} ====");
|
||||
if(isUser_logged_in && d.cp == -1 && location_already_checked_in && skip_10s == false){
|
||||
if(isuserLoggedIn && d.cp == -1 && locationAlreadyCheckedIn && skip_10s == false){
|
||||
//check for rogaining
|
||||
if(is_at_goal.value == false && rogaining_counted.value){
|
||||
//goal
|
||||
@ -290,7 +283,7 @@ class DestinationController extends GetxController {
|
||||
});
|
||||
}
|
||||
}
|
||||
print("==== _chekcs ${chekcs} ====");
|
||||
print("==== _chekcs $chekcs ====");
|
||||
if(chekcs == 0){
|
||||
skip_gps = false;
|
||||
}
|
||||
@ -316,7 +309,7 @@ class DestinationController extends GetxController {
|
||||
int? _latgoal = await db.latestGoal();
|
||||
if(_latgoal != null){
|
||||
last_goal_at = DateTime.fromMicrosecondsSinceEpoch(_latgoal);
|
||||
print("===== last goal : ${last_goal_at} =====");
|
||||
print("===== last goal : $last_goal_at =====");
|
||||
}
|
||||
|
||||
|
||||
@ -339,7 +332,7 @@ class DestinationController extends GetxController {
|
||||
onFile: (file) {
|
||||
photos.add(file);
|
||||
Navigator.pop(context);
|
||||
print("----image file is : ${file}----");
|
||||
print("----image file is : $file----");
|
||||
//setState(() {});
|
||||
},
|
||||
)));
|
||||
@ -362,11 +355,12 @@ class DestinationController extends GetxController {
|
||||
return d;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
void checkForCheckin(double la, double ln){
|
||||
|
||||
print("--- skip_gps ---- ${skip_gps}----");
|
||||
print("--- skip_gps ---- $skip_gps----");
|
||||
|
||||
for(final d in destinations){
|
||||
|
||||
@ -376,7 +370,7 @@ class DestinationController extends GetxController {
|
||||
double lon = d.lon!;
|
||||
LatLng p = LatLng(lat, lon);
|
||||
getDestinationForLatLong(lat, lon).then((value){
|
||||
var distance = Distance();
|
||||
var distance = const Distance();
|
||||
double dist = distance.as(LengthUnit.Meter, LatLng(lat, lon), LatLng(la, ln));
|
||||
//double checkin_radious = value!.checkin_radious ?? double.infinity;
|
||||
//bool auto_checkin = value.auto_checkin == 0 ? false : true;
|
||||
@ -405,23 +399,23 @@ class DestinationController extends GetxController {
|
||||
GeoJsonMultiPoint mp = fs.geometry as GeoJsonMultiPoint;
|
||||
LatLng pt = LatLng(mp.geoSerie!.geoPoints[0].latitude, mp.geoSerie!.geoPoints[0].longitude);
|
||||
|
||||
double lat_fs = pt.latitude;
|
||||
double lon_fs = pt.longitude;
|
||||
LatLng p_fs = LatLng(lat_fs, lon_fs);
|
||||
var distance_fs = Distance();
|
||||
double dist_fs = distance_fs.as(LengthUnit.Meter, LatLng(lat_fs, lon_fs), LatLng(la, ln));
|
||||
double latFs = pt.latitude;
|
||||
double lonFs = pt.longitude;
|
||||
LatLng pFs = LatLng(latFs, lonFs);
|
||||
var distanceFs = const Distance();
|
||||
double distFs = distanceFs.as(LengthUnit.Meter, LatLng(latFs, lonFs), LatLng(la, ln));
|
||||
|
||||
if(dist_fs <= 250 && skip_gps == false){
|
||||
if(distFs <= 250 && skip_gps == false){
|
||||
//near a location
|
||||
print("---- before call startTimerLocation ----");
|
||||
startTimerLocation(fs, dist_fs);
|
||||
startTimerLocation(fs, distFs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void addToRogaining(double lat, double lon, int destination_id) async {
|
||||
void addToRogaining(double lat, double lon, int destinationId) async {
|
||||
DatabaseHelper db = DatabaseHelper.instance;
|
||||
List<Destination> d = await db.getDestinationById(destination_id);
|
||||
List<Destination> d = await db.getDestinationById(destinationId);
|
||||
if(d.isEmpty){
|
||||
Destination df = festuretoDestination(indexController.currentFeature[0]);
|
||||
print("--- made checkin ${df.location_id} ----");
|
||||
@ -443,10 +437,10 @@ class DestinationController extends GetxController {
|
||||
PopulateDestinations();
|
||||
|
||||
/// post to NATNAT
|
||||
if(indexController.currentUser.length > 0){
|
||||
double cp_num = destination.cp!;
|
||||
if(indexController.currentUser.isNotEmpty){
|
||||
double cpNum = destination.cp!;
|
||||
|
||||
int user_id = indexController.currentUser[0]["user"]["id"];
|
||||
int userId = indexController.currentUser[0]["user"]["id"];
|
||||
//print("--- Pressed -----");
|
||||
String _team = indexController.currentUser[0]["user"]['team_name'];
|
||||
//print("--- _team : ${_team}-----");
|
||||
@ -457,9 +451,9 @@ class DestinationController extends GetxController {
|
||||
DateTime now = DateTime.now();
|
||||
String formattedDate = DateFormat('yyyy-MM-dd HH:mm:ss').format(now);
|
||||
|
||||
print("------ checkin event ${_event_code} ------");
|
||||
ExternalService().makeCheckpoint(user_id, _token, formattedDate, _team,cp_num.round(), _event_code, imageurl).then((value){
|
||||
print("------Ext service check point ${value} ------");
|
||||
print("------ checkin event $_event_code ------");
|
||||
ExternalService().makeCheckpoint(userId, _token, formattedDate, _team,cpNum.round(), _event_code, imageurl).then((value){
|
||||
print("------Ext service check point $value ------");
|
||||
});
|
||||
}
|
||||
|
||||
@ -496,7 +490,7 @@ class DestinationController extends GetxController {
|
||||
showBackgroundLocationIndicator: true
|
||||
);
|
||||
} else {
|
||||
locationSettings = LocationSettings(
|
||||
locationSettings = const LocationSettings(
|
||||
accuracy: LocationAccuracy.high,
|
||||
distanceFilter: 0,
|
||||
);
|
||||
@ -513,17 +507,17 @@ class DestinationController extends GetxController {
|
||||
indexController.current_lat = position != null ? position.latitude : 0;
|
||||
current_lon = position != null ? position.longitude : 0;
|
||||
|
||||
print("==== gps skip is : ${skip_gps.toString()}, selected is ${is_gps_selected} , ${current_lat}");
|
||||
print("==== gps skip is : ${skip_gps.toString()}, selected is $is_gps_selected , $current_lat");
|
||||
|
||||
if(is_gps_selected.value){
|
||||
double czoom = indexController.rogMapController!.zoom;
|
||||
indexController.rogMapController!.move(LatLng(position!.latitude, position!.longitude), czoom);
|
||||
double czoom = indexController.rogMapController.zoom;
|
||||
indexController.rogMapController.move(LatLng(position!.latitude, position.longitude), czoom);
|
||||
//String user_id = indexController.currentUser[0]["user"]["id"].toString();
|
||||
//TrackingService.addTrack(user_id, position!.latitude, position.longitude).then((val){
|
||||
//print("---- postion is ${position.latitude}, ${position.longitude}");
|
||||
gps.clear();
|
||||
gps.add("-- lat : ${position.latitude}, lon : ${position.longitude} --");
|
||||
checkForCheckin(position!.latitude, position.longitude);
|
||||
checkForCheckin(position.latitude, position.longitude);
|
||||
print("--- call check checkin");
|
||||
print("---- skip gps is ${skip_gps.toString()} ----");
|
||||
//});
|
||||
@ -552,7 +546,7 @@ class DestinationController extends GetxController {
|
||||
@override
|
||||
void onReady() {
|
||||
Get.toNamed(AppPages.LOGIN)!.then((value){
|
||||
if(indexController.currentUser.length > 0) {
|
||||
if(indexController.currentUser.isNotEmpty) {
|
||||
fixMapBound();
|
||||
}
|
||||
else {
|
||||
@ -560,7 +554,7 @@ class DestinationController extends GetxController {
|
||||
PerfectureService.getSubExt("9").then((value){
|
||||
if(value != null){
|
||||
LatLngBounds bnds = LatLngBounds(LatLng(value[1], value[0]), LatLng(value[3], value[2]));
|
||||
indexController.mapController!.fitBounds(bnds); //.centerZoomFitBounds(bnds);
|
||||
indexController.mapController.fitBounds(bnds); //.centerZoomFitBounds(bnds);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -573,10 +567,10 @@ class DestinationController extends GetxController {
|
||||
indexController.switchPage(AppPages.INITIAL);
|
||||
LocationService.getLocationsExt(_token).then((value) {
|
||||
if(value != null){
|
||||
print("--- loc ext is - ${value} ----");
|
||||
print("--- loc ext is - $value ----");
|
||||
LatLngBounds bnds = LatLngBounds(LatLng(value[1], value[0]), LatLng(value[3], value[2]));
|
||||
print("--- bnds is - ${bnds} ----");
|
||||
indexController.mapController!.fitBounds(
|
||||
print("--- bnds is - $bnds ----");
|
||||
indexController.mapController.fitBounds(
|
||||
bnds,
|
||||
);
|
||||
indexController.currentBound.clear();
|
||||
@ -587,7 +581,7 @@ class DestinationController extends GetxController {
|
||||
}
|
||||
|
||||
void connectionChanged(String val) {
|
||||
print('----- %%%%%%%%%%%%%%%%%%%%% ----- ${val}');
|
||||
print('----- %%%%%%%%%%%%%%%%%%%%% ----- $val');
|
||||
Map<String, dynamic> _res = {};
|
||||
if(val == "wifi" || val == "mobile"){
|
||||
String _token = indexController.currentUser[0]["token"];
|
||||
@ -598,11 +592,11 @@ class DestinationController extends GetxController {
|
||||
_res = await ExternalService().StartRogaining();
|
||||
}
|
||||
else if(e.rog_action_type == 1){
|
||||
var datetime = new DateTime.fromMicrosecondsSinceEpoch(e.checkintime!);
|
||||
var datetime = DateTime.fromMicrosecondsSinceEpoch(e.checkintime!);
|
||||
_res = await ExternalService().makeCheckpoint(e.user_id!, _token, getFormatedTime(datetime), e.team_name!, e.cp_number!, e.event_code!, e.image!);
|
||||
}
|
||||
else if(e.rog_action_type == 2){
|
||||
var datetime = new DateTime.fromMicrosecondsSinceEpoch(e.checkintime!);
|
||||
var datetime = DateTime.fromMicrosecondsSinceEpoch(e.checkintime!);
|
||||
_res = await ExternalService().makeGoal(e.user_id!, _token, e.team_name!, e.image!, getFormatedTime(datetime), e.event_code!);
|
||||
}
|
||||
|
||||
@ -626,8 +620,8 @@ class DestinationController extends GetxController {
|
||||
}
|
||||
|
||||
Destination? destinationById(int id){
|
||||
Destination? d = null;
|
||||
print("--- target des - ${id} ----");
|
||||
Destination? d;
|
||||
print("--- target des - $id ----");
|
||||
for(Destination ss in destinations){
|
||||
print("--- des - ${ss.location_id} ----");
|
||||
if(ss.location_id == id){
|
||||
@ -678,7 +672,7 @@ class DestinationController extends GetxController {
|
||||
}
|
||||
else {
|
||||
db.insertDestination(dest).then((value){
|
||||
print("----- destination controller added as new ${value}--- :::::");
|
||||
print("----- destination controller added as new $value--- :::::");
|
||||
PopulateDestinations();
|
||||
});
|
||||
}
|
||||
@ -710,7 +704,7 @@ class DestinationController extends GetxController {
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (BuildContext context) {
|
||||
return Center(
|
||||
return const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
);
|
||||
});
|
||||
@ -719,7 +713,7 @@ class DestinationController extends GetxController {
|
||||
void destinationMatrixFromCurrentPoint(List<Destination> points){
|
||||
buildShowDialog(Get.context!);
|
||||
MatrixService.getDestinations(points).then((mat){
|
||||
print(" matrix is ------- ${mat}");
|
||||
print(" matrix is ------- $mat");
|
||||
matrix = mat;
|
||||
|
||||
try{
|
||||
@ -755,7 +749,7 @@ class DestinationController extends GetxController {
|
||||
destinations.add(d);
|
||||
}
|
||||
// destinationCount.value = 0;
|
||||
print("------ destination controller destinationcount-------- ${destinationCount}-------- :::::");
|
||||
print("------ destination controller destinationcount-------- $destinationCount-------- :::::");
|
||||
|
||||
|
||||
// MatrixService.getDestinations(value).then((mat){
|
||||
|
||||
@ -1,20 +1,14 @@
|
||||
import 'dart:developer';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:camera_camera/camera_camera.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:rogapp/pages/camera/camera_page.dart';
|
||||
import 'package:rogapp/pages/destination/destination_controller.dart';
|
||||
import 'package:rogapp/pages/destination_map/destination_map_page.dart';
|
||||
import 'package:rogapp/pages/drawer/drawer_page.dart';
|
||||
import 'package:rogapp/pages/index/index_controller.dart';
|
||||
import 'package:rogapp/routes/app_pages.dart';
|
||||
import 'package:rogapp/services/external_service.dart';
|
||||
import 'package:rogapp/widgets/destination_widget.dart';
|
||||
import 'package:timeline_tile/timeline_tile.dart';
|
||||
|
||||
class DestnationPage extends StatelessWidget {
|
||||
DestnationPage({Key? key}) : super(key: key);
|
||||
@ -32,13 +26,13 @@ class DestnationPage extends StatelessWidget {
|
||||
permission = await Geolocator.requestPermission();
|
||||
}
|
||||
Position position = await Geolocator.getCurrentPosition(
|
||||
desiredAccuracy: LocationAccuracy.high);
|
||||
indexController.rogMapController?.move(LatLng(position.latitude, position.longitude), 14);
|
||||
desiredAccuracy: LocationAccuracy.high, forceAndroidLocationManager: true);
|
||||
indexController.rogMapController.move(LatLng(position.latitude, position.longitude), 14);
|
||||
}
|
||||
|
||||
Image getImage(int index){
|
||||
if(destinationController.destinations[index].photos == null || destinationController.destinations[index].photos == ""){
|
||||
return Image(image: AssetImage('assets/images/empty_image.png'));
|
||||
return const Image(image: AssetImage('assets/images/empty_image.png'));
|
||||
}
|
||||
else{
|
||||
return Image(image: NetworkImage(destinationController.destinations[index].photos!));
|
||||
@ -48,21 +42,18 @@ class DestnationPage extends StatelessWidget {
|
||||
Widget getRoutingImage(int route){
|
||||
switch (route) {
|
||||
case 0:
|
||||
return Image(image: AssetImage('assets/images/p4_9_man.png'), width: 35.0,);
|
||||
return const Image(image: AssetImage('assets/images/p4_9_man.png'), width: 35.0,);
|
||||
case 1:
|
||||
return Image(image: AssetImage('assets/images/p4_8_car.png'), width: 35.0,);
|
||||
return const Image(image: AssetImage('assets/images/p4_8_car.png'), width: 35.0,);
|
||||
case 2:
|
||||
return Image(image: AssetImage('assets/images/p4_10_train.png'), width: 35.0,);
|
||||
return const Image(image: AssetImage('assets/images/p4_10_train.png'), width: 35.0,);
|
||||
default:
|
||||
return Image(image: AssetImage('assets/images/p4_9_man.png'), width: 35.0,);
|
||||
return const Image(image: AssetImage('assets/images/p4_9_man.png'), width: 35.0,);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final ColorScheme colorScheme = Theme.of(context).colorScheme;
|
||||
final Color oddItemColor = colorScheme.primary.withOpacity(0.05);
|
||||
final Color evenItemColor = colorScheme.primary.withOpacity(0.15);
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
indexController.switchPage(AppPages.INITIAL);
|
||||
@ -85,12 +76,12 @@ class DestnationPage extends StatelessWidget {
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top:30.0, bottom: 30),
|
||||
child: Center(child: Text("select_travel_mode".tr, style: TextStyle(fontSize: 22.0, color:Colors.red, fontWeight:FontWeight.bold),),),
|
||||
child: Center(child: Text("select_travel_mode".tr, style: const TextStyle(fontSize: 22.0, color:Colors.red, fontWeight:FontWeight.bold),),),
|
||||
),
|
||||
ListTile(
|
||||
selected: destinationController.travelMode == 0 ? true : false,
|
||||
selectedTileColor: Colors.amber.shade200,
|
||||
leading: Image(image: AssetImage('assets/images/p4_9_man.png'),),
|
||||
leading: const Image(image: AssetImage('assets/images/p4_9_man.png'),),
|
||||
title: Text("walking".tr),
|
||||
onTap:(){
|
||||
destinationController.travelMode.value = 0;
|
||||
@ -101,7 +92,7 @@ class DestnationPage extends StatelessWidget {
|
||||
ListTile(
|
||||
selected: destinationController.travelMode == 1 ? true : false,
|
||||
selectedTileColor: Colors.amber.shade200,
|
||||
leading: Image(image: AssetImage('assets/images/p4_8_car.png'),),
|
||||
leading: const Image(image: AssetImage('assets/images/p4_8_car.png'),),
|
||||
title: Text("driving".tr),
|
||||
onTap:(){
|
||||
destinationController.travelMode.value = 1;
|
||||
@ -149,9 +140,9 @@ class DestnationPage extends StatelessWidget {
|
||||
tooltip: 'Increment',
|
||||
child: Obx(() =>
|
||||
indexController.desination_mode == 1 ?
|
||||
Image(image: AssetImage('assets/images/list2.png'))
|
||||
const Image(image: AssetImage('assets/images/list2.png'))
|
||||
:
|
||||
Image(image: AssetImage('assets/images/map.png'))
|
||||
const Image(image: AssetImage('assets/images/map.png'))
|
||||
),
|
||||
elevation: 4.0,
|
||||
),
|
||||
@ -170,12 +161,12 @@ class DestnationPage extends StatelessWidget {
|
||||
destinationController.is_at_goal == true ?
|
||||
IconButton(
|
||||
onPressed:(){Get.toNamed(AppPages.CAMERA_PAGE);},
|
||||
icon: Icon(Icons.assistant_photo),
|
||||
icon: const Icon(Icons.assistant_photo),
|
||||
)
|
||||
:
|
||||
IconButton(
|
||||
onPressed:(){Get.toNamed(AppPages.CAMERA_PAGE);},
|
||||
icon: Icon(Icons.accessibility),
|
||||
icon: const Icon(Icons.accessibility),
|
||||
),
|
||||
),
|
||||
// Obx(() =>
|
||||
@ -185,7 +176,7 @@ class DestnationPage extends StatelessWidget {
|
||||
ToggleButtons(
|
||||
disabledColor: Colors.grey.shade200,
|
||||
selectedColor: Colors.red,
|
||||
children: <Widget>[
|
||||
children: const <Widget>[
|
||||
Icon(Icons.explore, size: 35.0,
|
||||
)],
|
||||
onPressed: (int index) {
|
||||
|
||||
Reference in New Issue
Block a user