diff --git a/analysis_options.yaml b/analysis_options.yaml index 61b6c4d..964054d 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -7,6 +7,9 @@ # The following line activates a set of recommended lints for Flutter apps, # packages, and plugins designed to encourage good coding practices. +analyzer: + errors: + use_build_context_synchronously: ignore include: package:flutter_lints/flutter.yaml linter: @@ -24,6 +27,5 @@ linter: rules: # avoid_print: false # Uncomment to disable the `avoid_print` rule # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options diff --git a/lib/config/theme_data.dart b/lib/config/theme_data.dart index 976eaa2..cb60d00 100644 --- a/lib/config/theme_data.dart +++ b/lib/config/theme_data.dart @@ -1,3 +1,5 @@ +// ignore_for_file: deprecated_member_use + import 'package:didvan/config/design_config.dart'; import 'package:flutter/material.dart'; diff --git a/lib/models/ai/files_model.dart b/lib/models/ai/files_model.dart index b22aec1..ecc13b9 100644 --- a/lib/models/ai/files_model.dart +++ b/lib/models/ai/files_model.dart @@ -1,5 +1,5 @@ import 'dart:io'; -import 'dart:typed_data'; +import 'package:flutter/services.dart'; import 'package:mime/mime.dart'; import 'package:path/path.dart' as p; diff --git a/lib/routes/route_generator.dart b/lib/routes/route_generator.dart index 1fb5083..df5c9ae 100644 --- a/lib/routes/route_generator.dart +++ b/lib/routes/route_generator.dart @@ -1,4 +1,4 @@ -// ignore_for_file: unused_import +// ignore_for_file: unused_import, deprecated_member_use import 'package:didvan/models/ai/ai_chat_args.dart'; import 'package:didvan/views/ai/ai_chat_page.dart'; diff --git a/lib/services/network/request.dart b/lib/services/network/request.dart index 0deb651..13528c9 100644 --- a/lib/services/network/request.dart +++ b/lib/services/network/request.dart @@ -2,7 +2,7 @@ import 'dart:convert'; import 'dart:developer'; -import 'dart:typed_data'; +import 'package:flutter/services.dart'; import 'package:didvan/services/storage/storage.dart'; // ignore: depend_on_referenced_packages diff --git a/lib/services/storage/storage.dart b/lib/services/storage/storage.dart index 1793d6e..a0af58c 100644 --- a/lib/services/storage/storage.dart +++ b/lib/services/storage/storage.dart @@ -1,6 +1,6 @@ -import 'dart:typed_data'; import 'dart:io' as io; +import 'package:flutter/services.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:universal_html/html.dart'; diff --git a/lib/views/ai/ai_chat_page.dart b/lib/views/ai/ai_chat_page.dart index e6db6aa..3ca8c41 100644 --- a/lib/views/ai/ai_chat_page.dart +++ b/lib/views/ai/ai_chat_page.dart @@ -500,10 +500,11 @@ class _AiChatPageState extends State { data: "${snapshot.data}...", onTapLink: (text, href, title) { if (href != null) { - AppInitializer.openWebLink( - context, href, - mode: LaunchMode - .inAppBrowserView); + launchUrlString( + href, + mode: + LaunchMode.inAppBrowserView, + ); } }, selectable: false, @@ -560,8 +561,10 @@ class _AiChatPageState extends State { data: message.text.toString(), onTapLink: (text, href, title) { if (href != null) { - AppInitializer.openWebLink(context, href, - mode: LaunchMode.inAppBrowserView); + launchUrlString( + href, + mode: LaunchMode.inAppBrowserView, + ); } }, selectable: true, diff --git a/lib/views/ai/widgets/ai_message_bar.dart b/lib/views/ai/widgets/ai_message_bar.dart index c10a6a7..663b2ce 100644 --- a/lib/views/ai/widgets/ai_message_bar.dart +++ b/lib/views/ai/widgets/ai_message_bar.dart @@ -1,4 +1,4 @@ -// ignore_for_file: library_private_types_in_public_api, avoid_web_libraries_in_flutter +// ignore_for_file: library_private_types_in_public_api, avoid_web_libraries_in_flutter, deprecated_member_use import 'dart:async'; import 'package:record/record.dart'; diff --git a/lib/views/ai/widgets/ai_message_bar_ios.dart b/lib/views/ai/widgets/ai_message_bar_ios.dart index 87f252c..d8d317d 100644 --- a/lib/views/ai/widgets/ai_message_bar_ios.dart +++ b/lib/views/ai/widgets/ai_message_bar_ios.dart @@ -1,3 +1,5 @@ +// ignore_for_file: deprecated_member_use + import 'dart:async'; import 'dart:io'; diff --git a/lib/views/authentication/widgets/authentication_layout.dart b/lib/views/authentication/widgets/authentication_layout.dart index 3179bef..1ea1962 100644 --- a/lib/views/authentication/widgets/authentication_layout.dart +++ b/lib/views/authentication/widgets/authentication_layout.dart @@ -1,3 +1,5 @@ +// ignore_for_file: deprecated_member_use + import 'package:didvan/views/authentication/widgets/authentication_app_bar.dart'; import 'package:didvan/views/widgets/logos/didvan_vertical_logo.dart'; import 'package:flutter/material.dart'; diff --git a/lib/views/home/main/widgets/main_content.dart b/lib/views/home/main/widgets/main_content.dart index d03f999..d0de86a 100644 --- a/lib/views/home/main/widgets/main_content.dart +++ b/lib/views/home/main/widgets/main_content.dart @@ -1,3 +1,5 @@ +// ignore_for_file: deprecated_member_use + import 'package:didvan/config/theme_data.dart'; import 'package:didvan/views/home/main/widgets/banner.dart'; import 'package:didvan/views/home/widgets/categories.dart'; diff --git a/lib/views/home/new_statistic/new_statistic.dart b/lib/views/home/new_statistic/new_statistic.dart index 41d4199..4a2298f 100644 --- a/lib/views/home/new_statistic/new_statistic.dart +++ b/lib/views/home/new_statistic/new_statistic.dart @@ -1,3 +1,5 @@ +// ignore_for_file: deprecated_member_use + import 'package:didvan/config/theme_data.dart'; import 'package:didvan/constants/app_icons.dart'; import 'package:didvan/models/new_statistic/new_statistics_model.dart'; diff --git a/lib/views/home/statistic/statistic_details/statistic_details.dart b/lib/views/home/statistic/statistic_details/statistic_details.dart index 18d5fe7..c34ed56 100644 --- a/lib/views/home/statistic/statistic_details/statistic_details.dart +++ b/lib/views/home/statistic/statistic_details/statistic_details.dart @@ -1,3 +1,5 @@ +// ignore_for_file: deprecated_member_use + import 'package:didvan/config/theme_data.dart'; import 'package:didvan/constants/app_icons.dart'; import 'package:didvan/models/enums.dart'; diff --git a/lib/views/notification_time/notification_time.dart b/lib/views/notification_time/notification_time.dart index 27311a4..c1eb5b8 100644 --- a/lib/views/notification_time/notification_time.dart +++ b/lib/views/notification_time/notification_time.dart @@ -1,3 +1,5 @@ +// ignore_for_file: deprecated_member_use + import 'package:didvan/config/theme_data.dart'; import 'package:didvan/models/enums.dart'; import 'package:didvan/models/view/app_bar_data.dart'; diff --git a/lib/views/notification_time/widgets/custom_cupertino_date_picker.dart b/lib/views/notification_time/widgets/custom_cupertino_date_picker.dart index 8b1f9d3..6d83ed5 100644 --- a/lib/views/notification_time/widgets/custom_cupertino_date_picker.dart +++ b/lib/views/notification_time/widgets/custom_cupertino_date_picker.dart @@ -1,3 +1,5 @@ +// ignore_for_file: deprecated_member_use + import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/views/splash/splash.dart b/lib/views/splash/splash.dart index 0b16e1f..7cbe9bc 100644 --- a/lib/views/splash/splash.dart +++ b/lib/views/splash/splash.dart @@ -1,3 +1,5 @@ +// ignore_for_file: deprecated_member_use + import 'package:didvan/config/design_config.dart'; import 'package:didvan/constants/assets.dart'; import 'package:didvan/main.dart'; diff --git a/lib/views/widgets/didvan/app_bar.dart b/lib/views/widgets/didvan/app_bar.dart index c8f4b10..8c96f04 100644 --- a/lib/views/widgets/didvan/app_bar.dart +++ b/lib/views/widgets/didvan/app_bar.dart @@ -1,3 +1,5 @@ +// ignore_for_file: deprecated_member_use + import 'package:didvan/config/theme_data.dart'; import 'package:didvan/constants/app_icons.dart'; import 'package:didvan/models/view/app_bar_data.dart'; diff --git a/lib/views/widgets/didvan/page_view.dart b/lib/views/widgets/didvan/page_view.dart index 1ef8447..c762cba 100644 --- a/lib/views/widgets/didvan/page_view.dart +++ b/lib/views/widgets/didvan/page_view.dart @@ -1,3 +1,5 @@ +// ignore_for_file: deprecated_member_use + import 'dart:math'; import 'package:carousel_slider/carousel_slider.dart'; diff --git a/pubspec.lock b/pubspec.lock index 4b3bcdc..f8137b8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -69,10 +69,10 @@ packages: dependency: "direct main" description: name: awesome_notifications - sha256: "65f730f9c0e73a346039ef746384bcff1773f9f03821b859705a7ab8db977b23" + sha256: "3eeb9e0cdfc72c7b4b83e9924da38ea86edd65a2af02bd5429aa41dce634ee90" url: "https://pub.dev" source: hosted - version: "0.8.2" + version: "0.8.3" boolean_selector: dependency: transitive description: @@ -117,10 +117,10 @@ packages: dependency: "direct main" description: name: carousel_slider - sha256: "9c695cc963bf1d04a47bd6021f68befce8970bcd61d24938e1fb0918cf5d9c42" + sha256: "7b006ec356205054af5beaef62e2221160ea36b90fb70a35e4deacd49d0349ae" url: "https://pub.dev" source: hosted - version: "4.2.1" + version: "5.0.0" characters: dependency: transitive description: @@ -226,13 +226,13 @@ packages: source: hosted version: "1.1.1+1" fading_edge_scrollview: - dependency: transitive + dependency: "direct main" description: name: fading_edge_scrollview - sha256: c25c2231652ce774cc31824d0112f11f653881f43d7f5302c05af11942052031 + sha256: "1f84fe3ea8e251d00d5735e27502a6a250e4aa3d3b330d3fdcb475af741464ef" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.1.1" fake_async: dependency: transitive description: @@ -245,10 +245,10 @@ packages: dependency: transitive description: name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" file: dependency: transitive description: @@ -601,10 +601,10 @@ packages: dependency: "direct main" description: name: home_widget - sha256: "29565bfee4b32eaf9e7e8b998d504618b779a74b2b1ac62dd4dac7468e66f1a3" + sha256: b313e3304c0429669fddf1286e1fbf61a64b873f38ba30b3eb890ef0d7560b12 url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.7.0" html: dependency: "direct main" description: @@ -705,10 +705,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" js: dependency: "direct main" description: @@ -745,26 +745,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" lints: dependency: transitive description: @@ -801,10 +801,10 @@ packages: dependency: "direct main" description: name: marquee - sha256: "4b5243d2804373bdc25fc93d42c3b402d6ec1f4ee8d0bb72276edd04ae7addb8" + sha256: a87e7e80c5d21434f90ad92add9f820cf68be374b226404fe881d2bba7be0862 url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.0" matcher: dependency: transitive description: @@ -817,18 +817,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" mime: dependency: "direct main" description: @@ -1214,10 +1214,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" timezone: dependency: transitive description: @@ -1414,10 +1414,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.4" wakelock_plus: dependency: transitive description: @@ -1475,13 +1475,13 @@ packages: source: hosted version: "3.14.0" win32: - dependency: transitive + dependency: "direct main" description: name: win32 - sha256: "0eaf06e3446824099858367950a813472af675116bf63f008a4c2a75ae13e9cb" + sha256: "84ba388638ed7a8cb3445a320c8273136ab2631cd5f2c57888335504ddab1bc2" url: "https://pub.dev" source: hosted - version: "5.5.0" + version: "5.8.0" xdg_directories: dependency: transitive description: @@ -1499,5 +1499,5 @@ packages: source: hosted version: "6.5.0" sdks: - dart: ">=3.3.0 <4.0.0" - flutter: ">=3.19.0" + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.20.0-1.2.pre" diff --git a/pubspec.yaml b/pubspec.yaml index d226977..37803a9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -35,7 +35,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 - intl: ^0.18.1 + intl: ^0.19.0 animated_toggle_switch: ^0.8.2 toggle_switch: ^2.3.0 provider: ^6.0.1 @@ -48,7 +48,7 @@ dependencies: flutter_svg: ^2.0.5 cached_network_image: ^3.2.0 skeleton_text: ^3.0.0 - carousel_slider: ^4.0.0 + carousel_slider: ^5.0.0 flutter_vibrate: ^1.3.0 universal_html: ^2.0.8 record: ^5.1.2 @@ -79,7 +79,7 @@ dependencies: http_parser: any cached_network_image_platform_interface: any awesome_notifications: ^0.8.2 - home_widget: ^0.5.0 + home_widget: ^0.7.0 android_intent_plus: ^5.0.0 get: ^4.6.6 # firebase_auth: ^4.19.6 @@ -104,6 +104,8 @@ dependencies: js: any flutter_sound_platform_interface: any flutter_downloader: ^1.11.8 + win32: ^5.8.0 + fading_edge_scrollview: ^4.1.1 dev_dependencies: flutter_test: sdk: flutter