From 080e2368e97c258d3195fb94f947283fc077eba1 Mon Sep 17 00:00:00 2001 From: SurendarSuri30 Date: Tue, 15 Apr 2025 17:01:20 +0530 Subject: [PATCH] bhavin feedback changes done --- android/app/build.gradle | 4 +- .../Screens/charts/screens/chart_screen.dart | 12 +- .../Screens/charts/widgets/chart_widget.dart | 108 +++++++++--------- .../tab_routes/home_route.dart | 63 +++++----- .../drawer_routes/custom_drawer_routes.dart | 18 +-- pubspec.yaml | 2 +- 6 files changed, 106 insertions(+), 101 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index ef810cea..57abf0e2 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -20,12 +20,12 @@ if (project.hasProperty('google-services.json')) { def flutterVersionCode = localProperties.getProperty("flutter.versionCode") if (flutterVersionCode == null) { - flutterVersionCode = "49" + flutterVersionCode = "50" } def flutterVersionName = localProperties.getProperty("flutter.versionName") if (flutterVersionName == null) { - flutterVersionName = "1.0.48" + flutterVersionName = "1.0.49" } def keystorePropertiesFile = rootProject.file("key.properties") diff --git a/lib/presentation/Screens/charts/screens/chart_screen.dart b/lib/presentation/Screens/charts/screens/chart_screen.dart index d7e06d53..fc022837 100644 --- a/lib/presentation/Screens/charts/screens/chart_screen.dart +++ b/lib/presentation/Screens/charts/screens/chart_screen.dart @@ -2256,15 +2256,15 @@ class _ChartScreen1State extends ConsumerState { mainTopic, style: TextStyle( color: Colors.white, - fontSize: 26, - fontWeight: FontWeight.w400, + fontSize: 28, + fontWeight: FontWeight.w600, fontFamily: 'Roboto'), ), Container( width: mywidth / 7, height: 1.5, child: Divider( - thickness: 3, + thickness: 4, color: Colors.white, )), Text( @@ -2273,7 +2273,7 @@ class _ChartScreen1State extends ConsumerState { style: TextStyle( color: Colors.white, fontSize: 20, - fontWeight: FontWeight.w400, + fontWeight: FontWeight.w500, fontFamily: 'Roboto'), ), ], @@ -2838,7 +2838,7 @@ class CardWidget extends StatelessWidget { elevation: 2, child: Container( // height: cardHeight, - height: 175, + height: 158 , padding: const EdgeInsets.only( left: 16.0, right: 16.0, bottom: 2.0, top: 1.0), decoration: BoxDecoration( @@ -2969,7 +2969,7 @@ class CardWidget extends StatelessWidget { elevation: 0, // Remove shadow to keep only the outli child: Container( - height: 175, + height: 158, padding: const EdgeInsets.all(10.0), // padding: const EdgeInsets.only( // left: 10.0, right: 10.0, bottom: 5.0, top: 1.0), diff --git a/lib/presentation/Screens/charts/widgets/chart_widget.dart b/lib/presentation/Screens/charts/widgets/chart_widget.dart index 7bc408f8..70d8fec2 100644 --- a/lib/presentation/Screens/charts/widgets/chart_widget.dart +++ b/lib/presentation/Screens/charts/widgets/chart_widget.dart @@ -276,6 +276,14 @@ class ChartWidget extends StatelessWidget { ) { debugPrint('Chart Data: ${jsonEncode(chartData)}'); + // var groupByKeyValue; + // if (chartData['chart_type_json']['chart_type'] == 'bar_chart_horizontal' || + // chartData['chart_type_json']['chart_type'] == 'horizontal_rotate') { + // groupByKeyValue = chartData['chart_type_json']['y_group'] ?? ''; + // } else { + // groupByKeyValue = chartData['chart_type_json']['x_group'] ?? ''; + // } + return chartData['response'].asMap().entries.map(( entry, ) { @@ -285,6 +293,7 @@ class ChartWidget extends StatelessWidget { // Handle different types: int, double, and String double value = 0.0; var rawValue = data['ObsValue']['Value']; + // String title = data['ObsKey'][groupByKeyValue] ?? ''; if (rawValue is String) { value = double.tryParse(rawValue) ?? 0.0; @@ -1172,27 +1181,27 @@ class ChartWidget extends StatelessWidget { ), ), ), - Padding( - padding: const EdgeInsets.all(8.0), - child: Wrap( - spacing: 12, - runSpacing: 8, - children: groupByValues.map((group) { - return Row( - mainAxisSize: MainAxisSize.min, - children: [ - Container( - width: 12, - height: 12, - color: groupColorMap[group], - ), - SizedBox(width: 6), - Text(group, style: TextStyle(fontSize: 14)), - ], - ); - }).toList(), - ), - ), + // Padding( + // padding: const EdgeInsets.all(8.0), + // child: Wrap( + // spacing: 12, + // runSpacing: 8, + // children: groupByValues.map((group) { + // return Row( + // mainAxisSize: MainAxisSize.min, + // children: [ + // Container( + // width: 12, + // height: 12, + // color: groupColorMap[group], + // ), + // SizedBox(width: 6), + // Text(group, style: TextStyle(fontSize: 14)), + // ], + // ); + // }).toList(), + // ), + // ), ], ); case 'line_trend_population': @@ -1749,20 +1758,21 @@ class ChartWidget extends StatelessWidget { top: 8.0, left: 75.0, ), - child: SizedBox( - width: - 60, // Limit width to force wrapping + // child: SizedBox( + // width: + // 60, // Limit width to force wrapping child: Transform.rotate( // angle: -0.5, angle: -1.5, - child: TooltipTheme( + child: TooltipTheme( data: TooltipThemeData( decoration: BoxDecoration( - color: Colors.blueGrey[ - 800], // Change background color + color: Colors + .black, // Change background color + // color: Colors.blueGrey[800], // Change background color borderRadius: - BorderRadius.circular( + BorderRadius.circular( 8, ), // Optional: rounded corners ), @@ -1770,40 +1780,24 @@ class ChartWidget extends StatelessWidget { color: Colors.white, ), // Change text color ), - child: TooltipTheme( - data: TooltipThemeData( - decoration: BoxDecoration( - color: Colors - .black, // Change background color - // color: Colors.blueGrey[800], // Change background color - borderRadius: - BorderRadius.circular( - 8, - ), // Optional: rounded corners - ), - textStyle: TextStyle( - color: Colors.white, - ), // Change text color - ), - child: Tooltip( - message: title, - child: Text( - // title, - displayTitle, - softWrap: true, - textAlign: - TextAlign.right, - style: TextStyle( - fontSize: 10, - ), - overflow: - TextOverflow.ellipsis, + child: Tooltip( + message: title, + child: Text( + // title, + displayTitle, + softWrap: true, + textAlign: + TextAlign.right, + style: TextStyle( + fontSize: 10, ), + overflow: + TextOverflow.ellipsis, ), ), ), ), - ), + // ), ); } return Container(); diff --git a/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart b/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart index 4863716d..449c2934 100644 --- a/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart +++ b/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart @@ -1258,7 +1258,7 @@ class EconomyStatsState extends ConsumerState { ), ), SizedBox( - height: myheight / 4.8, // Set dynamic height + height: myheight / 4.5, // Set dynamic height child: Container( key: mainTopic['main_topic'] == firstMainTopic ? cardsKey @@ -1488,13 +1488,13 @@ class InfoCard extends StatelessWidget { '/chartScreen/$dataset?bgColor=$colorPattern&mainTopic=$encodedMainTopic&title=$encodedTitle&key=$encodedKey'); }, child: Container( - height: myheight / 12, + height: myheight / 10.9, width: mywidth / 4, margin: const EdgeInsets.symmetric(horizontal: 8), // padding: const EdgeInsets.all(10), - padding: const EdgeInsets.only(bottom: 1, top: 1, left: 10, right: 10), + padding: const EdgeInsets.only(bottom: 0.5, top: 1, left: 10, right: 10), decoration: BoxDecoration( border: Border.all(color: bordercolor), borderRadius: BorderRadius.circular(8), @@ -1527,37 +1527,48 @@ class InfoCard extends StatelessWidget { Text( title, style: const TextStyle( - // fontSize: 11, - fontSize: 12, + fontSize: 11, fontWeight: FontWeight.w400, + letterSpacing: 0, // color: Colors.black, fontFamily: 'Roboto', color: Color(0xFF000000), ), ), const SizedBox(height: 0.3), - - Flexible( - fit: FlexFit.loose, - child: FittedBox( - fit: BoxFit.contain, - child: Column( - children: [ - Text( - subtitle, - textAlign: TextAlign.center, - style: const TextStyle( - // fontSize: 11, - fontSize: 12 * 1.1, - fontFamily: 'Roboto', - fontWeight: FontWeight.w400, - color: Color(0xFF8E8E8E), - ), - ), - ], - ), + Text( + subtitle, + textAlign: TextAlign.center, + style: const TextStyle( + fontSize: 11, + // fontSize: 12 * 1.1, + fontFamily: 'Roboto', + fontWeight: FontWeight.w400, + color: Color(0xFF8E8E8E), ), ), + + // Flexible( + // fit: FlexFit.loose, + // child: FittedBox( + // fit: BoxFit.contain, + // child: Column( + // children: [ + // Text( + // subtitle, + // textAlign: TextAlign.center, + // style: const TextStyle( + // // fontSize: 11, + // fontSize: 12 * 1.1, + // fontFamily: 'Roboto', + // fontWeight: FontWeight.w400, + // color: Color(0xFF8E8E8E), + // ), + // ), + // ], + // ), + // ), + // ), const SizedBox(height: 1), // Flexible( @@ -1568,7 +1579,7 @@ class InfoCard extends StatelessWidget { Text( value, style: TextStyle( - fontSize: 18, + fontSize: 26, fontWeight: FontWeight.w900, fontFamily: 'Roboto', color: textcolor ?? Colors.black, diff --git a/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart b/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart index e0da5e82..bc418db7 100644 --- a/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart +++ b/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart @@ -747,7 +747,7 @@ class _BaseScaffoldState extends ConsumerState { scrolledUnderElevation: 0, titleSpacing: 0, backgroundColor: widget.appbarColor ?? Colors.white, - leadingWidth: widget.showBackButton ? mywidth * 0.25 : null, + leadingWidth: widget.showBackButton ? mywidth * 0.18 : null, bottom: widget.showDivider ? PreferredSize( preferredSize: Size.fromHeight(1), // Height of the line @@ -1073,8 +1073,8 @@ class _BaseScaffoldState extends ConsumerState { color: _getSelectedIndex(currentRoute) == 0 ? Colors.black : Color(0xFF989898), - width: 20, - height: 20, + width: 23.98, + height: 25, ), ), // label: 'Home', @@ -1090,8 +1090,8 @@ class _BaseScaffoldState extends ConsumerState { color: _getSelectedIndex(currentRoute) == 1 ? Colors.black : Color(0xFF989898), - width: 20, - height: 20, + width: 23.98, + height: 25, ), ), // label: 'UAE Numbers' @@ -1106,8 +1106,8 @@ class _BaseScaffoldState extends ConsumerState { color: _getSelectedIndex(currentRoute) == 2 ? Colors.black : Color(0xFF989898), - width: 20, - height: 20, + width: 23.98, + height: 25, ), ), // label: 'Competitiveness', @@ -1122,8 +1122,8 @@ class _BaseScaffoldState extends ConsumerState { color: _getSelectedIndex(currentRoute) == 3 ? Colors.black : Color(0xFF989898), - width: 20, - height: 20, + width: 23.98, + height: 25, ), ), // label: 'Country Profile', diff --git a/pubspec.yaml b/pubspec.yaml index a1a71148..e5e67abd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: uae_stat description: "View statistics about the UAE from the Federal Center for Statistics and Competitiveness." publish_to: "none" -version: 1.0.48+49 +version: 1.0.49+50 environment: sdk: ">=3.2.3 <4.0.0"