bookmark and cards changes done
This commit is contained in:
parent
cd141bfcb4
commit
cfe5b5bf20
@ -15,12 +15,12 @@ if (localPropertiesFile.exists()) {
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
|
||||
if (flutterVersionCode == null) {
|
||||
flutterVersionCode = "26"
|
||||
flutterVersionCode = "27"
|
||||
}
|
||||
|
||||
def flutterVersionName = localProperties.getProperty("flutter.versionName")
|
||||
if (flutterVersionName == null) {
|
||||
flutterVersionName = "1.0.25"
|
||||
flutterVersionName = "1.0.26"
|
||||
}
|
||||
|
||||
def keystorePropertiesFile = rootProject.file("key.properties")
|
||||
|
||||
@ -1,4 +1,9 @@
|
||||
{
|
||||
"all_bookmarks":"كل العلامات المرجعية",
|
||||
"economy_title":" الاقتصاد",
|
||||
"social_title":"اجتماعي",
|
||||
"environment_title":"البيئة",
|
||||
"bookmarks": "الإشارات المرجعية",
|
||||
"feedback_title": "تعليق",
|
||||
"feedback_failed_msg": "لم يتم إرسال تعليقاتك. يرجى المحاولة مرة أخرى.",
|
||||
"thankYou": "شكراً",
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
{
|
||||
|
||||
|
||||
"feedback_title": "Feedback",
|
||||
"all_bookmarks":"All Bookmarks",
|
||||
"economy_title":"Economy",
|
||||
"social_title":"Social",
|
||||
"environment_title":"Environment",
|
||||
"bookmarks": "Bookmarks",
|
||||
"feedback_title": "Feedback",
|
||||
"feedback_failed_msg": "Your feedback could not be \n submitted. Please try again",
|
||||
"thankYou": "Thank you",
|
||||
"feedback_message": "For your valuable feedback, we truly appreciate your input!",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -34,7 +34,7 @@ class ChartWidget extends StatelessWidget {
|
||||
}
|
||||
|
||||
String formatNumberConversion(
|
||||
double value, String chartConversion, String numberFormat) {
|
||||
double value, String chartConversion, String numberFormat,) {
|
||||
// Convert the input value to base unit (actual value)
|
||||
double baseValue = value;
|
||||
|
||||
@ -175,16 +175,15 @@ class ChartWidget extends StatelessWidget {
|
||||
message: title, // Full text on hover
|
||||
child: ConstrainedBox(
|
||||
// Constrain width to allow wrapping
|
||||
constraints: BoxConstraints(maxWidth: 130),
|
||||
constraints: BoxConstraints(maxWidth: 200),
|
||||
child: Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
),
|
||||
softWrap: true,
|
||||
maxLines: 2,
|
||||
overflow:
|
||||
TextOverflow.ellipsis, // Ensures text doesn't overflow
|
||||
// softWrap: true,
|
||||
// maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis, // Ensures text doesn't overflow
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -365,31 +364,39 @@ class ChartWidget extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
SizedBox(height: 105),
|
||||
SizedBox(height: 45),
|
||||
Expanded(
|
||||
// child: SingleChildScrollView(
|
||||
// scrollDirection: Axis.horizontal,
|
||||
//
|
||||
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.vertical,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
constraints:
|
||||
BoxConstraints(minHeight: 3), // Allow dynamic height
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 0.0, right: 0.0, bottom: 8.0, top: 1.0),
|
||||
child: Wrap(
|
||||
spacing: 2,
|
||||
runSpacing: 5,
|
||||
children:
|
||||
generateIndicators(chartData, chartData['group_by']),
|
||||
// child: SingleChildScrollView(
|
||||
// scrollDirection: Axis.vertical,
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
constraints:
|
||||
BoxConstraints(minHeight: 3), // Allow dynamic height
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 2.0, right: 2.0, bottom: 8.0, top: 1.0),
|
||||
child: Column( // Change Row to Column
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: generateIndicators(chartData, chartData['group_by']),
|
||||
),
|
||||
|
||||
|
||||
// child: Wrap(
|
||||
// spacing: 2,
|
||||
// runSpacing: 5,
|
||||
// children:
|
||||
// generateIndicators(chartData, chartData['group_by']),
|
||||
// ),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// ),
|
||||
],
|
||||
);
|
||||
case 'fl_stacked_bar':
|
||||
@ -568,10 +575,11 @@ class ChartWidget extends StatelessWidget {
|
||||
),
|
||||
textStyle: TextStyle(color: Colors.white),
|
||||
child: Text(
|
||||
group.length > 10
|
||||
? '${group.substring(0, 10)}...'
|
||||
: group,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
group,
|
||||
// group.length > 10
|
||||
// ? '${group.substring(0, 10)}...'
|
||||
// : group,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(fontSize: 11),
|
||||
),
|
||||
)
|
||||
@ -2227,7 +2235,11 @@ class ChartWidget extends StatelessWidget {
|
||||
_lastFormattedValue = formattedValue;
|
||||
|
||||
// print('formattedValueLine - $formattedValue');
|
||||
return Text(formattedValue, style: TextStyle(fontSize: 10));
|
||||
return Text(formattedValue, textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
|
||||
));
|
||||
}
|
||||
return const SizedBox.shrink();
|
||||
|
||||
@ -2374,8 +2386,7 @@ class ChartWidget extends StatelessWidget {
|
||||
width: 20,
|
||||
// width: barWidth,
|
||||
borderRadius: BorderRadius.zero,
|
||||
color:
|
||||
Colors.black // This will act as a container for stacked items
|
||||
color: Colors.black // This will act as a container for stacked items
|
||||
),
|
||||
],
|
||||
);
|
||||
@ -2636,4 +2647,4 @@ class ChartData {
|
||||
final String? x;
|
||||
final double y;
|
||||
final DateTime? xDateTime;
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:uae_stat/domain/use_cases/language.dart';
|
||||
@ -11,6 +12,7 @@ import 'package:uae_stat/infrastructure/services/img_asset_paths/icons/uae_numbe
|
||||
import 'package:uae_stat/presentation/components/indicators/locale_provider.dart';
|
||||
import 'package:uae_stat/presentation/routes/drawer_routes/custom_drawer_routes.dart';
|
||||
|
||||
|
||||
class BookMark extends ConsumerStatefulWidget {
|
||||
const BookMark({super.key});
|
||||
|
||||
@ -27,18 +29,20 @@ class _BookMarkState extends ConsumerState<BookMark> {
|
||||
int selectedTabIndex = 0;
|
||||
|
||||
// Tab categories
|
||||
final List<String> tabs = [
|
||||
'All Bookmarks',
|
||||
'Economy',
|
||||
'Social',
|
||||
'Environment',
|
||||
];
|
||||
// final List<String> tabs = [
|
||||
// 'All Bookmarks',
|
||||
// 'Economy',
|
||||
// 'Social',
|
||||
// 'Environment',
|
||||
// ];
|
||||
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
final locale = ref.read(localeProvider);
|
||||
fetchBookmarks(locale?.languageCode ?? 'en');
|
||||
|
||||
}
|
||||
|
||||
String colorToHex(Color color) {
|
||||
@ -263,6 +267,18 @@ class _BookMarkState extends ConsumerState<BookMark> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
final List<String> tabs = [
|
||||
AppLocalizations.of(context)!.all_bookmarks,
|
||||
AppLocalizations.of(context)!.economy_title,
|
||||
AppLocalizations.of(context)!.social_title,
|
||||
AppLocalizations.of(context)!.environment_title,
|
||||
];
|
||||
|
||||
ref.listen<Locale?>(localeProvider, (previous, next) {
|
||||
final localeCode = next?.languageCode ?? 'en'; // Default to 'en' if null
|
||||
fetchBookmarks(localeCode);
|
||||
});
|
||||
|
||||
List<Map<String, dynamic>> bookmarks = dataList.where((item) => item['isBookmark'] == true).toList();
|
||||
List<Map<String, dynamic>> filteredBookmarks = dataList
|
||||
.where((bookmark) =>
|
||||
@ -271,7 +287,7 @@ class _BookMarkState extends ConsumerState<BookMark> {
|
||||
|
||||
print('filtered $filteredBookmarks');
|
||||
return BaseScaffold(
|
||||
title: Text('Bookmarks'),
|
||||
title: Text(AppLocalizations.of(context)!.bookmarks,),
|
||||
body: Column(
|
||||
children: [
|
||||
TabBarHeader(
|
||||
@ -498,4 +514,4 @@ class TabBarHeader extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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.25+26
|
||||
version: 1.0.26+27
|
||||
|
||||
environment:
|
||||
sdk: ">=3.2.3 <4.0.0"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user