diff --git a/lib/presentation/Screens/charts/chart.dart b/lib/presentation/Screens/charts/chart.dart index a4a3084e..5c35d379 100644 --- a/lib/presentation/Screens/charts/chart.dart +++ b/lib/presentation/Screens/charts/chart.dart @@ -1033,51 +1033,51 @@ // }); // } // -[ -{ -chart_heading :"Guest Nights by Region" -chart_type :"fl_stacked_bar" -dataset :"hotels" -group_by :"GUEST_REGION" -is_chart :"true" -kpi :"hotel_occupancy_rate_chart_1" -main_id :"economy" -response:[ -{ -"ObsKey": { -"FREQ": "A", -"GUEST_REGION": "AF", -"H_INDICATOR": "GUN", -"H_TYPE": "_Z", -"MEASURE": "H", -"REF_AREA": "AE", -"SOURCE_DETAIL": "FCSC", -"TIME_PERIOD": "2016", -"UNIT_MEASURE": "NUMBER" -}, -"ObsValue": { -"Value": "2659446" -} -}, -{ -"ObsKey": { -"FREQ": "A", -"GUEST_REGION": "OC", -"H_INDICATOR": "GUN", -"H_TYPE": "_Z", -"MEASURE": "H", -"REF_AREA": "AE", -"SOURCE_DETAIL": "FCSC", -"TIME_PERIOD": "2018", -"UNIT_MEASURE": "NUMBER" -}, -"ObsValue": { -"Value": "1127282" -} -} - -] -sub_id :"tourism" -url :"https://releaseeuaestat.fcsc.gov.ae/rest/data/FCSA,DF_GUEST_REGION,4.3.0/...A..GUN.OTH+OC+AF+EC+AM+AC+ASC+GCC+UAE.?startPeriod=2016&dimensionAtObservation=AllDimensions" -} -] +// [ +// { +// chart_heading :"Guest Nights by Region" +// chart_type :"fl_stacked_bar" +// dataset :"hotels" +// group_by :"GUEST_REGION" +// is_chart :"true" +// kpi :"hotel_occupancy_rate_chart_1" +// main_id :"economy" +// response:[ +// { +// "ObsKey": { +// "FREQ": "A", +// "GUEST_REGION": "AF", +// "H_INDICATOR": "GUN", +// "H_TYPE": "_Z", +// "MEASURE": "H", +// "REF_AREA": "AE", +// "SOURCE_DETAIL": "FCSC", +// "TIME_PERIOD": "2016", +// "UNIT_MEASURE": "NUMBER" +// }, +// "ObsValue": { +// "Value": "2659446" +// } +// }, +// { +// "ObsKey": { +// "FREQ": "A", +// "GUEST_REGION": "OC", +// "H_INDICATOR": "GUN", +// "H_TYPE": "_Z", +// "MEASURE": "H", +// "REF_AREA": "AE", +// "SOURCE_DETAIL": "FCSC", +// "TIME_PERIOD": "2018", +// "UNIT_MEASURE": "NUMBER" +// }, +// "ObsValue": { +// "Value": "1127282" +// } +// } +// +// ] +// sub_id :"tourism" +// url :"https://releaseeuaestat.fcsc.gov.ae/rest/data/FCSA,DF_GUEST_REGION,4.3.0/...A..GUN.OTH+OC+AF+EC+AM+AC+ASC+GCC+UAE.?startPeriod=2016&dimensionAtObservation=AllDimensions" +// } +// ] diff --git a/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart b/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart index b8f7f0a4..5bdb2c9f 100644 --- a/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart +++ b/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart @@ -1,13 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; -import 'package:uae_stat/presentation/components/my_toggle.dart'; -import 'package:uae_stat/presentation/components/indicators/locale_provider.dart'; -import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:pocketbase/pocketbase.dart'; import 'package:shared_preferences/shared_preferences.dart'; -class BaseScaffold extends ConsumerWidget { +class BaseScaffold extends StatefulWidget { final Widget body; final Widget title; final bool? showBackButton; @@ -102,54 +98,10 @@ class _BaseScaffoldState extends State { } @override - Widget build(BuildContext context ,WidgetRef ref) { - final locale = ref.watch(localeProvider); - final localeNotifier = ref.read(localeProvider.notifier); - // Get the current route to highlight the active item + Widget build(BuildContext context) { String currentRoute = GoRouterState.of(context).matchedLocation; double myheight = MediaQuery.of(context).size.height; double mywidth = MediaQuery.of(context).size.width; - return Scaffold( - appBar: AppBar(title: title, backgroundColor : appbarColor,actions: [ - // IconButton(onPressed: () {}, icon: Icon(Icons.toggle_off_outlined)), - MyToggle(isOn: locale?.languageCode == 'en', - knobTextWhenOn: 'ع', - knobTextWhenOff: 'EN', - pathColorWhenOn: Colors.grey.shade300, - pathColorWhenOff: Colors.grey.shade300, - onTap: (){ - ref.read(localeProvider.notifier).toggleLocale(); - },), - ], - leading: - // Stack( - // children: [ - // // Show the back button if showBackButton is true, otherwise show the drawer menu - // if (showBackButton == true) - // Positioned( - // left: 0, - // child: IconButton( - // color: Colors.white, - // icon: Icon(Icons.arrow_back_ios_new), - // onPressed: () { - // Navigator.of(context).pop(); - // }, - // ), - // ), - // // Show the drawer icon in all cases - // Positioned( - // right: 0, - // child: IconButton( - // color: (showBackButton == true)? Colors.white : Colors.black, - // icon: Icon(Icons.menu), - // onPressed: () { - // // Open the drawer using the Scaffold context - // Scaffold.of(context).openDrawer(); - // }, - // ), - // ), - // ], - // ), return Scaffold( appBar: AppBar(