update for routing
This commit is contained in:
@ -3,6 +3,7 @@ import 'dart:ui';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:rogapp/model/destination.dart';
|
||||
import 'package:rogapp/pages/destination/destination_controller.dart';
|
||||
import 'package:rogapp/pages/drawer/drawer_page.dart';
|
||||
import 'package:rogapp/pages/index/index_controller.dart';
|
||||
import 'package:rogapp/routes/app_pages.dart';
|
||||
@ -19,6 +20,7 @@ class IndexPage extends GetView<IndexController> {
|
||||
IndexPage({Key? key}) : super(key: key);
|
||||
|
||||
final IndexController indexController = Get.find<IndexController>();
|
||||
final DestinationController destinationController = Get.find<DestinationController>();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -59,13 +61,31 @@ class IndexPage extends GetView<IndexController> {
|
||||
),
|
||||
bottomNavigationBar: BottomAppBar(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
Expanded(child: Container(width: 0, height: 0,),),
|
||||
const Expanded(child: Text('')),
|
||||
Expanded(child: IconButton(icon: const Icon(Icons.travel_explore), onPressed: (){
|
||||
indexController.switchPage(AppPages.TRAVEL);
|
||||
}),),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 10.0, top: 4.0, bottom: 4.0),
|
||||
child: InkWell(
|
||||
child:
|
||||
Obx(() =>
|
||||
destinationController.isSelected == true ?
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 10.0, top: 4.0, bottom: 4.0),
|
||||
child: InkWell(
|
||||
child: Image(image: AssetImage('assets/images/route3_off.png'), width: 35, height: 35,),
|
||||
onTap: (){Get.toNamed(AppPages.DESTINATION_MAP);},
|
||||
),
|
||||
) :
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 10.0, top: 4.0, bottom: 4.0),
|
||||
child: InkWell(
|
||||
child: Image(image: AssetImage('assets/images/route2_on.png'),width: 35, height: 35,),
|
||||
onTap: (){Get.toNamed(AppPages.DESTINATION_MAP);},
|
||||
),
|
||||
)
|
||||
)
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -78,7 +98,12 @@ class IndexPage extends GetView<IndexController> {
|
||||
|
||||
},
|
||||
tooltip: 'Increment',
|
||||
child: const Icon(Icons.document_scanner),
|
||||
child: Obx(() =>
|
||||
indexController.mode == 0 ?
|
||||
Image(image: AssetImage('assets/images/list2.png'))
|
||||
:
|
||||
Image(image: AssetImage('assets/images/map.png')),
|
||||
),
|
||||
elevation: 4.0,
|
||||
),
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
|
||||
|
||||
Reference in New Issue
Block a user