final with gas Stations and navigation to then
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get_storage/get_storage.dart';
|
||||
|
||||
import '../login/login_view.dart';
|
||||
import '../graph/graph_view.dart';
|
||||
import '../../data/models/tank_model.dart';
|
||||
import '../../data/repository/appwrite_repository.dart';
|
||||
import '../../pages/tank/tank_view.dart';
|
||||
import '../graph/graph_view.dart';
|
||||
import '../login/login_view.dart';
|
||||
import '../../pages/gaslist/gaslist_view.dart';
|
||||
|
||||
class TanklistController extends GetxController {
|
||||
final _dataBox = GetStorage('MyUserStorage');
|
||||
@@ -159,5 +159,9 @@ class TanklistController extends GetxController {
|
||||
print('$title: $message');
|
||||
}
|
||||
|
||||
void goToGasView() {}
|
||||
Future<void> goToGasView() async {
|
||||
//Go to Gas Station List Page
|
||||
await Get.offAndToNamed(GaslistPage.namedRoute);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,14 +24,14 @@ class TanklistPage extends GetView<TanklistController> {
|
||||
icon: Icon(Icons.add_chart, color: Colors.grey.shade300),
|
||||
onPressed: () async {
|
||||
// Handle go to Chart View
|
||||
tankListCtrl.goToGasView();
|
||||
tankListCtrl.goToChartView();
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(Icons.local_gas_station_sharp, color: Colors.grey.shade300),
|
||||
onPressed: () async {
|
||||
// Handle go to Chart View
|
||||
tankListCtrl.goToChartView();
|
||||
tankListCtrl.goToGasView();
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
|
||||
Reference in New Issue
Block a user