diff --git a/lib/config/my_router.dart b/lib/config/my_router.dart index ff86d055..95f6bddb 100644 --- a/lib/config/my_router.dart +++ b/lib/config/my_router.dart @@ -355,7 +355,7 @@ final GoRouter router = GoRouter( // ), GoRoute( path: '/', - redirect: (context, state) async => await _checkSession(), + redirect: (context, state) async => await _checkSession(), ), GoRoute( path: '/internetcheck', diff --git a/lib/infrastructure/services/InternetConnectivity_Service/InternetConnectivityService.dart b/lib/infrastructure/services/InternetConnectivity_Service/InternetConnectivityService.dart index d175feb2..5e1e930c 100644 --- a/lib/infrastructure/services/InternetConnectivity_Service/InternetConnectivityService.dart +++ b/lib/infrastructure/services/InternetConnectivity_Service/InternetConnectivityService.dart @@ -1,32 +1,98 @@ -import 'package:flutter_riverpod/flutter_riverpod.dart'; -import 'package:connectivity_plus/connectivity_plus.dart'; +// // import 'package:flutter_riverpod/flutter_riverpod.dart'; +// // import 'package:connectivity_plus/connectivity_plus.dart'; +// // +// // class ConnectivityService { +// // final Connectivity _connectivity = Connectivity(); +// // +// // // This will hold the connectivity status +// // Stream> get connectivityStream => +// // _connectivity.onConnectivityChanged; +// // } +// // +// // // The provider that will provide the connectivity service +// // final connectivityServiceProvider = Provider((ref) { +// // return ConnectivityService(); +// // }); +// // +// // // StateNotifier to manage connectivity state +// // class ConnectivityNotifier extends StateNotifier { +// // final ConnectivityService _connectivityService; +// // +// // ConnectivityNotifier(this._connectivityService) : super(true) { +// // _connectivityService.connectivityStream.listen((result) { +// // state = result != ConnectivityResult.none; +// // }); +// // } +// // } +// // +// // // The provider for the connectivity state +// // final connectivityProvider = StateNotifierProvider((ref) { +// // final connectivityService = ref.read(connectivityServiceProvider); +// // return ConnectivityNotifier(connectivityService); +// // }); +// +// +// import 'package:flutter_riverpod/flutter_riverpod.dart'; +// import 'package:connectivity_plus/connectivity_plus.dart'; +// +// final connectivityProvider = StateNotifierProvider((ref) { +// return ConnectivityNotifier(); +// }); +// +// class ConnectivityNotifier extends StateNotifier { +// ConnectivityNotifier() : super(true) { +// _checkInitialConnection(); +// _listenToConnectivityChanges(); +// } +// +// void _checkInitialConnection() async { +// final result = await Connectivity().checkConnectivity(); +// state = _hasInternet(result); +// } +// +// void _listenToConnectivityChanges() { +// Connectivity().onConnectivityChanged.listen((ConnectivityResult result) { +// state = _hasInternet(result); +// }); +// } +// +// bool _hasInternet(ConnectivityResult result) { +// return result == ConnectivityResult.mobile || result == ConnectivityResult.wifi; +// } +// } +// +// -class ConnectivityService { - final Connectivity _connectivity = Connectivity(); - - // This will hold the connectivity status - Stream> get connectivityStream => - _connectivity.onConnectivityChanged; -} - -// The provider that will provide the connectivity service -final connectivityServiceProvider = Provider((ref) { - return ConnectivityService(); -}); - -// StateNotifier to manage connectivity state -class ConnectivityNotifier extends StateNotifier { - final ConnectivityService _connectivityService; - - ConnectivityNotifier(this._connectivityService) : super(true) { - _connectivityService.connectivityStream.listen((result) { - state = result != ConnectivityResult.none; - }); - } -} - -// The provider for the connectivity state -final connectivityProvider = StateNotifierProvider((ref) { - final connectivityService = ref.read(connectivityServiceProvider); - return ConnectivityNotifier(connectivityService); -}); +// import 'package:flutter_riverpod/flutter_riverpod.dart'; +// import 'package:connectivity_plus/connectivity_plus.dart'; +// +// final connectivityProvider = StateNotifierProvider((ref) { +// return ConnectivityNotifier(); +// }); +// +// class ConnectivityNotifier extends StateNotifier { +// ConnectivityNotifier() : super(true) { +// _checkInitialConnection(); +// _listenToConnectivityChanges(); +// } +// +// void _checkInitialConnection() async { +// final result = await Connectivity().checkConnectivity(); +// state = _hasInternet(result); +// } +// +// void _listenToConnectivityChanges() { +// // For mobile platforms, use the connectivity plugin +// +// // Listen for connectivity changes on web +// Connectivity().onConnectivityChanged.listen((ConnectivityResult result) { +// state = _hasInternet(result); +// }); +// } +// +// +// +// bool _hasInternet(ConnectivityResult result) { +// return result == ConnectivityResult.mobile || result == ConnectivityResult.wifi; +// } +// } diff --git a/lib/main.dart b/lib/main.dart index 4500ffd5..d58dbe2d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,20 +2,95 @@ import 'package:external_repos/external_repos.dart'; import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:go_router/go_router.dart'; import 'package:uae_stat/config/injector.dart'; import 'package:uae_stat/config/my_router.dart'; import 'package:uae_stat/config/my_theme.dart'; import 'package:uae_stat/config/old_theme.dart'; import 'package:uae_stat/domain/entities/language_locale.dart'; import 'package:uae_stat/domain/use_cases/auth_use_case.dart'; +import 'package:uae_stat/infrastructure/services/InternetConnectivity_Service/InternetConnectivityService.dart'; +import 'package:uae_stat/presentation/Screens/online_offline_verification/internet_check.dart'; import 'package:uae_stat/presentation/Screens/profilepage.dart'; import 'package:uae_stat/presentation/Screens/auth_verification/registration.dart'; import 'package:uae_stat/presentation/components/indicators/locale_provider.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; +// void main() async { +// WidgetsFlutterBinding.ensureInitialized(); +// // await (await SharedPreferences.getInstance()).clear(); +// configureDependencies(); +// runApp( +// const ProviderScope( +// child: MainApp(), +// ), +// ); +// } +// +// class MainApp extends ConsumerWidget { +// const MainApp({super.key}); +// +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// final locale = ref.watch(localeProvider); +// +// return MaterialApp.router( +// debugShowCheckedModeBanner: false, +// routerConfig: router, +// locale: locale, +// localizationsDelegates: AppLocalizations.localizationsDelegates, +// supportedLocales: AppLocalizations.supportedLocales,// Use the GoRouter instance from app_router.dart +// ); +// } +// } + + + +// void main() async { +// WidgetsFlutterBinding.ensureInitialized(); +// // await (await SharedPreferences.getInstance()).clear(); +// configureDependencies(); +// runApp( +// const ProviderScope( +// child: MainApp(), +// ), +// ); +// } +// +// class MainApp extends ConsumerWidget { +// const MainApp({super.key}); +// +// @override +// Widget build(BuildContext context, WidgetRef ref) { +// final locale = ref.watch(localeProvider); +// +// // Listen to connectivity changes at the app level +// ref.listen(connectivityProvider, (previous, hasInternet) { +// if (previous != null && !hasInternet) { +// // When no internet, navigate to the NoInternetScreen +// print('No Internet Connection'); +// context.go('/internetcheck'); +// +// } else if (previous != null && hasInternet) { +// // If internet is back, navigate back to the HomeScreen +// print("You have an Internet connection"); +// context.go('/myhomepage'); +// +// } +// }); +// +// return MaterialApp.router( +// debugShowCheckedModeBanner: false, +// routerConfig: router, // Assuming you are using GoRouter +// locale: locale, +// localizationsDelegates: AppLocalizations.localizationsDelegates, +// supportedLocales: AppLocalizations.supportedLocales, +// ); +// } +// } + void main() async { WidgetsFlutterBinding.ensureInitialized(); - // await (await SharedPreferences.getInstance()).clear(); configureDependencies(); runApp( const ProviderScope( @@ -31,86 +106,35 @@ class MainApp extends ConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final locale = ref.watch(localeProvider); + // ref.listen(connectivityProvider, (previous, hasInternet) { + // print('Previous Internet Status: $previous'); + // print('Current Internet Status: $hasInternet'); + // if (previous != null && hasInternet != previous) { + // handleConnectivityChange(context, hasInternet); + // } + // }); + return MaterialApp.router( debugShowCheckedModeBanner: false, routerConfig: router, locale: locale, localizationsDelegates: AppLocalizations.localizationsDelegates, - supportedLocales: AppLocalizations.supportedLocales,// Use the GoRouter instance from app_router.dart + supportedLocales: AppLocalizations.supportedLocales, ); } + + void handleConnectivityChange(BuildContext context, bool hasInternet) { + //final currentPath = GoRouter.of(context).location; + final currentPath = GoRouter.of(context).routerDelegate.currentConfiguration.fullPath; + if (!hasInternet && currentPath != '/internetcheck') { + print("Status : Not connected"); + context.go('/internetcheck'); + } else if (hasInternet && currentPath != '/login') { + print("Status : Internet connected"); + context.go('/login'); + } + } } -// class MainApp extends StatelessWidget { -// const MainApp({super.key}); -// -// @override -// Widget build(BuildContext context) { -// return MaterialApp( -// home: RegisterScreen(), -// //home: ProfileScreen(), -// debugShowCheckedModeBanner: false, -// ); -// } -// } - -// class MainApp extends ConsumerWidget { -// const MainApp({super.key}); -// -// @override -// Widget build( -// BuildContext context, -// WidgetRef ref, -// ) { -// const loading = Material( -// child: Center( -// child: CircularProgressIndicator(), -// ), -// ); -// // waits to load preferences (language) -// // from local storage -// final languageFinalizedWidget = ref -// .watch( -// routerProvider, -// ) -// .when( -// loading: () => loading, -// error: Error.throwWithStackTrace, -// data: (data) { -// final materialApp = MaterialApp.router( -// debugShowCheckedModeBanner: false, -// routerConfig: data, -// supportedLocales: LanguageLocale.values.map( -// (e) => e.toLocale(), -// ), -// localizationsDelegates: GlobalMaterialLocalizations.delegates, -// theme: ThemeData.from( -// colorScheme: ColorScheme.fromSeed( -// seedColor: MyTheme.topicColor( -// IndicatorTopic.economy, -// ), -// ), -// textTheme: OldTheme.textTheme, -// ), -// ); -// return ColoredBox( -// color: Colors.white, -// child: materialApp, -// ); -// }, -// ); -// // waits to load auth from local storage -// final authFinalizedWidget = ref -// .watch( -// authUseCaseProvider, -// ) -// .when( -// loading: () => loading, -// error: Error.throwWithStackTrace, -// data: (data) => languageFinalizedWidget, -// ); -// return authFinalizedWidget; -// } -// } diff --git a/lib/presentation/Screens/auth_verification/registration.dart b/lib/presentation/Screens/auth_verification/registration.dart index e8008c78..cd1babd9 100644 --- a/lib/presentation/Screens/auth_verification/registration.dart +++ b/lib/presentation/Screens/auth_verification/registration.dart @@ -480,538 +480,566 @@ class _RegisterScreenState extends State { ], ), ) - : Padding( - padding: const EdgeInsets.only( - top: 5.0, bottom: 20, left: 30, right: 30), - child: Form( - key: _formKey, - child: SingleChildScrollView( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox(height: screenheight / 60), - Text( - // 'Register', - AppLocalizations.of(context)!.register_title, - style: TextStyle( - fontSize: 32, fontWeight: FontWeight.w400), + : Form( + key: _formKey, + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height: screenheight / 60), + Text( + // 'Register', + AppLocalizations.of(context)!.register_title, + style: TextStyle( + fontSize: 32, fontWeight: FontWeight.w400), + ), + SizedBox(height: 10), + Text(AppLocalizations.of(context)!.register_details), + + SizedBox(height: 20), + // Display this if registration is pending approval + Padding( + padding: const EdgeInsets.only( + top: 5.0, bottom: 10, left: 30, right: 30), + child: TextFormField( + controller: _usernameController, + // focusNode: _focusNodes[0], + decoration: InputDecoration( + // hintText: _showHints[0] ? 'Username' : null, + hintText: _showHints[0] + ? AppLocalizations.of(context)!.register_name + : null, + prefixIconConstraints: const BoxConstraints( + maxWidth: 25 + 16 + 10, + maxHeight: 25 + (8 * 2), + ), + prefixIcon: Padding( + padding: const EdgeInsetsDirectional.only( + start: 16, + end: 10, + ), + child: Image.asset( + MiscIconAssetPath.person, + fit: BoxFit.fitHeight, + height: 25, + width: 25, + color: + MyTheme.topicColor(IndicatorTopic.economy) + .shade300, + ), + ), + + // prefixIcon: Icon( + // Icons.person, + // color: Color(0xFF90B0D5), + // + // ), + // border: OutlineInputBorder(), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: MyTheme.topicColor( + IndicatorTopic.economy) + .shade400, + width: 1), // Enabled border + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: Colors.deepPurple, + width: 2), // Focused border + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: 1), // Error border + ), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: 1), // Match the error color + ), + counterText: '', + hintStyle: TextStyle(color: Color(0xFFC3C6CB)), ), - SizedBox(height: 10), - Text(AppLocalizations.of(context)!.register_details), - - SizedBox(height: 20), - // Display this if registration is pending approval - TextFormField( - controller: _usernameController, - // focusNode: _focusNodes[0], - decoration: InputDecoration( - // hintText: _showHints[0] ? 'Username' : null, - hintText: _showHints[0] - ? AppLocalizations.of(context)!.register_name - : null, - prefixIconConstraints: const BoxConstraints( - maxWidth: 25 + 16 + 10, - maxHeight: 25 + (8 * 2), + validator: _validateUsername, + maxLength: + 40, // Set the maximum length to 20 characters + maxLengthEnforcement: MaxLengthEnforcement.enforced, + ), + ), + SizedBox(height: 15), + Padding( + padding: const EdgeInsets.only( + top: 5.0, bottom: 10, left: 30, right: 30), + child: TextFormField( + controller: _emailController, + // focusNode: _focusNodes[1], + decoration: InputDecoration( + // hintText: 'Enter your email', + hintText: _showHints[1] + ? AppLocalizations.of(context)! + .enter_your_email + : null, + // _showHints[1] ? 'Enter your email' : null, + prefixIconConstraints: const BoxConstraints( + maxWidth: 25 + 16 + 10, + maxHeight: 25 + (8 * 2), + ), + prefixIcon: Padding( + padding: const EdgeInsetsDirectional.only( + start: 16, + end: 10, ), - prefixIcon: Padding( - padding: const EdgeInsetsDirectional.only( - start: 16, - end: 10, - ), - child: Image.asset( - MiscIconAssetPath.person, - fit: BoxFit.fitHeight, - height: 25, - width: 25, - color: - MyTheme.topicColor(IndicatorTopic.economy) - .shade300, - ), + child: Image.asset( + MiscIconAssetPath.vector, + fit: BoxFit.fitHeight, + height: 20, + width: 25, + color: + MyTheme.topicColor(IndicatorTopic.economy) + .shade100, ), + ), - // prefixIcon: Icon( - // Icons.person, - // color: Color(0xFF90B0D5), - // + // border: OutlineInputBorder(), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: MyTheme.topicColor( + IndicatorTopic.economy) + .shade400, + width: 1), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: Colors.deepPurple, + width: 2), // Focused border + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: 1), // Error border + ), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: 1), // Match the error color + ), + counterText: '', + hintStyle: TextStyle(color: Color(0xFFC3C6CB)), + ), + validator: _validateEmail, + maxLength: 320, + maxLengthEnforcement: MaxLengthEnforcement.enforced, + inputFormatters: [ + LengthLimitingTextInputFormatter( + 320), // Limit to 320 characters + ], + ), + ), + SizedBox(height: 15), + Padding( + padding: const EdgeInsets.only( + top: 5.0, bottom: 10, left: 30, right: 30), + child: TextFormField( + controller: _passwordController, + // focusNode: _focusNodes[2], + obscureText: _obscurePassword, + decoration: InputDecoration( + hintText: _showHints[2] + ? AppLocalizations.of(context)! + .enter_your_password + : null, + // _showHints[2] ? 'Enter your password' : null, + prefixIconConstraints: const BoxConstraints( + maxWidth: 25 + 16 + 10, + maxHeight: 25 + (8 * 2), + ), + prefixIcon: Padding( + padding: const EdgeInsetsDirectional.only( + start: 16, + end: 10, + ), + child: Image.asset( + MiscIconAssetPath.lock, + fit: BoxFit.fitHeight, + height: 25, + width: 25, + color: + MyTheme.topicColor(IndicatorTopic.economy) + .shade300, + ), + ), + + // prefixIcon: Icon( + // Icons.lock, + // color: Color(0xFF90B0D5), + // ), + suffixIcon: IconButton( + // icon: Icon( + // _obscurePassword + // ? Icons.visibility_off + // : Icons.visibility, + // color: Color(0xFF9EA2A9), // ), - // border: OutlineInputBorder(), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: MyTheme.topicColor( - IndicatorTopic.economy) - .shade400, - width: 1), // Enabled border + + icon: Image.asset( + _obscurePassword + ? MiscIconAssetPath.visibilityOff + : MiscIconAssetPath.visibleOn, + + color: Color( + 0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly. + width: 24, + height: 24, ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: Colors.deepPurple, - width: 2), // Focused border - ), - errorBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: 1), // Error border - ), - focusedErrorBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: 1), // Match the error color - ), - counterText: '', - hintStyle: TextStyle(color: Color(0xFFC3C6CB)), + + onPressed: () { + setState(() { + _obscurePassword = !_obscurePassword; + }); + }, ), - validator: _validateUsername, - maxLength: - 40, // Set the maximum length to 20 characters - maxLengthEnforcement: MaxLengthEnforcement.enforced, - ), - SizedBox(height: 15), - TextFormField( - controller: _emailController, - // focusNode: _focusNodes[1], - decoration: InputDecoration( - // hintText: 'Enter your email', - hintText: _showHints[1] - ? AppLocalizations.of(context)! - .enter_your_email - : null, - // _showHints[1] ? 'Enter your email' : null, - prefixIconConstraints: const BoxConstraints( - maxWidth: 25 + 16 + 10, - maxHeight: 25 + (8 * 2), - ), - prefixIcon: Padding( - padding: const EdgeInsetsDirectional.only( - start: 16, - end: 10, - ), - child: Image.asset( - MiscIconAssetPath.vector, - fit: BoxFit.fitHeight, - height: 20, - width: 25, - color: - MyTheme.topicColor(IndicatorTopic.economy) - .shade100, - ), - ), - - // border: OutlineInputBorder(), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: MyTheme.topicColor( - IndicatorTopic.economy) - .shade400, - width: 1), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: Colors.deepPurple, - width: 2), // Focused border - ), - errorBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: 1), // Error border - ), - focusedErrorBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: 1), // Match the error color - ), - counterText: '', - hintStyle: TextStyle(color: Color(0xFFC3C6CB)), + // border: OutlineInputBorder(), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: MyTheme.topicColor( + IndicatorTopic.economy) + .shade400, + width: 1), ), - validator: _validateEmail, - maxLength: 320, - maxLengthEnforcement: MaxLengthEnforcement.enforced, - inputFormatters: [ - LengthLimitingTextInputFormatter( - 320), // Limit to 320 characters - ], - ), - SizedBox(height: 15), - TextFormField( - controller: _passwordController, - // focusNode: _focusNodes[2], - obscureText: _obscurePassword, - decoration: InputDecoration( - hintText: _showHints[2] - ? AppLocalizations.of(context)! - .enter_your_password - : null, - // _showHints[2] ? 'Enter your password' : null, - prefixIconConstraints: const BoxConstraints( - maxWidth: 25 + 16 + 10, - maxHeight: 25 + (8 * 2), - ), - prefixIcon: Padding( - padding: const EdgeInsetsDirectional.only( - start: 16, - end: 10, - ), - child: Image.asset( - MiscIconAssetPath.lock, - fit: BoxFit.fitHeight, - height: 25, - width: 25, - color: - MyTheme.topicColor(IndicatorTopic.economy) - .shade300, - ), - ), - - // prefixIcon: Icon( - // Icons.lock, - // color: Color(0xFF90B0D5), - // ), - suffixIcon: IconButton( - // icon: Icon( - // _obscurePassword - // ? Icons.visibility_off - // : Icons.visibility, - // color: Color(0xFF9EA2A9), - // ), - - icon: Image.asset( - _obscurePassword - ? MiscIconAssetPath.visibilityOff - : MiscIconAssetPath.visibleOn, - - color: Color( - 0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly. - width: 24, - height: 24, - ), - - onPressed: () { - setState(() { - _obscurePassword = !_obscurePassword; - }); - }, - ), - // border: OutlineInputBorder(), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: MyTheme.topicColor( - IndicatorTopic.economy) - .shade400, - width: 1), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: Colors.deepPurple, - width: 2), // Focused border - ), - errorBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: 1), // Error border - ), - focusedErrorBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: 1), // Match the error color - ), - - counterText: '', - hintStyle: TextStyle(color: Color(0xFFC3C6CB)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: Colors.deepPurple, + width: 2), // Focused border ), - validator: _validatePassword, - maxLength: 40, - maxLengthEnforcement: MaxLengthEnforcement.enforced, - ), - SizedBox(height: 15), - TextFormField( - controller: _confirmpasswordController, - // focusNode: _focusNodes[3], - obscureText: _obscureConfirmPassword, - decoration: InputDecoration( - hintText: _showHints[3] - ? AppLocalizations.of(context)! - .register_Confirm_password - : null, - // _showHints[3] ? 'Confirm password' : null, - prefixIconConstraints: const BoxConstraints( - maxWidth: 25 + 16 + 10, - maxHeight: 25 + (8 * 2), - ), - prefixIcon: Padding( - padding: const EdgeInsetsDirectional.only( - start: 16, - end: 10, - ), - child: Image.asset( - MiscIconAssetPath.lock, - fit: BoxFit.fitHeight, - height: 25, - width: 25, - color: - MyTheme.topicColor(IndicatorTopic.economy) - .shade300, - ), - ), - - suffixIcon: IconButton( - icon: Image.asset( - _obscureConfirmPassword - ? MiscIconAssetPath.visibilityOff - : MiscIconAssetPath.visibleOn, - - color: Color( - 0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly. - width: 24, - height: 24, - ), - onPressed: () { - setState(() { - _obscureConfirmPassword = - !_obscureConfirmPassword; - }); - }, - ), - // border: OutlineInputBorder( - // borderSide: BorderSide(color: Colors.blue, width: 2), // Default border color - // ), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: MyTheme.topicColor( - IndicatorTopic.economy) - .shade400, - width: 1), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: Colors.deepPurple, - width: 2), // Focused border - ), - errorBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: 1), // Error border - ), - focusedErrorBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: 1), // Match the error color - ), - counterText: '', - hintStyle: TextStyle(color: Color(0xFFC3C6CB)), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: 1), // Error border ), - validator: _validateConfirmPassword, - maxLength: 40, - maxLengthEnforcement: MaxLengthEnforcement.enforced, - inputFormatters: [ - LengthLimitingTextInputFormatter( - 64), // Limit to 40 characters - ], + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: 1), // Match the error color + ), + + counterText: '', + hintStyle: TextStyle(color: Color(0xFFC3C6CB)), ), - SizedBox(height: 10), - Row( - children: [ - Checkbox( - value: isChecked, - onChanged: (value) { - setState(() { - isChecked = value ?? false; - showError = false; - }); - }, - side: BorderSide( - color: showError - ? Color(0xFFD83731) - : Color(0xFF92722A), - width: 1, - ), + validator: _validatePassword, + maxLength: 40, + maxLengthEnforcement: MaxLengthEnforcement.enforced, + ), + ), + SizedBox(height: 15), + Padding( + padding: const EdgeInsets.only( + top: 5.0, bottom: 10, left: 30, right: 30), + child: TextFormField( + controller: _confirmpasswordController, + // focusNode: _focusNodes[3], + obscureText: _obscureConfirmPassword, + decoration: InputDecoration( + hintText: _showHints[3] + ? AppLocalizations.of(context)! + .register_Confirm_password + : null, + // _showHints[3] ? 'Confirm password' : null, + prefixIconConstraints: const BoxConstraints( + maxWidth: 25 + 16 + 10, + maxHeight: 25 + (8 * 2), + ), + prefixIcon: Padding( + padding: const EdgeInsetsDirectional.only( + start: 16, + end: 10, ), - Expanded( - child: Text.rich( - TextSpan( - text: AppLocalizations.of(context)!.agree, - // text: 'I agree to ', - children: [ - TextSpan( - text: AppLocalizations.of(context)! - .terms_conditions, - // text: 'Terms & Conditions', - style: TextStyle( - fontWeight: FontWeight.bold, - color: Color(0xFF648CBA), - // Makes the text bold - decoration: - TextDecoration.underline, - decorationColor: Color(0xFF648CBA), - decorationThickness: 1), - ), - TextSpan( - text: AppLocalizations.of(context)! - .t_and), - TextSpan( - text: AppLocalizations.of(context)! - .privacy_policy, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 14, - fontFamily: 'Roboto', - color: Color(0xFF648CBA), - decoration: - TextDecoration.underline, - decorationColor: Color(0xFF648CBA), - decorationThickness: 1), - ), - TextSpan( - text: AppLocalizations.of(context)! - .conditions), - ], - ), - ), + child: Image.asset( + MiscIconAssetPath.lock, + fit: BoxFit.fitHeight, + height: 25, + width: 25, + color: + MyTheme.topicColor(IndicatorTopic.economy) + .shade300, ), - ], + ), + + suffixIcon: IconButton( + icon: Image.asset( + _obscureConfirmPassword + ? MiscIconAssetPath.visibilityOff + : MiscIconAssetPath.visibleOn, + + color: Color( + 0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly. + width: 24, + height: 24, + ), + onPressed: () { + setState(() { + _obscureConfirmPassword = + !_obscureConfirmPassword; + }); + }, + ), + // border: OutlineInputBorder( + // borderSide: BorderSide(color: Colors.blue, width: 2), // Default border color + // ), + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: MyTheme.topicColor( + IndicatorTopic.economy) + .shade400, + width: 1), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: Colors.deepPurple, + width: 2), // Focused border + ), + errorBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: 1), // Error border + ), + focusedErrorBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: 1), // Match the error color + ), + counterText: '', + hintStyle: TextStyle(color: Color(0xFFC3C6CB)), ), - if (showError) - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only(left: 10.0), - child: Text( - 'Please agree to terms and conditions.', - style: TextStyle( - color: Color(0xFFb22222), - fontSize: 12, + validator: _validateConfirmPassword, + maxLength: 40, + maxLengthEnforcement: MaxLengthEnforcement.enforced, + inputFormatters: [ + LengthLimitingTextInputFormatter( + 64), // Limit to 40 characters + ], + ), + ), + SizedBox(height: 10), + Padding( + padding: const EdgeInsets.only( + top: 1.0, bottom: 10, left: 25, right: 30), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Checkbox( + value: isChecked, + onChanged: (value) { + setState(() { + isChecked = value ?? false; + showError = false; + }); + }, + side: BorderSide( + color: showError + ? Color(0xFFD83731) + : Color(0xFF7DAFBC), + width: 1, + ), + ), + Expanded( + child: Text.rich( + TextSpan( + text: AppLocalizations.of(context)!.agree, + // text: 'I agree to ', + children: [ + TextSpan( + text: AppLocalizations.of(context)! + .terms_conditions, + // text: 'Terms & Conditions', + style: TextStyle( + fontWeight: FontWeight.bold, + color: Color(0xFF985400), + // Makes the text bold + decoration: + TextDecoration.underline, + decorationColor: Color(0xFF985400), + decorationThickness: 1), ), - ), + TextSpan( + text: AppLocalizations.of(context)! + .t_and), + TextSpan( + text: AppLocalizations.of(context)! + .privacy_policy, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 14, + fontFamily: 'Roboto', + color: Color(0xFF985400), + decoration: + TextDecoration.underline, + decorationColor: Color(0xFF648CBA), + decorationThickness: 1), + ), + TextSpan( + text: AppLocalizations.of(context)! + .conditions), + ], ), + ), + ), + ], + ), + ), + if (showError) + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(left: 30.0), + child: Text( + 'Required', + style: TextStyle( + color: Color(0xFFb22222), + fontSize: 12, + ), + ), + ), + ], + ), + SizedBox(height: 20), + Padding( + padding: const EdgeInsets.only( + top: 5.0, bottom: 10, left: 30, right: 30), + child: SizedBox( + width: screenwidth / 1, + child: ElevatedButton( + onPressed: isRegistering ? null : _registerUser, + style: ElevatedButton.styleFrom( + backgroundColor: Color( + 0xFFA7887A), // Brownish color for Register + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + ), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + // "Register", + AppLocalizations.of(context)! + .register_title, + style: TextStyle( + fontSize: 16, color: Colors.white), + ), + SizedBox(width: 8), + const Icon( + Icons.chevron_right_outlined, + color: Colors + .white, // Set your desired color here + ) ], ), - SizedBox(height: 20), - SizedBox( - width: screenwidth / 1, - child: ElevatedButton( - onPressed: isRegistering ? null : _registerUser, - style: ElevatedButton.styleFrom( - backgroundColor: Color( - 0xFFA7887A), // Brownish color for Register - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10), - ), - ), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - // "Register", - AppLocalizations.of(context)! - .register_title, - style: TextStyle( - fontSize: 16, color: Colors.white), - ), - SizedBox(width: 8), - const Icon( - Icons.chevron_right_outlined, - color: Colors - .white, // Set your desired color here - ) - ], - ), - ), ), - SizedBox(height: 15), - Text( - AppLocalizations.of(context)!.account_confirmation, - style: TextStyle( - fontSize: 14, color: Colors.grey[600]), - ), - SizedBox(height: 15), - SizedBox( - width: screenwidth / 1, - child: ElevatedButton( - onPressed: () { - context.go('/'); - }, - style: ElevatedButton.styleFrom( - backgroundColor: Color( - 0xFF82AFCB), // Blueish color for Login - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10), - ), - ), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - AppLocalizations.of(context)!.login_title, - style: TextStyle( - fontSize: 16, color: Colors.white), - ), - SizedBox(width: 8), - const Icon( - Icons.chevron_right_outlined, - color: Colors - .white, // Set your desired color here - ) - ], - ), - - // child: GestureDetector( - // onTap: () { - // // Navigate to LoginRoute - // context.go('/'); - // }, - // child: Row( - // mainAxisSize: MainAxisSize.min, - // children: [ - // Text( - // "Login", - // style: TextStyle( - // fontSize: 16, - // color: Colors.white, - // ), - // ), - // SizedBox(width: 8), - // Icon(Icons.arrow_forward, - // color: Colors.white), - // ], - // ), - // ), - ), - ), - SizedBox( - height: 10, - ), - Center( - child: Container( - height: screenheight / 16, - width: screenwidth / 2.5, - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage( - "assets/splash_screen/logo.png"), // Background image asset - fit: BoxFit.fill, - ), - ), - )) - ], + ), ), - ), + SizedBox(height: 15), + Text( + AppLocalizations.of(context)!.account_confirmation, + style: TextStyle( + fontSize: 14, color: Colors.grey[600]), + ), + SizedBox(height: 15), + Padding( + padding: const EdgeInsets.only( + top: 5.0, bottom: 10, left: 30, right: 30), + child: SizedBox( + width: screenwidth / 1, + child: ElevatedButton( + onPressed: () { + context.go('/'); + }, + style: ElevatedButton.styleFrom( + backgroundColor: Color( + 0xFF82AFCB), // Blueish color for Login + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), + ), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + AppLocalizations.of(context)!.login_title, + style: TextStyle( + fontSize: 16, color: Colors.white), + ), + SizedBox(width: 8), + const Icon( + Icons.chevron_right_outlined, + color: Colors + .white, // Set your desired color here + ) + ], + ), + + // child: GestureDetector( + // onTap: () { + // // Navigate to LoginRoute + // context.go('/'); + // }, + // child: Row( + // mainAxisSize: MainAxisSize.min, + // children: [ + // Text( + // "Login", + // style: TextStyle( + // fontSize: 16, + // color: Colors.white, + // ), + // ), + // SizedBox(width: 8), + // Icon(Icons.arrow_forward, + // color: Colors.white), + // ], + // ), + // ), + ), + ), + ), + SizedBox( + height: 10, + ), + Center( + child: Container( + height: screenheight / 16, + width: screenwidth / 3, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage( + "assets/splash_screen/logo.png"), // Background image asset + fit: BoxFit.fill, + ), + ), + )), + SizedBox( + height: 20, + ), + ], ), ), + ), ); } } diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 2feedeb3..cee82ebe 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -12,7 +12,6 @@ import package_info_plus import path_provider_foundation import share_plus import shared_preferences_foundation -import sqflite_darwin import url_launcher_macos import video_player_avfoundation import webview_flutter_wkwebview @@ -25,8 +24,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) - SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin")) - FLTWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "FLTWebViewFlutterPlugin")) + WebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "WebViewFlutterPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index 99484f5b..10d21d20 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" + sha256: "88399e291da5f7e889359681a8f64b18c5123e03576b01f32a6a276611e511c3" url: "https://pub.dev" source: hosted - version: "76.0.0" + version: "78.0.0" _macros: dependency: transitive description: dart @@ -18,18 +18,18 @@ packages: dependency: transitive description: name: analyzer - sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" + sha256: "62899ef43d0b962b056ed2ebac6b47ec76ffd003d5f7c4e4dc870afe63188e33" url: "https://pub.dev" source: hosted - version: "6.11.0" + version: "7.1.0" analyzer_plugin: dependency: transitive description: name: analyzer_plugin - sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161" + sha256: "1d460d14e3c2ae36dc2b32cef847c4479198cf87704f63c3c3c8150ee50c3916" url: "https://pub.dev" source: hosted - version: "0.11.3" + version: "0.12.0" ansicolor: dependency: transitive description: @@ -74,50 +74,50 @@ packages: dependency: transitive description: name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" build_config: dependency: transitive description: name: build_config - sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" build_daemon: dependency: transitive description: name: build_daemon - sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" + sha256: "294a2edaf4814a378725bfe6358210196f5ea37af89ecd81bfa32960113d4948" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.0.3" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + sha256: "99d3980049739a985cf9b21f30881f46db3ebc62c5b8d5e60e27440876b1ba1e" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.4.3" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d" + sha256: "74691599a5bc750dc96a6b4bfd48f7d9d66453eab04c7f4063134800d6a5c573" url: "https://pub.dev" source: hosted - version: "2.4.13" + version: "2.4.14" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 + sha256: "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021" url: "https://pub.dev" source: hosted - version: "7.3.2" + version: "8.0.0" built_collection: dependency: transitive description: @@ -134,30 +134,6 @@ packages: url: "https://pub.dev" source: hosted version: "8.9.3" - cached_network_image: - dependency: "direct main" - description: - name: cached_network_image - sha256: "7c1183e361e5c8b0a0f21a28401eecdbde252441106a9816400dd4c2b2424916" - url: "https://pub.dev" - source: hosted - version: "3.4.1" - cached_network_image_platform_interface: - dependency: transitive - description: - name: cached_network_image_platform_interface - sha256: "35814b016e37fbdc91f7ae18c8caf49ba5c88501813f73ce8a07027a395e2829" - url: "https://pub.dev" - source: hosted - version: "4.1.1" - cached_network_image_web: - dependency: transitive - description: - name: cached_network_image_web - sha256: "980842f4e8e2535b8dbd3d5ca0b1f0ba66bf61d14cc3a17a9b4788a3685ba062" - url: "https://pub.dev" - source: hosted - version: "1.3.1" characters: dependency: transitive description: @@ -282,50 +258,50 @@ packages: dependency: "direct dev" description: name: custom_lint - sha256: "3486c470bb93313a9417f926c7dd694a2e349220992d7b9d14534dc49c15bba9" + sha256: "7e6a73e1722ad90b48f77918994c17a5b177b0869804ea3c4ce9c9199de019f6" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" custom_lint_builder: dependency: transitive description: name: custom_lint_builder - sha256: "42cdc41994eeeddab0d7a722c7093ec52bd0761921eeb2cbdbf33d192a234759" + sha256: e26941131416b0bc81219dc8ddc68b34c6319e20abc001dd4855412749309d3b url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" custom_lint_core: dependency: transitive description: name: custom_lint_core - sha256: "02450c3e45e2a6e8b26c4d16687596ab3c4644dd5792e3313aa9ceba5a49b7f5" + sha256: "6dcee8a017181941c51a110da7e267c1d104dc74bec8862eeb8c85b5c8759a9e" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.1" custom_lint_visitor: dependency: transitive description: name: custom_lint_visitor - sha256: bfe9b7a09c4775a587b58d10ebb871d4fe618237639b1e84d5ec62d7dfef25f9 + sha256: "14df0760dfa81b7b0c398c876045f4e4a343eb2c9d200c66163671dd3e337c1b" url: "https://pub.dev" source: hosted - version: "1.0.0+6.11.0" + version: "1.0.0+7.1.0" dart_style: dependency: transitive description: name: dart_style - sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" + sha256: "27eb0ae77836989a3bc541ce55595e8ceee0992807f14511552a898ddd0d88ac" url: "https://pub.dev" source: hosted - version: "2.3.7" + version: "3.0.1" dbus: dependency: transitive description: name: dbus - sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" + sha256: "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c" url: "https://pub.dev" source: hosted - version: "0.7.10" + version: "0.7.11" equatable: dependency: transitive description: @@ -442,14 +418,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_cache_manager: - dependency: transitive - description: - name: flutter_cache_manager - sha256: "400b6592f16a4409a7f2bb929a9a7e38c72cceb8ffb99ee57bbf2cb2cecf8386" - url: "https://pub.dev" - source: hosted - version: "3.4.1" flutter_carousel_widget: dependency: "direct main" description: @@ -470,10 +438,10 @@ packages: dependency: "direct dev" description: name: flutter_launcher_icons - sha256: "31cd0885738e87c72d6f055564d37fabcdacee743b396b78c7636c169cac64f5" + sha256: bfa04787c85d80ecb3f8777bde5fc10c3de809240c48fa061a2c2bf15ea5211c url: "https://pub.dev" source: hosted - version: "0.14.2" + version: "0.14.3" flutter_lints: dependency: "direct dev" description: @@ -496,7 +464,7 @@ packages: source: hosted version: "2.4.4" flutter_plugin_android_lifecycle: - dependency: "direct main" + dependency: transitive description: name: flutter_plugin_android_lifecycle sha256: "615a505aef59b151b46bbeef55b36ce2b6ed299d160c51d84281946f0aa0ce0e" @@ -589,18 +557,18 @@ packages: dependency: "direct main" description: name: fluttertoast - sha256: "24467dc20bbe49fd63e57d8e190798c4d22cbbdac30e54209d153a15273721d1" + sha256: "8971efe7e59585e9149052e33718d84bca51e806f063d1467622b3dcb2878b6c" url: "https://pub.dev" source: hosted - version: "8.2.10" + version: "8.2.11" freezed: dependency: "direct dev" description: name: freezed - sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e" + sha256: "59a584c24b3acdc5250bb856d0d3e9c0b798ed14a4af1ddb7dc1c7b41df91c9c" url: "https://pub.dev" source: hosted - version: "2.5.7" + version: "2.5.8" freezed_annotation: dependency: "direct main" description: @@ -629,18 +597,18 @@ packages: dependency: transitive description: name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" go_router: dependency: "direct main" description: name: go_router - sha256: "7c2d40b59890a929824f30d442e810116caf5088482629c894b9e4478c67472d" + sha256: "9b736a9fa879d8ad6df7932cbdcc58237c173ab004ef90d8377923d7ad731eaa" url: "https://pub.dev" source: hosted - version: "14.6.3" + version: "14.7.2" graphs: dependency: transitive description: @@ -661,10 +629,10 @@ packages: dependency: transitive description: name: hotreloader - sha256: ed56fdc1f3a8ac924e717257621d09e9ec20e308ab6352a73a50a1d7a4d9158e + sha256: bc167a1163807b03bada490bfe2df25b0d744df359227880220a5cbd04e5734b url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "4.3.0" html: dependency: transitive description: @@ -677,10 +645,10 @@ packages: dependency: "direct main" description: name: http - sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "1.3.0" http_multi_server: dependency: transitive description: @@ -693,10 +661,10 @@ packages: dependency: transitive description: name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.2" image: dependency: transitive description: @@ -749,10 +717,10 @@ packages: dependency: transitive description: name: image_picker_macos - sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + sha256: "1b90ebbd9dcf98fb6c1d01427e49a55bd96b5d67b8c67cf955d60a5de74207c1" url: "https://pub.dev" source: hosted - version: "0.2.1+1" + version: "0.2.1+2" image_picker_platform_interface: dependency: transitive description: @@ -781,10 +749,10 @@ packages: dependency: "direct dev" description: name: injectable_generator - sha256: af403d76c7b18b4217335e0075e950cd0579fd7f8d7bd47ee7c85ada31680ba1 + sha256: b04673a4c88b3a848c0c77bf58b8309f9b9e064d9fe1df5450c8ee1675eaea1a url: "https://pub.dev" source: hosted - version: "2.6.2" + version: "2.7.0" intl: dependency: "direct main" description: @@ -821,10 +789,10 @@ packages: dependency: "direct dev" description: name: json_serializable - sha256: c2fcb3920cf2b6ae6845954186420fca40bc0a8abcc84903b7801f17d7050d7c + sha256: b0a98230538fe5d0b60a22fb6bf1b6cb03471b53e3324ff6069c591679dd59c9 url: "https://pub.dev" source: hosted - version: "6.9.0" + version: "6.9.3" jwt_decoder: dependency: "direct main" description: @@ -861,10 +829,10 @@ packages: dependency: transitive description: name: lints - sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "5.1.1" logging: dependency: transitive description: @@ -953,14 +921,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.0" - octo_image: - dependency: transitive - description: - name: octo_image - sha256: "34faa6639a78c7e3cbe79be6f9f96535867e879748ade7d17c9b1ae7536293bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" package_config: dependency: transitive description: @@ -973,18 +933,18 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: b15fad91c4d3d1f2b48c053dd41cb82da007c27407dc9ab5f9aa59881d0e39d4 + sha256: c447a3c3e7be4addf129b8f9ab6a4bd5d166b78918223e223b61fddf4d07e254 url: "https://pub.dev" source: hosted - version: "8.1.4" + version: "8.2.0" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: a5ef9986efc7bf772f2696183a3992615baa76c1ffb1189318dd8803778fb05b + sha256: "205ec83335c2ab9107bbba3f8997f9356d72ca3c715d2f038fc773d0366b4c76" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.1.0" path: dependency: transitive description: @@ -1101,10 +1061,10 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: "81876843eb50dc2e1e5b151792c9a985c5ed2536914115ed04e9c8528f6647b0" + sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.5.0" recase: dependency: transitive description: @@ -1133,10 +1093,10 @@ packages: dependency: transitive description: name: riverpod_analyzer_utils - sha256: c6b8222b2b483cb87ae77ad147d6408f400c64f060df7a225b127f4afef4f8c8 + sha256: "837a6dc33f490706c7f4632c516bcd10804ee4d9ccc8046124ca56388715fdf3" url: "https://pub.dev" source: hosted - version: "0.5.8" + version: "0.5.9" riverpod_annotation: dependency: "direct main" description: @@ -1149,18 +1109,18 @@ packages: dependency: "direct dev" description: name: riverpod_generator - sha256: "63546d70952015f0981361636bf8f356d9cfd9d7f6f0815e3c07789a41233188" + sha256: "120d3310f687f43e7011bb213b90a436f1bbc300f0e4b251a72c39bccb017a4f" url: "https://pub.dev" source: hosted - version: "2.6.3" + version: "2.6.4" riverpod_lint: dependency: "direct dev" description: name: riverpod_lint - sha256: "83e4caa337a9840469b7b9bd8c2351ce85abad80f570d84146911b32086fbd99" + sha256: b05408412b0f75dec954e032c855bc28349eeed2d2187f94519e1ddfdf8b3693 url: "https://pub.dev" source: hosted - version: "2.6.3" + version: "2.6.4" rxdart: dependency: transitive description: @@ -1196,18 +1156,18 @@ packages: dependency: "direct main" description: name: shared_preferences - sha256: a752ce92ea7540fc35a0d19722816e04d0e72828a4200e83a98cf1a1eb524c9a + sha256: "688ee90fbfb6989c980254a56cb26ebe9bb30a3a2dff439a78894211f73de67a" url: "https://pub.dev" source: hosted - version: "2.3.5" + version: "2.5.1" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: bf808be89fe9dc467475e982c1db6c2faf3d2acf54d526cd5ec37d86c99dbd84 + sha256: "650584dcc0a39856f369782874e562efd002a9c94aec032412c9eb81419cce1f" url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.4" shared_preferences_foundation: dependency: transitive description: @@ -1252,10 +1212,10 @@ packages: dependency: transitive description: name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.4.2" shelf_web_socket: dependency: transitive description: @@ -1280,10 +1240,10 @@ packages: dependency: transitive description: name: source_gen - sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b" url: "https://pub.dev" source: hosted - version: "1.5.0" + version: "2.0.0" source_helper: dependency: transitive description: @@ -1308,46 +1268,6 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.0" - sqflite: - dependency: transitive - description: - name: sqflite - sha256: "2d7299468485dca85efeeadf5d38986909c5eb0cd71fd3db2c2f000e6c9454bb" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - sqflite_android: - dependency: transitive - description: - name: sqflite_android - sha256: "78f489aab276260cdd26676d2169446c7ecd3484bbd5fead4ca14f3ed4dd9ee3" - url: "https://pub.dev" - source: hosted - version: "2.4.0" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - sha256: "761b9740ecbd4d3e66b8916d784e581861fd3c3553eda85e167bc49fdb68f709" - url: "https://pub.dev" - source: hosted - version: "2.5.4+6" - sqflite_darwin: - dependency: transitive - description: - name: sqflite_darwin - sha256: "22adfd9a2c7d634041e96d6241e6e1c8138ca6817018afc5d443fef91dcefa9c" - url: "https://pub.dev" - source: hosted - version: "2.4.1+1" - sqflite_platform_interface: - dependency: transitive - description: - name: sqflite_platform_interface - sha256: "8dd4515c7bdcae0a785b0062859336de775e8c65db81ae33dd5445f35be61920" - url: "https://pub.dev" - source: hosted - version: "2.4.0" stack_trace: dependency: transitive description: @@ -1392,26 +1312,18 @@ packages: dependency: "direct main" description: name: syncfusion_flutter_charts - sha256: "117823c9e2ffcb7fb9868c73263df88751e3bb1f3d81f617cbaf63112f530e9c" + sha256: "672c17a7f4cb3020c06bb6a28d2d033623007b8e2a19704ad34b412e9bdd2dab" url: "https://pub.dev" source: hosted - version: "28.1.39" + version: "28.2.4+1" syncfusion_flutter_core: dependency: transitive description: name: syncfusion_flutter_core - sha256: "794870919ca73e29c6cb25392a097cdfe58da4d6f3f3d3eccc529ecf52f78752" + sha256: "3c1876b0a245de23de3b17a19e3106fed57d88f4fd2c8dc9bc1976705b1c31d5" url: "https://pub.dev" source: hosted - version: "28.1.39" - synchronized: - dependency: transitive - description: - name: synchronized - sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225" - url: "https://pub.dev" - source: hosted - version: "3.3.0+3" + version: "28.2.4" term_glyph: dependency: transitive description: @@ -1520,10 +1432,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + sha256: "3ba963161bd0fe395917ba881d320b9c4f6dd3c4a233da62ab18a5025c85f1e9" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.4.0" url_launcher_windows: dependency: transitive description: @@ -1560,10 +1472,10 @@ packages: dependency: transitive description: name: video_player_android - sha256: "391e092ba4abe2f93b3e625bd6b6a6ec7d7414279462c1c0ee42b5ab8d0a0898" + sha256: "7018dbcb395e2bca0b9a898e73989e67c0c4a5db269528e1b036ca38bcca0d0b" url: "https://pub.dev" source: hosted - version: "2.7.16" + version: "2.7.17" video_player_avfoundation: dependency: transitive description: @@ -1576,18 +1488,18 @@ packages: dependency: transitive description: name: video_player_platform_interface - sha256: "229d7642ccd9f3dc4aba169609dd6b5f3f443bb4cc15b82f7785fcada5af9bbb" + sha256: df534476c341ab2c6a835078066fc681b8265048addd853a1e3c78740316a844 url: "https://pub.dev" source: hosted - version: "6.2.3" + version: "6.3.0" video_player_web: dependency: transitive description: name: video_player_web - sha256: "881b375a934d8ebf868c7fb1423b2bfaa393a0a265fa3f733079a86536064a10" + sha256: "3ef40ea6d72434edbfdba4624b90fd3a80a0740d260667d91e7ecd2d79e13476" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.3.4" vm_service: dependency: transitive description: @@ -1624,10 +1536,10 @@ packages: dependency: transitive description: name: web_socket_channel - sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" + sha256: "0b8e2457400d8a859b7b2030786835a28a8e80836ef64402abef392ff4f1d0e5" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" webview_flutter: dependency: "direct main" description: @@ -1640,10 +1552,10 @@ packages: dependency: transitive description: name: webview_flutter_android - sha256: d1ee28f44894cbabb1d94cc42f9980297f689ff844d067ec50ff88d86e27d63f + sha256: "5568f17a9c25c0fdd0737900fa1c2d1fee2d780bc212d9aec10c2d1f48ef0f59" url: "https://pub.dev" source: hosted - version: "4.3.0" + version: "4.3.1" webview_flutter_platform_interface: dependency: transitive description: @@ -1656,18 +1568,18 @@ packages: dependency: transitive description: name: webview_flutter_wkwebview - sha256: "4adc14ea9a770cc9e2c8f1ac734536bd40e82615bd0fa6b94be10982de656cc7" + sha256: "8e0593559bfecd35eb1757d6907ed6b995a41ef82607d6113df897c2805ce6be" url: "https://pub.dev" source: hosted - version: "3.17.0" + version: "3.18.0" win32: dependency: transitive description: name: win32 - sha256: "154360849a56b7b67331c21f09a386562d88903f90a1099c5987afc1912e1f29" + sha256: daf97c9d80197ed7b619040e86c8ab9a9dad285e7671ee7390f9180cc828a51e url: "https://pub.dev" source: hosted - version: "5.10.0" + version: "5.10.1" xdg_directories: dependency: transitive description: @@ -1693,5 +1605,5 @@ packages: source: hosted version: "3.1.3" sdks: - dart: ">=3.5.2 <4.0.0" - flutter: ">=3.24.0" + dart: ">=3.6.0 <4.0.0" + flutter: ">=3.27.0" diff --git a/pubspec.yaml b/pubspec.yaml index 0b9e373d..48939a6f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,7 @@ name: uae_stat description: "View statistics about the UAE from the Federal Center for Statistics and Competitiveness." publish_to: "none" -#version: 0.5.10 -version: 1.0.8+9 +version: 0.5.10 environment: sdk: ">=3.2.3 <4.0.0" @@ -23,7 +22,7 @@ dependencies: cupertino_icons: ^1.0.6 fl_chart: ^0.70.2 - tutorial_coach_mark: ^1.2.12 + marquee: ^2.2.3 url_launcher: ^6.3.1 # dynamic_layouts: @@ -60,11 +59,10 @@ dependencies: image_picker: ^1.1.2 material_charts: ^0.0.23 flutter_staggered_grid_view: ^0.7.0 - flutter_plugin_android_lifecycle: ^2.0.24 - cached_network_image: ^3.4.1 syncfusion_flutter_charts: ^28.1.39 connectivity_plus: ^6.1.2 - package_info_plus: ^8.1.4 + tutorial_coach_mark: ^1.2.12 + package_info_plus: ^8.2.0 dependency_overrides: fading_edge_scrollview: ^4.1.1 @@ -114,16 +112,6 @@ flutter: - assets/cached_responses/sharepoint/country_leader_imgs/ - assets/edit_profile/ - assets/splash_screen/ - - assets/app_tour/ - - assets/icons/uae_numbers/bookmarks.png - - assets/icons/uae_numbers/share.png - - assets/icons/misc/vector.png - - assets/icons/misc/visible_on.png - - assets/icons/misc/visibility_off.png - - assets/icons/misc/save.png - - assets/icons/drawer/guide.png - - assets/icons/drawer/feedback.png - - assets/icons/drawer/manageusr.png fonts: - family: Segoe