From 1ead8bf85132b3cdc0980e5ba493882b8fca424b Mon Sep 17 00:00:00 2001 From: Hieu Bui Date: Mon, 30 Dec 2024 10:03:33 +0700 Subject: [PATCH] Hide unused buttons --- lib/pages/home/home.dart | 4 ++++ lib/pages/home/home_view.dart | 11 +++++------ lib/pages/profile/profile.dart | 22 +++++++++++----------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/lib/pages/home/home.dart b/lib/pages/home/home.dart index 2c47cdb1..b7b2c722 100644 --- a/lib/pages/home/home.dart +++ b/lib/pages/home/home.dart @@ -743,6 +743,10 @@ class HomeController extends State loggy.info('handleGetCurrentLocationSuccess(): success'); if (success is GetCurrentLocationSuccess) { currentLocationNotifier.value = success; + mapController.move( + convertLocationDataToLatLng(success.currentLocation), + HomeViewStyles.initialZoom, + ); } else { currentLocationNotifier.value = const GetCurrentLocationIsEmpty(); } diff --git a/lib/pages/home/home_view.dart b/lib/pages/home/home_view.dart index 36fbea35..cef0113b 100644 --- a/lib/pages/home/home_view.dart +++ b/lib/pages/home/home_view.dart @@ -4,7 +4,6 @@ import 'package:ecoparking_flutter/domain/state/markers/find_nearby_parkings_sta import 'package:ecoparking_flutter/domain/state/markers/get_current_location_state.dart'; import 'package:ecoparking_flutter/pages/home/home.dart'; import 'package:ecoparking_flutter/pages/home/home_view_styles.dart'; -import 'package:ecoparking_flutter/pages/home/widgets/rounded_button/rounded_button.dart'; import 'package:ecoparking_flutter/pages/home/widgets/search_parking/search_parking_anchor.dart'; import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; @@ -82,11 +81,11 @@ class HomePageView extends StatelessWidget { controller: controller, searchController: controller.searchController, ), - const SizedBox(width: HomeViewStyles.topButtonSpacing), - RoundedButton( - icon: Icons.notifications_none_rounded, - onPressed: controller.onNotificationPressed, - ), + // const SizedBox(width: HomeViewStyles.topButtonSpacing), + // RoundedButton( + // icon: Icons.notifications_none_rounded, + // onPressed: controller.onNotificationPressed, + // ), ], ), ), diff --git a/lib/pages/profile/profile.dart b/lib/pages/profile/profile.dart index b48dc4f3..74f4d646 100644 --- a/lib/pages/profile/profile.dart +++ b/lib/pages/profile/profile.dart @@ -94,17 +94,17 @@ class ProfileController extends State leftIcon: Icons.person_outline_rounded, onTap: _onEditProfile, ), - SettingButtonArguments( - title: 'Notification', - leftIcon: Icons.notifications_outlined, - onTap: () { - loggy.info('Notification'); - NavigationUtils.navigateTo( - context: context, - path: AppPaths.testPage, - ); - }, - ), + // SettingButtonArguments( + // title: 'Notification', + // leftIcon: Icons.notifications_outlined, + // onTap: () { + // loggy.info('Notification'); + // NavigationUtils.navigateTo( + // context: context, + // path: AppPaths.testPage, + // ); + // }, + // ), SettingButtonArguments( title: 'Logout', leftIcon: Icons.logout,