diff --git a/.gitignore b/.gitignore index 3820a95..fb24cf0 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,9 @@ migrate_working_dir/ .pub/ /build/ /coverage/ +/pubspec.lock +/.metadata +/assets/svg/*.vec # Symbolication related app.*.symbols diff --git a/.metadata b/.metadata deleted file mode 100644 index 3d40ea9..0000000 --- a/.metadata +++ /dev/null @@ -1,33 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: "d693b4b9dbac2acd4477aea4555ca6dcbea44ba2" - channel: "stable" - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2 - base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2 - - platform: android - create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2 - base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2 - - platform: ios - create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2 - base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2 - - # User provided section - - # List of Local paths (relative to this file) that should be - # ignored by the migrate tool. - # - # Files that are not part of the templates will be ignored by default. - unmanaged_files: - - 'lib/main.dart' - - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/analysis_options.yaml b/analysis_options.yaml index f9b3034..31e4275 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1 +1,14 @@ include: package:flutter_lints/flutter.yaml + +linter: + rules: + prefer_const_constructors: true + prefer_const_declarations: true + prefer_const_constructors_in_immutables: true + prefer_final_fields: true + prefer_final_locals: true + avoid_classes_with_only_static_members: true + avoid_print: true + always_declare_return_types: true + use_key_in_widget_constructors: true + require_trailing_commas: true \ No newline at end of file diff --git a/compile_svg.zsh b/compile_svg.zsh new file mode 100755 index 0000000..702da25 --- /dev/null +++ b/compile_svg.zsh @@ -0,0 +1,4 @@ +for f in assets/svg/*.svg; do + echo "Compiling $f" + fvm dart run vector_graphics_compiler -i "$f" -o "${f}.vec" +done \ No newline at end of file diff --git a/lib/common_ui/resources/my_assets.dart b/lib/common_ui/resources/my_assets.dart index 59ccf34..fb7beba 100644 --- a/lib/common_ui/resources/my_assets.dart +++ b/lib/common_ui/resources/my_assets.dart @@ -41,38 +41,38 @@ class MyAssets { static const String giftBackground = 'assets/images/gift_background.png'; /// SVG - static const String closeBtn = 'assets/svg/close_btn.svg'; - static const String musicOff = 'assets/svg/music_off.svg'; - static const String musicOn = 'assets/svg/music_on.svg'; - static const String button = 'assets/svg/button.svg'; - static const String buttonTablet = 'assets/svg/button_tablet.svg'; - static const String button2 = 'assets/svg/button_2.svg'; - static const String button2Tablet = 'assets/svg/button_2_tablet.svg'; - static const String button3 = 'assets/svg/button_3.svg'; - static const String button3Tablet = 'assets/svg/button_3_tablet.svg'; - static const String theme = 'assets/svg/theme.svg'; - static const String facebook = 'assets/svg/facebook.svg'; - static const String whatsapp = 'assets/svg/whatsapp.svg'; - static const String youtube = 'assets/svg/youtube.svg'; - static const String instagram = 'assets/svg/instagram.svg'; - static const String language = 'assets/svg/language.svg'; - static const String newHorizon = 'assets/svg/new_horizon.svg'; - static const String home = 'assets/svg/home.svg'; - static const String music = 'assets/svg/music.svg'; - static const String done = 'assets/svg/done.svg'; - static const String correct = 'assets/svg/correct.svg'; - static const String wrong = 'assets/svg/wrong.svg'; - static const String handPoint = 'assets/svg/hand_point.svg'; - static const String location = 'assets/svg/location.svg'; - static const String doneRounded = 'assets/svg/done_rounded.svg'; - static const String lang = 'assets/svg/lang.svg'; - static const String unMusic = 'assets/svg/unmusic.svg'; - static const String globe = 'assets/svg/globe.svg'; - static const String homeButton = 'assets/svg/home_button.svg'; - static const String diamondContainer = 'assets/svg/diamond_container.svg'; - static const String iconPlay = 'assets/svg/icon_play.svg'; - static const String iconNotif = 'assets/svg/icon_notif.svg'; - static const String iconPlayVideo = 'assets/svg/icon_play_video.svg'; + static const String closeBtn = 'assets/svg/close_btn.svg.vec'; + static const String musicOff = 'assets/svg/music_off.svg.vec'; + static const String musicOn = 'assets/svg/music_on.svg.vec'; + static const String button = 'assets/svg/button.svg.vec.vec'; + static const String buttonTablet = 'assets/svg/button_tablet.svg.vec'; + static const String button2 = 'assets/svg/button_2.svg.vec'; + static const String button2Tablet = 'assets/svg/button_2_tablet.svg.vec'; + static const String button3 = 'assets/svg/button_3.svg.vec'; + static const String button3Tablet = 'assets/svg/button_3_tablet.svg.vec'; + static const String theme = 'assets/svg/theme.svg.vec'; + static const String facebook = 'assets/svg/facebook.svg.vec'; + static const String whatsapp = 'assets/svg/whatsapp.svg.vec'; + static const String youtube = 'assets/svg/youtube.svg.vec'; + static const String instagram = 'assets/svg/instagram.svg.vec'; + static const String language = 'assets/svg/language.svg.vec'; + static const String newHorizon = 'assets/svg/new_horizon.svg.vec'; + static const String home = 'assets/svg/home.svg.vec'; + static const String music = 'assets/svg/music.svg.vec'; + static const String done = 'assets/svg/done.svg.vec'; + static const String correct = 'assets/svg/correct.svg.vec'; + static const String wrong = 'assets/svg/wrong.svg.vec'; + static const String handPoint = 'assets/svg/hand_point.svg.vec'; + static const String location = 'assets/svg/location.svg.vec'; + static const String doneRounded = 'assets/svg/done_rounded.svg.vec'; + static const String lang = 'assets/svg/lang.svg.vec'; + static const String unMusic = 'assets/svg/unmusic.svg.vec'; + static const String globe = 'assets/svg/globe.svg.vec'; + static const String homeButton = 'assets/svg/home_button.svg.vec'; + static const String diamondContainer = 'assets/svg/diamond_container.svg.vec'; + static const String iconPlay = 'assets/svg/icon_play.svg.vec'; + static const String iconNotif = 'assets/svg/icon_notif.svg.vec'; + static const String iconPlayVideo = 'assets/svg/icon_play_video.svg.vec'; static final List images = [ backgroundHome, diff --git a/lib/core/routers/hero_dialog_route.dart b/lib/core/routers/hero_dialog_route.dart index 54a199f..b191512 100644 --- a/lib/core/routers/hero_dialog_route.dart +++ b/lib/core/routers/hero_dialog_route.dart @@ -25,7 +25,7 @@ class HeroDialogRoute extends PageRoute { bool get maintainState => false; @override - Color get barrierColor => Color(0XFF322386).withValues(alpha: 0.3); // Or your desired barrier color + Color get barrierColor => const Color(0XFF322386).withValues(alpha: 0.3); // Or your desired barrier color @override Widget buildPage(BuildContext context, Animation animation, Animation secondaryAnimation) { diff --git a/lib/core/routers/my_routes.dart b/lib/core/routers/my_routes.dart index e149e3c..07b7cd7 100644 --- a/lib/core/routers/my_routes.dart +++ b/lib/core/routers/my_routes.dart @@ -95,7 +95,7 @@ GoRouter _appPages() => GoRouter( name: Routes.languagePage, path: Routes.languagePage, builder: (context, state) => BlocProvider( - create: (context) => LanguageBloc()..add(InitLanguageEvent()), + create: (context) => LanguageBloc()..add(const InitLanguageEvent()), child: const LanguagePage(), ), ), diff --git a/lib/core/utils/storage_path.dart b/lib/core/utils/storage_path.dart index 56a6746..01e9543 100644 --- a/lib/core/utils/storage_path.dart +++ b/lib/core/utils/storage_path.dart @@ -3,6 +3,10 @@ import 'dart:io'; import 'package:path_provider/path_provider.dart'; class StoragePath { + static const StoragePath _i = StoragePath._internal(); + const StoragePath._internal(); + factory StoragePath() => _i; + static Directory documentDir = Directory(''); static Future getDocumentDir() async { diff --git a/lib/core/widgets/animations/fade_anim.dart b/lib/core/widgets/animations/fade_anim.dart index 0a5e40b..2db0e92 100644 --- a/lib/core/widgets/animations/fade_anim.dart +++ b/lib/core/widgets/animations/fade_anim.dart @@ -19,8 +19,8 @@ class _FadeAnimState extends State super.initState(); _controller = AnimationController( vsync: this, - duration: Duration(milliseconds: 500), - reverseDuration: Duration(seconds: 500), + duration: const Duration(milliseconds: 500), + reverseDuration: const Duration(seconds: 500), ); _animation = Tween( begin: 0, diff --git a/lib/core/widgets/animations/fade_anim_delayed.dart b/lib/core/widgets/animations/fade_anim_delayed.dart index 1e925f0..ea9f655 100644 --- a/lib/core/widgets/animations/fade_anim_delayed.dart +++ b/lib/core/widgets/animations/fade_anim_delayed.dart @@ -24,8 +24,8 @@ class _FadeAnimDelayedState extends State super.initState(); _controller = AnimationController( vsync: this, - duration: Duration(milliseconds: 500), - reverseDuration: Duration(seconds: 500), + duration: const Duration(milliseconds: 500), + reverseDuration: const Duration(seconds: 500), ); _animation = Tween( begin: 0, diff --git a/lib/core/widgets/animations/globe_animation.dart b/lib/core/widgets/animations/globe_animation.dart index 4911704..779d265 100644 --- a/lib/core/widgets/animations/globe_animation.dart +++ b/lib/core/widgets/animations/globe_animation.dart @@ -25,8 +25,8 @@ class _GlobeAnimationState extends State super.initState(); _controller = AnimationController( vsync: this, - duration: Duration(seconds: 1), - reverseDuration: Duration(seconds: 1), + duration: const Duration(seconds: 1), + reverseDuration: const Duration(seconds: 1), ); _animation = Tween( begin: 1, @@ -39,15 +39,15 @@ class _GlobeAnimationState extends State super.didUpdateWidget(oldWidget); if (widget.state) { _controller.repeat(reverse: true); - _timer = Timer.periodic(Duration(seconds: 1), (timer) { + _timer = Timer.periodic(const Duration(seconds: 1), (timer) { if (_gradient == null) { if (!mounted) return; setState(() { _gradient = RadialGradient( colors: [ - Color(0XFFDFCD00), - Color(0XFFDFCD00).withValues(alpha: 0.35), - Color(0XFFDFCD00).withValues(alpha: 0), + const Color(0XFFDFCD00), + const Color(0XFFDFCD00).withValues(alpha: 0.35), + const Color(0XFFDFCD00).withValues(alpha: 0), ], center: Alignment.center, ); @@ -66,9 +66,9 @@ class _GlobeAnimationState extends State setState(() { _gradient = RadialGradient( colors: [ - Color(0XFFDFCD00).withValues(alpha: 0), - Color(0XFFDFCD00).withValues(alpha: 0), - Color(0XFFDFCD00).withValues(alpha: 0), + const Color(0XFFDFCD00).withValues(alpha: 0), + const Color(0XFFDFCD00).withValues(alpha: 0), + const Color(0XFFDFCD00).withValues(alpha: 0), ], center: Alignment.center, ); @@ -94,7 +94,7 @@ class _GlobeAnimationState extends State alignment: Alignment.center, child: AnimatedContainer( duration: const Duration(milliseconds: 500), - padding: EdgeInsets.all(MySpaces.s0), + padding: const EdgeInsets.all(MySpaces.s0), decoration: BoxDecoration(gradient: _gradient), child: child, ), diff --git a/lib/core/widgets/animations/rotation_anim.dart b/lib/core/widgets/animations/rotation_anim.dart index ea4d9e9..b588fdd 100644 --- a/lib/core/widgets/animations/rotation_anim.dart +++ b/lib/core/widgets/animations/rotation_anim.dart @@ -19,7 +19,7 @@ class _RotationAnimState extends State super.initState(); _controller = AnimationController( vsync: this, - duration: Duration(seconds: 20), + duration: const Duration(seconds: 20), ); _animation = Tween( begin: 0, diff --git a/lib/core/widgets/animations/scale_anim.dart b/lib/core/widgets/animations/scale_anim.dart index e76c247..214be38 100644 --- a/lib/core/widgets/animations/scale_anim.dart +++ b/lib/core/widgets/animations/scale_anim.dart @@ -20,8 +20,8 @@ class _ScaleAnimState extends State super.initState(); _controller = AnimationController( vsync: this, - duration: Duration(milliseconds: 200), - reverseDuration: Duration(milliseconds: 200), + duration: const Duration(milliseconds: 200), + reverseDuration: const Duration(milliseconds: 200), ); _animation = Tween( begin: 0, diff --git a/lib/core/widgets/animations/ship_anim.dart b/lib/core/widgets/animations/ship_anim.dart index 217ca2d..ddcdd3e 100644 --- a/lib/core/widgets/animations/ship_anim.dart +++ b/lib/core/widgets/animations/ship_anim.dart @@ -22,8 +22,8 @@ class _ShipAnimState extends State super.initState(); _controller = AnimationController( vsync: this, - duration: Duration(seconds: 15), - reverseDuration: Duration(seconds: 15), + duration: const Duration(seconds: 15), + reverseDuration: const Duration(seconds: 15), )..repeat(); } diff --git a/lib/core/widgets/animations/slide_anim.dart b/lib/core/widgets/animations/slide_anim.dart index 14c02c9..e62368d 100644 --- a/lib/core/widgets/animations/slide_anim.dart +++ b/lib/core/widgets/animations/slide_anim.dart @@ -19,7 +19,7 @@ class SlideAnim extends StatefulWidget { class _SlideAnimState extends State with SingleTickerProviderStateMixin { late Animation _animation; - final List offsetList = [ + final List offsetList = const [ Offset(-2, -2), Offset(2, -2), Offset(-2, 2), diff --git a/lib/core/widgets/animations/slide_down_fade.dart b/lib/core/widgets/animations/slide_down_fade.dart index e035c65..0ef73a7 100644 --- a/lib/core/widgets/animations/slide_down_fade.dart +++ b/lib/core/widgets/animations/slide_down_fade.dart @@ -25,8 +25,8 @@ class _SlideDownFadeState extends State super.initState(); _controller = AnimationController( vsync: this, - duration: Duration(milliseconds: 500), - reverseDuration: Duration(milliseconds: 500), + duration: const Duration(milliseconds: 500), + reverseDuration: const Duration(milliseconds: 500), ); _fadeAnim = Tween( @@ -35,7 +35,7 @@ class _SlideDownFadeState extends State ).animate(CurvedAnimation(parent: _controller, curve: Curves.easeIn)); _slideAnim = Tween( - begin: Offset(0, -0.1), + begin: const Offset(0, -0.1), end: Offset.zero, ).animate(CurvedAnimation(parent: _controller, curve: Curves.easeIn)); startAnim(); diff --git a/lib/core/widgets/animations/slide_up_fade.dart b/lib/core/widgets/animations/slide_up_fade.dart index 5b9dda4..8df3866 100644 --- a/lib/core/widgets/animations/slide_up_fade.dart +++ b/lib/core/widgets/animations/slide_up_fade.dart @@ -25,8 +25,8 @@ class _SlideUpFadeState extends State super.initState(); _controller = AnimationController( vsync: this, - duration: Duration(milliseconds: 500), - reverseDuration: Duration(milliseconds: 500), + duration: const Duration(milliseconds: 500), + reverseDuration: const Duration(milliseconds: 500), ); _fadeAnim = Tween( @@ -35,7 +35,7 @@ class _SlideUpFadeState extends State ).animate(CurvedAnimation(parent: _controller, curve: Curves.easeIn)); _slideAnim = Tween( - begin: Offset(0, 0.1), + begin: const Offset(0, 0.1), end: Offset.zero, ).animate(CurvedAnimation(parent: _controller, curve: Curves.easeIn)); startAnim(); diff --git a/lib/core/widgets/answer_box/styles/picture_box.dart b/lib/core/widgets/answer_box/styles/picture_box.dart index 6566b12..c7d4689 100644 --- a/lib/core/widgets/answer_box/styles/picture_box.dart +++ b/lib/core/widgets/answer_box/styles/picture_box.dart @@ -42,13 +42,13 @@ class AnswerPictureBox extends StatelessWidget { AspectRatio( aspectRatio: 1, child: AnimatedSwitcher( - duration: Duration(milliseconds: 150), - reverseDuration: Duration(milliseconds: 150), + duration: const Duration(milliseconds: 150), + reverseDuration: const Duration(milliseconds: 150), switchInCurve: Curves.linear, switchOutCurve: Curves.linear, child: selected && (index != correctAnswer) ? Gif( - key: Key('1'), + key: const Key('1'), width: context.widthScreen, height: context.heightScreen, image: FileImage(File(image)), @@ -59,7 +59,7 @@ class AnswerPictureBox extends StatelessWidget { colorBlendMode: BlendMode.color, ) : Gif( - key: Key('2'), + key: const Key('2'), width: context.widthScreen, height: context.heightScreen, image: FileImage(File(image)), @@ -80,7 +80,7 @@ class AnswerPictureBox extends StatelessWidget { child: Container( width: MySpaces.s34, alignment: Alignment.center, - decoration: BoxDecoration( + decoration: const BoxDecoration( color: Color(0XFFF2F7FF), borderRadius: BorderRadius.vertical( bottom: Radius.circular(10), @@ -89,7 +89,7 @@ class AnswerPictureBox extends StatelessWidget { child: Text( '$index', style: MYTextStyle.titr1.copyWith( - color: Color(0XFF9B85D8), + color: const Color(0XFF9B85D8), ), ), ), @@ -114,7 +114,7 @@ class _CustomShapePainter extends CustomPainter { @override void paint(Canvas canvas, Size size) { final Paint strokePaint = Paint() - ..color = Color(0XFFF2F7FF) + ..color = const Color(0XFFF2F7FF) ..style = PaintingStyle.stroke ..strokeWidth = 4; @@ -132,8 +132,8 @@ class _CustomShapeClipper extends CustomClipper { @override Path getClip(Size size) { // Original SVG dimensions to calculate the scaling factors. - final double originalWidth = 193.0; - final double originalHeight = 189.0; + const double originalWidth = 193.0; + const double originalHeight = 189.0; // Scaling factors to make the path responsive. final double scaleX = size.width / originalWidth; diff --git a/lib/core/widgets/answer_box/styles/text_box.dart b/lib/core/widgets/answer_box/styles/text_box.dart index 343e1c6..c6f82ec 100644 --- a/lib/core/widgets/answer_box/styles/text_box.dart +++ b/lib/core/widgets/answer_box/styles/text_box.dart @@ -13,9 +13,9 @@ class AnswerTextBox extends StatelessWidget { clipper: WavyBannerClipper(), child: Container( height: 90, - padding: EdgeInsets.symmetric(horizontal: MySpaces.s10), + padding: const EdgeInsets.symmetric(horizontal: MySpaces.s10), alignment: Alignment.center, - decoration: BoxDecoration( + decoration: const BoxDecoration( gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, @@ -29,7 +29,7 @@ class AnswerTextBox extends StatelessWidget { text, textAlign: TextAlign.center, style: MYTextStyle.matn2.copyWith( - color: Color(0XFF322386), + color: const Color(0XFF322386), height: 1.2, ), maxLines: 5, diff --git a/lib/core/widgets/button/my_blue_button.dart b/lib/core/widgets/button/my_blue_button.dart index b90f8b1..7082d11 100644 --- a/lib/core/widgets/button/my_blue_button.dart +++ b/lib/core/widgets/button/my_blue_button.dart @@ -41,7 +41,7 @@ class MyBlueButton extends StatelessWidget { child: Text( title ?? '', style: MYTextStyle.button1.copyWith( - color: Color(0XFF1D6EFF), + color: const Color(0XFF1D6EFF), ), ), ), diff --git a/lib/core/widgets/button/my_white_button.dart b/lib/core/widgets/button/my_white_button.dart index e88b951..62f9b61 100644 --- a/lib/core/widgets/button/my_white_button.dart +++ b/lib/core/widgets/button/my_white_button.dart @@ -40,7 +40,7 @@ class MyWhiteButton extends StatelessWidget { child: Text( title ?? '', style: MYTextStyle.button1.copyWith( - color: Color(0XFFD93D16), + color: const Color(0XFFD93D16), fontSize: setSize(context: context, tablet: 60), ), ), diff --git a/lib/core/widgets/button/my_yellow_button.dart b/lib/core/widgets/button/my_yellow_button.dart index 33fc12e..d9d746c 100644 --- a/lib/core/widgets/button/my_yellow_button.dart +++ b/lib/core/widgets/button/my_yellow_button.dart @@ -41,7 +41,7 @@ class MyYellowButton extends StatelessWidget { child: Text( title ?? '', style: MYTextStyle.button1.copyWith( - color: Color(0XFFD93D16), + color: const Color(0XFFD93D16), fontSize: setSize(context: context, tablet: 60), ), ), diff --git a/lib/core/widgets/confetti/my_confetti.dart b/lib/core/widgets/confetti/my_confetti.dart deleted file mode 100644 index a5f0486..0000000 --- a/lib/core/widgets/confetti/my_confetti.dart +++ /dev/null @@ -1,60 +0,0 @@ -import 'dart:math'; - -import 'package:confetti/confetti.dart'; -import 'package:flutter/material.dart'; - -class MyConfetti extends StatelessWidget { - const MyConfetti({super.key, required this.controller}); - - final ConfettiController controller; - - @override - Widget build(BuildContext context) { - return ConfettiWidget( - confettiController: controller, - shouldLoop: false, - blastDirectionality: BlastDirectionality.explosive, - blastDirection: pi / 2, - gravity: 1, - emissionFrequency: 0.5, - numberOfParticles: 15, - particleDrag: 0.1, - colors: const [ - Colors.red, - Colors.orange, - Colors.yellow, - Colors.green, - Colors.blue, - Colors.purple, - Colors.pink, - Colors.cyan, - ], - createParticlePath: (size) { - double degToRad(double deg) => deg * (pi / 180.0); - - const numberOfPoints = 5; - final halfWidth = size.width / 2; - final externalRadius = halfWidth; - final internalRadius = halfWidth / 2.5; - final degreesPerStep = degToRad(360 / numberOfPoints); - final halfDegreesPerStep = degreesPerStep / 2; - final path = Path(); - final fullAngle = degToRad(360); - path.moveTo(size.width, halfWidth); - - for (double step = 0; step < fullAngle; step += degreesPerStep) { - path.lineTo( - halfWidth + externalRadius * cos(step), - halfWidth + externalRadius * sin(step), - ); - path.lineTo( - halfWidth + internalRadius * cos(step + halfDegreesPerStep), - halfWidth + internalRadius * sin(step + halfDegreesPerStep), - ); - } - path.close(); - return path; - }, - ); - } -} diff --git a/lib/core/widgets/dialog/about_us_dialog.dart b/lib/core/widgets/dialog/about_us_dialog.dart index 75d8241..9760fcf 100644 --- a/lib/core/widgets/dialog/about_us_dialog.dart +++ b/lib/core/widgets/dialog/about_us_dialog.dart @@ -15,7 +15,7 @@ import 'package:hadi_hoda_flutter/core/widgets/inkwell/my_inkwell.dart'; Future showAboutUsDialog({required BuildContext context}) async { await showDialog( context: context, - builder: (context) => AboutUsDialog(), + builder: (context) => const AboutUsDialog(), barrierColor: MyColors.purple.withValues(alpha: 0.82), useSafeArea: false, ); @@ -49,7 +49,7 @@ class AboutUsDialog extends StatelessWidget { Text( context.translate.about_us, style: MYTextStyle.titr3.copyWith( - color: Color(0XFF322386), + color: const Color(0XFF322386), ), ), Expanded( @@ -58,14 +58,14 @@ class AboutUsDialog extends StatelessWidget { minFontSize: 12, maxFontSize: 20, style: MYTextStyle.matn1.copyWith( - color: Color(0XFF494178), + color: const Color(0XFF494178), ), ), ), - MyImage( + const MyImage( image: MyAssets.newHorizon, ), - MyImage( + const MyImage( image: MyAssets.khadijeLogo, size: 100, ), diff --git a/lib/core/widgets/dialog/exit_dialog.dart b/lib/core/widgets/dialog/exit_dialog.dart index 9d4a7bf..b059cf9 100644 --- a/lib/core/widgets/dialog/exit_dialog.dart +++ b/lib/core/widgets/dialog/exit_dialog.dart @@ -14,7 +14,7 @@ import 'package:hadi_hoda_flutter/core/widgets/dialog/styles/dialog_button.dart' Future showExitDialog({required BuildContext context}) async { await showDialog( context: context, - builder: (context) => ExitDialog(), + builder: (context) => const ExitDialog(), barrierColor: MyColors.purple.withValues(alpha: 0.82), useSafeArea: false, ); @@ -41,11 +41,11 @@ class ExitDialog extends StatelessWidget { children: [ Text( context.translate.want_to_exit, - style: MYTextStyle.titr0.copyWith(color: Color(0XFF322386)), + style: MYTextStyle.titr0.copyWith(color: const Color(0XFF322386)), ), Text( context.translate.exit_dialog_desc, - style: MYTextStyle.titr3.copyWith(color: Color(0XFF6272A9)), + style: MYTextStyle.titr3.copyWith(color: const Color(0XFF6272A9)), textAlign: TextAlign.center, ), Row( @@ -57,12 +57,12 @@ class ExitDialog extends StatelessWidget { context.pop(); }, height: 72, - color: Color(0XFFC0BDD3), + color: const Color(0XFFC0BDD3), child: Text( context.translate.cancel, style: MYTextStyle.button2.copyWith( shadows: [ - BoxShadow( + const BoxShadow( color: Color(0XFF9895AE), offset: Offset(0, 3.32), ), @@ -77,12 +77,12 @@ class ExitDialog extends StatelessWidget { SystemNavigator.pop(); }, height: 72, - color: Color(0XFFD42427), + color: const Color(0XFFD42427), child: Text( context.translate.exit, style: MYTextStyle.button2.copyWith( shadows: [ - BoxShadow( + const BoxShadow( color: Color(0XFFC82020), offset: Offset(0, 3.32), ), diff --git a/lib/core/widgets/dialog/hadith_dialog.dart b/lib/core/widgets/dialog/hadith_dialog.dart index 0191fce..b10e197 100644 --- a/lib/core/widgets/dialog/hadith_dialog.dart +++ b/lib/core/widgets/dialog/hadith_dialog.dart @@ -53,7 +53,7 @@ class HadithDialog extends StatelessWidget { if(hadith.isNotEmpty){ return ListView.separated( itemCount: hadith.length, - separatorBuilder: (context, index) => Divider( + separatorBuilder: (context, index) => const Divider( height: 40, thickness: 1, endIndent: MySpaces.s20, @@ -64,13 +64,13 @@ class HadithDialog extends StatelessWidget { TextSpan( text: '${hadith[index].narratorName ?? ''}:\n', style: MYTextStyle.titr1.copyWith( - color: Color(0XFF494178), + color: const Color(0XFF494178), ), children: [ TextSpan( text: hadith[index].hadithText, style: MYTextStyle.matn1.copyWith( - color: Color(0XFF494178), + color: const Color(0XFF494178), ), ), ], @@ -82,7 +82,7 @@ class HadithDialog extends StatelessWidget { child: Text( context.translate.no_hadith, style: MYTextStyle.titr4.copyWith( - color: Color(0XFF494178), + color: const Color(0XFF494178), ), ), ); diff --git a/lib/core/widgets/dialog/reward_dialog.dart b/lib/core/widgets/dialog/reward_dialog.dart index cb63843..5c5ee5e 100644 --- a/lib/core/widgets/dialog/reward_dialog.dart +++ b/lib/core/widgets/dialog/reward_dialog.dart @@ -62,14 +62,14 @@ class RewardDialog extends StatelessWidget { Text( context.translate.reward, style: MYTextStyle.titr0.copyWith( - color: Color(0XFF322386), + color: const Color(0XFF322386), fontSize: 22, ), ), Text( prize.title ?? '', style: MYTextStyle.titr0.copyWith( - color: Color(0XFF322386), + color: const Color(0XFF322386), fontSize: 22, ), ), @@ -91,7 +91,7 @@ class RewardDialog extends StatelessWidget { prize.imageURL ?? '', fit: BoxFit.cover, ), - MyImage( + const MyImage( image: MyAssets.iconPlayVideo, ), ], @@ -129,7 +129,7 @@ class _CustomShapePainter extends CustomPainter { @override void paint(Canvas canvas, Size size) { final Paint strokePaint = Paint() - ..color = Color(0XFFF2F7FF) + ..color = const Color(0XFFF2F7FF) ..style = PaintingStyle.stroke ..strokeWidth = 4; @@ -147,8 +147,8 @@ class _CustomShapeClipper extends CustomClipper { @override Path getClip(Size size) { // Original SVG dimensions to calculate the scaling factors. - final double originalWidth = 193.0; - final double originalHeight = 189.0; + const double originalWidth = 193.0; + const double originalHeight = 189.0; // Scaling factors to make the path responsive. final double scaleX = size.width / originalWidth; diff --git a/lib/core/widgets/error/error_state.dart b/lib/core/widgets/error/error_state.dart index 2d6244f..23d2c4c 100644 --- a/lib/core/widgets/error/error_state.dart +++ b/lib/core/widgets/error/error_state.dart @@ -17,19 +17,19 @@ class ErrorState extends StatelessWidget { Widget build(BuildContext context) { return Column( children: [ - Spacer(), + const Spacer(), Text( context.translate.lost_connection, style: MYTextStyle.button1, ), - MyImage(image: MyAssets.error), + const MyImage(image: MyAssets.error), MySpaces.s40.gapHeight, Text( context.translate.connected_to_internet, textAlign: TextAlign.center, style: MYTextStyle.matn3, ), - Spacer(), + const Spacer(), MyBlueButton( title: context.translate.retry, onTap: onTap, diff --git a/lib/core/widgets/showcase/my_showcase_widget.dart b/lib/core/widgets/showcase/my_showcase_widget.dart index 31c7858..4b762f1 100644 --- a/lib/core/widgets/showcase/my_showcase_widget.dart +++ b/lib/core/widgets/showcase/my_showcase_widget.dart @@ -20,7 +20,7 @@ enum ShowcaseTooltipType { crossAxisAlignment: CrossAxisAlignment.center, spacing: MySpaces.s4, children: [ - MyImage( + const MyImage( image: MyAssets.handPoint, size: 50, ), @@ -44,7 +44,7 @@ enum ShowcaseTooltipType { Transform.flip( flipY: true, flipX: true, - child: MyImage( + child: const MyImage( image: MyAssets.handPoint, size: 50, ), @@ -63,7 +63,7 @@ enum ShowcaseTooltipType { ), Transform.rotate( angle: 2.5, - child: MyImage( + child: const MyImage( image: MyAssets.handPoint, size: 50, ), @@ -98,8 +98,8 @@ class MyShowcaseWidget extends StatelessWidget { return Showcase( key: globalKey ?? GlobalKey(), disableBarrierInteraction: false, - targetShapeBorder: CircleBorder(), - overlayColor: Color(0XFF0F0041), + targetShapeBorder: const CircleBorder(), + overlayColor: const Color(0XFF0F0041), overlayOpacity: 0.82, /// ToolTip tooltipPadding: EdgeInsets.zero, @@ -108,7 +108,7 @@ class MyShowcaseWidget extends StatelessWidget { targetTooltipGap: 0, toolTipSlideEndDistance: MySpaces.s6, toolTipMargin: 0, - tooltipActionConfig: TooltipActionConfig( + tooltipActionConfig: const TooltipActionConfig( gapBetweenContentAndAction: 0, ), tooltipActions: [ diff --git a/lib/core/widgets/video/my_video_player.dart b/lib/core/widgets/video/my_video_player.dart index 7e37ffb..365898a 100644 --- a/lib/core/widgets/video/my_video_player.dart +++ b/lib/core/widgets/video/my_video_player.dart @@ -30,7 +30,7 @@ class _MyVideoPlayerState extends State { _mainAudioService.stop(); _effectAudioService.stop(); _controller = PodPlayerController( - podPlayerConfig: PodPlayerConfig( + podPlayerConfig: const PodPlayerConfig( autoPlay: false, isLooping: false, wakelockEnabled: true, @@ -62,7 +62,7 @@ class _MyVideoPlayerState extends State { matchVideoAspectRatioToFrame: true, matchFrameAspectRatioToVideo: true, videoAspectRatio: _controller.videoPlayerValue?.aspectRatio ?? 16 / 9, - podProgressBarConfig: PodProgressBarConfig(), + podProgressBarConfig: const PodProgressBarConfig(), onToggleFullScreen: (isFullScreen) async { if (isFullScreen) { await MyDevice.setAllOrientations(); diff --git a/lib/features/download/presentation/bloc/download_bloc.dart b/lib/features/download/presentation/bloc/download_bloc.dart index ffe9310..af7064e 100644 --- a/lib/features/download/presentation/bloc/download_bloc.dart +++ b/lib/features/download/presentation/bloc/download_bloc.dart @@ -40,7 +40,7 @@ class DownloadBloc extends Bloc { final LoadingStreamUseCase _loadingStreamUseCase; /// ------------Variables------------ - Stream loadingStream = Stream.empty(); + Stream loadingStream = const Stream.empty(); /// ------------Controllers------------ @@ -51,7 +51,7 @@ class DownloadBloc extends Bloc { GetImagesEvent event, Emitter emit, ) async { - emit(state.copyWith(getFilesStatus: BaseInit())); + emit(state.copyWith(getFilesStatus: const BaseInit())); await _getImagesUseCase(NoParams()).then((value) { value.fold( (data) { diff --git a/lib/features/download/presentation/ui/download_page.dart b/lib/features/download/presentation/ui/download_page.dart index 7efeedd..eee353d 100644 --- a/lib/features/download/presentation/ui/download_page.dart +++ b/lib/features/download/presentation/ui/download_page.dart @@ -25,7 +25,7 @@ class DownloadPage extends StatelessWidget { height: context.heightScreen, width: context.widthScreen, decoration: BoxDecoration( - gradient: LinearGradient( + gradient: const LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ @@ -34,7 +34,7 @@ class DownloadPage extends StatelessWidget { ], ), image: DecorationImage( - image: AssetImage(MyAssets.pattern), + image: const AssetImage(MyAssets.pattern), scale: 3, repeat: ImageRepeat.repeat, colorFilter: ColorFilter.mode( @@ -74,7 +74,7 @@ class DownloadPage extends StatelessWidget { } Widget _image() { - return Stack( + return const Stack( children: [ MyImage( image: MyAssets.hadiHoda, @@ -101,7 +101,7 @@ class DownloadPage extends StatelessWidget { style: MYTextStyle.titr0, ), StreamBuilder( - initialData: DownloadEntity(), + initialData: const DownloadEntity(), stream: context.read().loadingStream, builder: (context, snapshot) => Text( '${context.translate.downloading_data} (${snapshot.data?.count.toMB ?? 0.0}mb / ${snapshot.data?.total.toMB ?? 0.0}mb)', diff --git a/lib/features/download/presentation/ui/widgets/download_loading_widget.dart b/lib/features/download/presentation/ui/widgets/download_loading_widget.dart index 933eb13..c9cd0be 100644 --- a/lib/features/download/presentation/ui/widgets/download_loading_widget.dart +++ b/lib/features/download/presentation/ui/widgets/download_loading_widget.dart @@ -19,7 +19,7 @@ class DownloadLoadingWidget extends StatelessWidget { child: Container( width: 300, height: 60, - padding: EdgeInsets.symmetric( + padding: const EdgeInsets.symmetric( vertical: MySpaces.s4, horizontal: MySpaces.s2, ), @@ -34,7 +34,7 @@ class DownloadLoadingWidget extends StatelessWidget { ), ), child: StreamBuilder( - initialData: DownloadEntity(), + initialData: const DownloadEntity(), stream: loadingStream, builder: (context, snapshot) { return Row( @@ -49,12 +49,12 @@ class DownloadLoadingWidget extends StatelessWidget { end: 260 - ((snapshot.data?.percent ?? 0) * 260 / 100), ), decoration: BoxDecoration( - color: Color(0xFF1F59BD).withValues(alpha: 0.25), + color: const Color(0xFF1F59BD).withValues(alpha: 0.25), ), child: ClipPath( clipper: BubbleClip(), child: Container( - decoration: BoxDecoration( + decoration: const BoxDecoration( gradient: RadialGradient( radius: 2, colors: [ @@ -74,7 +74,7 @@ class DownloadLoadingWidget extends StatelessWidget { child: Text( '${snapshot.data?.percent?.toInt() ?? 0}%', style: MYTextStyle.titr4.copyWith( - color: Color(0XFF6E83A8), + color: const Color(0XFF6E83A8), ), ), ), diff --git a/lib/features/guider/presentation/bloc/guider_bloc.dart b/lib/features/guider/presentation/bloc/guider_bloc.dart index 96c3750..be6db95 100644 --- a/lib/features/guider/presentation/bloc/guider_bloc.dart +++ b/lib/features/guider/presentation/bloc/guider_bloc.dart @@ -115,12 +115,12 @@ class GuiderBloc extends Bloc { ); emit( state.copyWith( - getQuestionStatus: BaseComplete(''), + getQuestionStatus: const BaseComplete(''), levelEntity: level, currentQuestion: data.questions?.first, ), ); - await Future.delayed(Duration(milliseconds: 300), () { + await Future.delayed(const Duration(milliseconds: 300), () { animationController.forward().then((value) { startShowcase(); }); diff --git a/lib/features/guider/presentation/ui/guider_page.dart b/lib/features/guider/presentation/ui/guider_page.dart index 5058822..258107b 100644 --- a/lib/features/guider/presentation/ui/guider_page.dart +++ b/lib/features/guider/presentation/ui/guider_page.dart @@ -40,8 +40,8 @@ class _GuiderPageState extends State with TickerProviderStateMixin { .read() .animationController = AnimationController( vsync: this, - duration: Duration(milliseconds: 500), - reverseDuration: Duration(milliseconds: 500), + duration: const Duration(milliseconds: 500), + reverseDuration: const Duration(milliseconds: 500), ); } @@ -64,13 +64,13 @@ class _GuiderPageState extends State with TickerProviderStateMixin { 0, ), decoration: BoxDecoration( - gradient: LinearGradient( + gradient: const LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [Color(0XFF6930DA), Color(0XFF263AA1)], ), image: DecorationImage( - image: AssetImage(MyAssets.pattern), + image: const AssetImage(MyAssets.pattern), scale: 3, repeat: ImageRepeat.repeat, colorFilter: ColorFilter.mode( @@ -85,7 +85,7 @@ class _GuiderPageState extends State with TickerProviderStateMixin { android: MySpaces.s20, iOS: 50, )?.gapHeight ?? - SizedBox.shrink(), + const SizedBox.shrink(), _topButtons(context), MySpaces.s10.gapHeight, Expanded( @@ -100,7 +100,7 @@ class _GuiderPageState extends State with TickerProviderStateMixin { ), ), setPlatform(android: MySpaces.s20)?.gapHeight ?? - SizedBox.shrink(), + const SizedBox.shrink(), ], ), ), @@ -141,7 +141,7 @@ class _GuiderPageState extends State with TickerProviderStateMixin { .read() .showCaseKey['stepper_key']!, description: context.translate.showcase_stepper, - child: QuestionStepper(length: 4, currentStep: 1), + child: const QuestionStepper(length: 4, currentStep: 1), ), ); } @@ -157,7 +157,7 @@ class _GuiderPageState extends State with TickerProviderStateMixin { style: MYTextStyle.titr1.copyWith( shadows: [ BoxShadow( - offset: Offset(0, 2), + offset: const Offset(0, 2), color: MyColors.black.withValues(alpha: 0.25), ), ], @@ -172,13 +172,13 @@ class _GuiderPageState extends State with TickerProviderStateMixin { builder: (context, state) => GridView.builder( itemCount: state.currentQuestion?.answers?.length ?? 0, - physics: NeverScrollableScrollPhysics(), + physics: const NeverScrollableScrollPhysics(), shrinkWrap: true, clipBehavior: Clip.none, padding: EdgeInsets.symmetric( horizontal: setSize(context: context, tablet: 70) ?? 0, ), - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 2, crossAxisSpacing: MySpaces.s20, mainAxisSpacing: 20, @@ -186,7 +186,7 @@ class _GuiderPageState extends State with TickerProviderStateMixin { ), itemBuilder: (context, index) => state.currentQuestion?.answers?[index].imageId == null - ? SizedBox.shrink() + ? const SizedBox.shrink() : SlideAnim( controller: context.read().animationController, index: index, diff --git a/lib/features/home/presentation/ui/home_page.dart b/lib/features/home/presentation/ui/home_page.dart index 467afec..431473f 100644 --- a/lib/features/home/presentation/ui/home_page.dart +++ b/lib/features/home/presentation/ui/home_page.dart @@ -21,7 +21,7 @@ class HomePage extends StatelessWidget { return Scaffold( body: MyPopScope( child: DecoratedBox( - decoration: BoxDecoration( + decoration: const BoxDecoration( image: DecorationImage( image: AssetImage(MyAssets.backgroundHome), fit: BoxFit.cover, @@ -47,7 +47,7 @@ class HomePage extends StatelessWidget { top: setPlatform(android: MySpaces.s36, iOS: 50), end: MySpaces.s16, child: SlideDownFade( - delay: Duration(milliseconds: 200), + delay: const Duration(milliseconds: 200), child: StreamBuilder( initialData: 1, stream: context.read().volumeStream, @@ -67,7 +67,7 @@ class HomePage extends StatelessWidget { Positioned _image(BuildContext context) { return Positioned( top: setSize(context: context, mobile: 0.1.h, tablet: 0.15.h), - child: Stack( + child: const Stack( children: [ MyImage( image: MyAssets.hadiHoda, @@ -91,7 +91,7 @@ class HomePage extends StatelessWidget { right: MySpaces.s16, child: SafeArea( child: SlideUpFade( - delay: Duration(milliseconds: 200), + delay: const Duration(milliseconds: 200), child: Row( crossAxisAlignment: CrossAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.spaceBetween, diff --git a/lib/features/intro/presentation/bloc/intro_bloc.dart b/lib/features/intro/presentation/bloc/intro_bloc.dart index b863df4..34eb70c 100644 --- a/lib/features/intro/presentation/bloc/intro_bloc.dart +++ b/lib/features/intro/presentation/bloc/intro_bloc.dart @@ -37,7 +37,7 @@ class IntroBloc extends Bloc { /// ------------UseCases------------ /// ------------Variables------------ - final List intros = [ + final List intros = const [ Intro1Screen(key: Key('0')), Intro2Screen(key: Key('1')), Intro3Screen(key: Key('2')), diff --git a/lib/features/intro/presentation/ui/intro_page.dart b/lib/features/intro/presentation/ui/intro_page.dart index 0ef36e9..5663b63 100644 --- a/lib/features/intro/presentation/ui/intro_page.dart +++ b/lib/features/intro/presentation/ui/intro_page.dart @@ -31,8 +31,8 @@ class IntroPage extends StatelessWidget { BlocBuilder _mainScreen() { return BlocBuilder( builder: (context, state) => AnimatedSwitcher( - duration: Duration(milliseconds: 200), - reverseDuration: Duration(milliseconds: 200), + duration: const Duration(milliseconds: 200), + reverseDuration: const Duration(milliseconds: 200), switchInCurve: Curves.linear, switchOutCurve: Curves.linear, child: context.read().intros[state.currentIntro], diff --git a/lib/features/intro/presentation/ui/screens/intro_1_screen.dart b/lib/features/intro/presentation/ui/screens/intro_1_screen.dart index 37926cd..ae31cd1 100644 --- a/lib/features/intro/presentation/ui/screens/intro_1_screen.dart +++ b/lib/features/intro/presentation/ui/screens/intro_1_screen.dart @@ -12,12 +12,12 @@ class Intro1Screen extends StatelessWidget { return SizedBox.expand( child: PodVideoPlayer( controller: context.read().podController1, - overlayBuilder: (options) => SizedBox.shrink(), + overlayBuilder: (options) => const SizedBox.shrink(), alwaysShowProgressBar: false, videoAspectRatio: context.widthScreen / context.heightScreen, frameAspectRatio: context.widthScreen / context.heightScreen, - backgroundColor: Color(0XFF00154C), - onLoading: (context) => SizedBox.shrink(), + backgroundColor: const Color(0XFF00154C), + onLoading: (context) => const SizedBox.shrink(), ), ); } diff --git a/lib/features/intro/presentation/ui/screens/intro_2_screen.dart b/lib/features/intro/presentation/ui/screens/intro_2_screen.dart index 6ecdacb..36e110b 100644 --- a/lib/features/intro/presentation/ui/screens/intro_2_screen.dart +++ b/lib/features/intro/presentation/ui/screens/intro_2_screen.dart @@ -13,12 +13,12 @@ class Intro2Screen extends StatelessWidget { return SizedBox.expand( child: PodVideoPlayer( controller: context.read().podController2, - overlayBuilder: (options) => SizedBox.shrink(), + overlayBuilder: (options) => const SizedBox.shrink(), alwaysShowProgressBar: false, videoAspectRatio: context.widthScreen / context.heightScreen, frameAspectRatio: context.widthScreen / context.heightScreen, backgroundColor: MyColors.transparent, - onLoading: (context) => SizedBox.shrink(), + onLoading: (context) => const SizedBox.shrink(), ), ); } diff --git a/lib/features/intro/presentation/ui/screens/intro_3_screen.dart b/lib/features/intro/presentation/ui/screens/intro_3_screen.dart index 1330dff..135b381 100644 --- a/lib/features/intro/presentation/ui/screens/intro_3_screen.dart +++ b/lib/features/intro/presentation/ui/screens/intro_3_screen.dart @@ -13,12 +13,12 @@ class Intro3Screen extends StatelessWidget { return SizedBox.expand( child: PodVideoPlayer( controller: context.read().podController3, - overlayBuilder: (options) => SizedBox.shrink(), + overlayBuilder: (options) => const SizedBox.shrink(), alwaysShowProgressBar: false, videoAspectRatio: context.widthScreen / context.heightScreen, frameAspectRatio: context.widthScreen / context.heightScreen, backgroundColor: MyColors.transparent, - onLoading: (context) => SizedBox.shrink(), + onLoading: (context) => const SizedBox.shrink(), ), ); } diff --git a/lib/features/intro/presentation/ui/screens/intro_4_screen.dart b/lib/features/intro/presentation/ui/screens/intro_4_screen.dart index b365751..61209d7 100644 --- a/lib/features/intro/presentation/ui/screens/intro_4_screen.dart +++ b/lib/features/intro/presentation/ui/screens/intro_4_screen.dart @@ -13,12 +13,12 @@ class Intro4Screen extends StatelessWidget { return SizedBox.expand( child: PodVideoPlayer( controller: context.read().podController4, - overlayBuilder: (options) => SizedBox.shrink(), + overlayBuilder: (options) => const SizedBox.shrink(), alwaysShowProgressBar: false, videoAspectRatio: context.widthScreen / context.heightScreen, frameAspectRatio: context.widthScreen / context.heightScreen, backgroundColor: MyColors.transparent, - onLoading: (context) => SizedBox.shrink(), + onLoading: (context) => const SizedBox.shrink(), ), ); } diff --git a/lib/features/intro/presentation/ui/screens/intro_5_screen.dart b/lib/features/intro/presentation/ui/screens/intro_5_screen.dart index 7a235cf..57a61b8 100644 --- a/lib/features/intro/presentation/ui/screens/intro_5_screen.dart +++ b/lib/features/intro/presentation/ui/screens/intro_5_screen.dart @@ -13,12 +13,12 @@ class Intro5Screen extends StatelessWidget { return SizedBox.expand( child: PodVideoPlayer( controller: context.read().podController5, - overlayBuilder: (options) => SizedBox.shrink(), + overlayBuilder: (options) => const SizedBox.shrink(), alwaysShowProgressBar: false, videoAspectRatio: context.widthScreen / context.heightScreen, frameAspectRatio: context.widthScreen / context.heightScreen, backgroundColor: MyColors.transparent, - onLoading: (context) => SizedBox.shrink(), + onLoading: (context) => const SizedBox.shrink(), ), ); } diff --git a/lib/features/intro/presentation/ui/widgets/bubble_chat_widget.dart b/lib/features/intro/presentation/ui/widgets/bubble_chat_widget.dart index 729d6be..e29ed0c 100644 --- a/lib/features/intro/presentation/ui/widgets/bubble_chat_widget.dart +++ b/lib/features/intro/presentation/ui/widgets/bubble_chat_widget.dart @@ -21,15 +21,15 @@ class BubbleChatWidget extends StatelessWidget { clipper: _ShapeClipper(flip: flip), child: Container( width: width, - padding: EdgeInsets.only( + padding: const EdgeInsets.only( left: MySpaces.s18, right: MySpaces.s18, top: MySpaces.s16, bottom: MySpaces.s28, ), decoration: BoxDecoration( - color: Color(0XFFF5E8D7).withValues(alpha: 0.5), - borderRadius: BorderRadius.all(Radius.circular(20)), + color: const Color(0XFFF5E8D7).withValues(alpha: 0.5), + borderRadius: const BorderRadius.all(Radius.circular(20)), border: Border.all( width: 1, color: MyColors.white.withValues(alpha: 0.5), @@ -55,9 +55,9 @@ class _ShapeClipper extends CustomClipper { @override Path getClip(Size size) { - var path = Path(); - double w = size.width; - double h = size.height; + final Path path = Path(); + final double w = size.width; + final double h = size.height; // The drawing logic remains exactly the same path.moveTo(w * 0.92, 0); diff --git a/lib/features/language/presentation/bloc/language_bloc.dart b/lib/features/language/presentation/bloc/language_bloc.dart index c6a616f..bf9e56a 100644 --- a/lib/features/language/presentation/bloc/language_bloc.dart +++ b/lib/features/language/presentation/bloc/language_bloc.dart @@ -49,9 +49,9 @@ class LanguageBloc extends Bloc { value: state.selectedLang.code ?? MyConstants.defaultLanguage, ), ]); - AppBloc appBloc = locator(); + final AppBloc appBloc = locator(); appBloc.add( - ChangeLocaleEvent(state.selectedLang.locale ?? Locale('en', 'US'))); + ChangeLocaleEvent(state.selectedLang.locale ?? const Locale('en', 'US'))); if (Directory( '${StoragePath.documentDir.path}/${state.selectedLang diff --git a/lib/features/language/presentation/ui/language_page.dart b/lib/features/language/presentation/ui/language_page.dart index 811c017..189bc48 100644 --- a/lib/features/language/presentation/ui/language_page.dart +++ b/lib/features/language/presentation/ui/language_page.dart @@ -26,13 +26,13 @@ class LanguagePage extends StatelessWidget { height: context.heightScreen, width: context.widthScreen, decoration: BoxDecoration( - gradient: LinearGradient( + gradient: const LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [Color(0XFF00154C), Color(0XFF150532)], ), image: DecorationImage( - image: AssetImage(MyAssets.pattern), + image: const AssetImage(MyAssets.pattern), scale: 3, repeat: ImageRepeat.repeat, colorFilter: ColorFilter.mode( @@ -61,7 +61,7 @@ class LanguagePage extends StatelessWidget { spacing: MySpaces.s10, mainAxisAlignment: MainAxisAlignment.center, children: [ - MyImage(image: MyAssets.lang, size: 28), + const MyImage(image: MyAssets.lang, size: 28), Expanded( child: AutoSizeText( context.translate.select_language, @@ -69,7 +69,7 @@ class LanguagePage extends StatelessWidget { maxFontSize: 20, maxLines: 1, textAlign: TextAlign.center, - style: MYTextStyle.titr0.copyWith(color: Color(0XFF847AC4)), + style: MYTextStyle.titr0.copyWith(color: const Color(0XFF847AC4)), ), ), ], @@ -108,7 +108,7 @@ class LanguagePage extends StatelessWidget { Widget _btn(BuildContext context) { return MyBlueButton( - onTap: () => context.read().add(SaveLevelsEvent()), + onTap: () => context.read().add(const SaveLevelsEvent()), title: context.translate.select, ); } diff --git a/lib/features/language/presentation/ui/widgets/language_widget.dart b/lib/features/language/presentation/ui/widgets/language_widget.dart index 1725b68..fc2cd43 100644 --- a/lib/features/language/presentation/ui/widgets/language_widget.dart +++ b/lib/features/language/presentation/ui/widgets/language_widget.dart @@ -19,7 +19,7 @@ class LanguageWidget extends StatelessWidget { onTap: onTap, title: Text(title ?? ''), titleTextStyle: MYTextStyle.titr1, - contentPadding: EdgeInsets.symmetric( + contentPadding: const EdgeInsets.symmetric( vertical: MySpaces.s12, horizontal: 30, ), @@ -31,20 +31,20 @@ class LanguageWidget extends StatelessWidget { ? Container( height: 17, width: 17, - padding: EdgeInsets.all(3), + padding: const EdgeInsets.all(3), decoration: BoxDecoration( shape: BoxShape.circle, - border: Border.all(width: 1, color: Color(0XFF3CFF3C)), - gradient: LinearGradient( + border: Border.all(width: 1, color: const Color(0XFF3CFF3C)), + gradient: const LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [Color(0XFF48D336), Color(0XFF2D7C23)], ), ), - child: MyImage(image: MyAssets.doneRounded), + child: const MyImage(image: MyAssets.doneRounded), ) - : SizedBox(height: 17, width: 17), - shape: RoundedRectangleBorder( + : const SizedBox(height: 17, width: 17), + shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(12)), ), selectedTileColor: MyColors.white.withValues(alpha: 0.2), diff --git a/lib/features/level/data/datasource/level_datasource.dart b/lib/features/level/data/datasource/level_datasource.dart index 77490c1..e102bf5 100644 --- a/lib/features/level/data/datasource/level_datasource.dart +++ b/lib/features/level/data/datasource/level_datasource.dart @@ -26,7 +26,7 @@ class LocalLevelDatasourceImpl implements ILevelDatasource { ); return findData.nodes ?? []; } catch (_) { - throw MyException(errorMessage: 'Operation Failed'); + throw const MyException(errorMessage: 'Operation Failed'); } } } \ No newline at end of file diff --git a/lib/features/level/presentation/bloc/level_bloc.dart b/lib/features/level/presentation/bloc/level_bloc.dart index 62449dc..11e9ac7 100644 --- a/lib/features/level/presentation/bloc/level_bloc.dart +++ b/lib/features/level/presentation/bloc/level_bloc.dart @@ -240,7 +240,7 @@ class LevelBloc extends Bloc { } int get diamonds { - int currentLevel = int.parse( + final int currentLevel = int.parse( LocalStorage.readData(key: MyConstants.currentLevel) ?? '1', ); return currentLevel - 1; diff --git a/lib/features/level/presentation/ui/level_page.dart b/lib/features/level/presentation/ui/level_page.dart index 1c8c075..1bccb69 100644 --- a/lib/features/level/presentation/ui/level_page.dart +++ b/lib/features/level/presentation/ui/level_page.dart @@ -193,7 +193,7 @@ class LevelPage extends StatelessWidget { child: Stack( alignment: Alignment.center, children: [ - Positioned.fill( + const Positioned.fill( child: LevelPath(), ), Positioned.fill(child: _levelLocation(context)), @@ -243,7 +243,7 @@ class LevelPage extends StatelessWidget { } Widget _ship(BuildContext context) { - return ShipAnim( + return const ShipAnim( child: MyImage(image: MyAssets.ship), ); } @@ -278,7 +278,7 @@ class LevelPage extends StatelessWidget { size: setSize(context: context, tablet: 80), ), ), - Spacer(), + const Spacer(), DiamondLevel( diamonds: context.read().diamonds, ), @@ -299,7 +299,7 @@ class LevelPage extends StatelessWidget { } Widget _background(BuildContext context) { - return MyImage( + return const MyImage( image: MyAssets.mapBackground, fit: BoxFit.cover, ); diff --git a/lib/features/level/presentation/ui/widgets/bottom_path.dart b/lib/features/level/presentation/ui/widgets/bottom_path.dart index 0d5e1b3..66fb96f 100644 --- a/lib/features/level/presentation/ui/widgets/bottom_path.dart +++ b/lib/features/level/presentation/ui/widgets/bottom_path.dart @@ -10,7 +10,7 @@ class BottomPath extends StatelessWidget { @override Widget build(BuildContext context) { return CustomPaint( - painter: _Path(), + painter: const _Path(), size: Size( context.widthScreen * 0.76, context.heightScreen * 0.64, diff --git a/lib/features/level/presentation/ui/widgets/diamond_level.dart b/lib/features/level/presentation/ui/widgets/diamond_level.dart index 4170dc3..8caea48 100644 --- a/lib/features/level/presentation/ui/widgets/diamond_level.dart +++ b/lib/features/level/presentation/ui/widgets/diamond_level.dart @@ -32,7 +32,7 @@ class DiamondLevel extends StatelessWidget { MySpaces.s16.gapWidth, ShaderMask( blendMode: BlendMode.modulate, - shaderCallback: (bounds) => LinearGradient( + shaderCallback: (bounds) => const LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [Color(0XFF4BA5EA), Color(0XFF0C4EE9)], @@ -44,7 +44,7 @@ class DiamondLevel extends StatelessWidget { shadows: [ BoxShadow( color: MyColors.black.withValues(alpha: 0.25), - offset: Offset(0, 1.43), + offset: const Offset(0, 1.43), blurRadius: 1.43, ), ], diff --git a/lib/features/level/presentation/ui/widgets/node_widget.dart b/lib/features/level/presentation/ui/widgets/node_widget.dart index 46af3e4..93cb885 100644 --- a/lib/features/level/presentation/ui/widgets/node_widget.dart +++ b/lib/features/level/presentation/ui/widgets/node_widget.dart @@ -21,15 +21,15 @@ enum LevelType { }; static Map get textShadowColor => { - LevelType.unFinished: Color(0XFF5B5B5B), - LevelType.finished: Color(0XFF096D7B), - LevelType.current: Color(0XFF91500D), + LevelType.unFinished: const Color(0XFF5B5B5B), + LevelType.finished: const Color(0XFF096D7B), + LevelType.current: const Color(0XFF91500D), }; static Map get textColor => { - LevelType.unFinished: Color(0XFFEDEDED), - LevelType.finished: Color(0XFFFFF2D0), - LevelType.current: Color(0XFFFFF2D0), + LevelType.unFinished: const Color(0XFFEDEDED), + LevelType.finished: const Color(0XFFFFF2D0), + LevelType.current: const Color(0XFFFFF2D0), }; } @@ -66,10 +66,10 @@ class NodeWidget extends StatelessWidget { alignment: Alignment.center, children: [ if (getReward(node.prize?.afterLevel ?? 1)) ...{ - MyImage(image: MyAssets.giftBackground, size: 70), - MyImage(image: MyAssets.gift, size: 50), + const MyImage(image: MyAssets.giftBackground, size: 70), + const MyImage(image: MyAssets.gift, size: 50), } else ...{ - MyImage(image: MyAssets.giftDisable, size: 50), + const MyImage(image: MyAssets.giftDisable, size: 50), }, ], ), @@ -97,7 +97,7 @@ class NodeWidget extends StatelessWidget { begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ - Color(0XFFFFFFFF), + const Color(0XFFFFFFFF), LevelType.textColor[type(node.level?.order ?? 1)] ?? MyColors.white, ], @@ -118,7 +118,7 @@ class NodeWidget extends StatelessWidget { node.level?.order ?? 1, )] ?? MyColors.white, - offset: Offset(0, 2.97), + offset: const Offset(0, 2.97), ), ], ), @@ -138,17 +138,17 @@ class NodeWidget extends StatelessWidget { child: Container( height: setSize(context: context, mobile: 17, tablet: 24), width: setSize(context: context, mobile: 17, tablet: 24), - padding: EdgeInsets.all(3), + padding: const EdgeInsets.all(3), decoration: BoxDecoration( shape: BoxShape.circle, - border: Border.all(width: 1, color: Color(0XFF3CFF3C)), - gradient: LinearGradient( + border: Border.all(width: 1, color: const Color(0XFF3CFF3C)), + gradient: const LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [Color(0XFF48D336), Color(0XFF2D7C23)], ), ), - child: MyImage(image: MyAssets.doneRounded), + child: const MyImage(image: MyAssets.doneRounded), ), ), ], diff --git a/lib/features/level/presentation/ui/widgets/play_button.dart b/lib/features/level/presentation/ui/widgets/play_button.dart index bd41792..1a121b3 100644 --- a/lib/features/level/presentation/ui/widgets/play_button.dart +++ b/lib/features/level/presentation/ui/widgets/play_button.dart @@ -20,16 +20,16 @@ class PlayButton extends StatelessWidget { child: Stack( alignment: Alignment.center, children: [ - MyImage(image: MyAssets.button2), + const MyImage(image: MyAssets.button2), Positioned( top: MySpaces.s2, child: Row( spacing: MySpaces.s4, children: [ - MyImage(image: MyAssets.iconPlay), + const MyImage(image: MyAssets.iconPlay), ShaderMask( blendMode: BlendMode.modulate, - shaderCallback: (bounds) => LinearGradient( + shaderCallback: (bounds) => const LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [Color(0XFFF9601F), Color(0XFFD93D16)], @@ -40,8 +40,8 @@ class PlayButton extends StatelessWidget { style: MYTextStyle.button1.copyWith( shadows: [ BoxShadow( - color: Color(0XFFFFFFAB).withValues(alpha: 0.40), - offset: Offset(0, 2.61), + color: const Color(0XFFFFFFAB).withValues(alpha: 0.40), + offset: const Offset(0, 2.61), ), ], ), @@ -54,7 +54,7 @@ class PlayButton extends StatelessWidget { bottom: MySpaces.s20, child: Text( '${context.translate.step} ${level.order ?? 0}', - style: MYTextStyle.matn3.copyWith(color: Color(0XFFD8490B)), + style: MYTextStyle.matn3.copyWith(color: const Color(0XFFD8490B)), ), ), ], diff --git a/lib/features/question/data/datasource/question_datasource.dart b/lib/features/question/data/datasource/question_datasource.dart index a89b1f3..076b51a 100644 --- a/lib/features/question/data/datasource/question_datasource.dart +++ b/lib/features/question/data/datasource/question_datasource.dart @@ -49,7 +49,7 @@ class QuestionDatasourceImpl implements IQuestionDatasource { orElse: () => TotalDataEntity(), ); if(index > (findData.nodes?.length ?? 0)){ - throw MyException(); + throw const MyException(); } final NodeEntity? findLevel = findData.nodes?.singleWhere( (e) => e.level?.order == index, diff --git a/lib/features/question/presentation/bloc/question_bloc.dart b/lib/features/question/presentation/bloc/question_bloc.dart index 2937190..910d465 100644 --- a/lib/features/question/presentation/bloc/question_bloc.dart +++ b/lib/features/question/presentation/bloc/question_bloc.dart @@ -29,7 +29,7 @@ class QuestionBloc extends Bloc { this._getNextLevelUseCase, this._mainAudioService, this._effectAudioService, - ) : super(QuestionState()) { + ) : super(const QuestionState()) { volumeStream = _mainAudioService.volumeStream(); playingStream = _mainAudioService.playingStream(); initAudios(); @@ -238,7 +238,7 @@ class QuestionBloc extends Bloc { ], ); emit(state.copyWith( - getQuestionStatus: BaseComplete(''), + getQuestionStatus: const BaseComplete(''), levelEntity: level, currentQuestion: data.questions?.first, )); @@ -268,7 +268,7 @@ class QuestionBloc extends Bloc { e.order == event.correctAnswer) ?? AnswerEntity(), showConfetti: true, ); - await Future.delayed(Duration(seconds: 1), () async { + await Future.delayed(const Duration(seconds: 1), () async { final QuestionEntity? findPreQuestion = state.currentQuestion; final int findIndex = (findPreQuestion?.order ?? 1); emit( @@ -291,7 +291,7 @@ class QuestionBloc extends Bloc { } else { showingAnswerSequence(show: true); answerAnimationController.reverse(); - await Future.delayed(Duration(seconds: 1)); + await Future.delayed(const Duration(seconds: 1)); imageAnimationController.forward(); await playQuestionAudio(); imageAnimationController.reverse(); diff --git a/lib/features/question/presentation/ui/question_page.dart b/lib/features/question/presentation/ui/question_page.dart index 2feda58..d64f6e7 100644 --- a/lib/features/question/presentation/ui/question_page.dart +++ b/lib/features/question/presentation/ui/question_page.dart @@ -33,13 +33,13 @@ class QuestionPage extends StatelessWidget { tablet: MySpaces.s30) ?? 0, ), decoration: BoxDecoration( - gradient: LinearGradient( + gradient: const LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [Color(0XFF6930DA), Color(0XFF263AA1)], ), image: DecorationImage( - image: AssetImage(MyAssets.pattern), + image: const AssetImage(MyAssets.pattern), scale: 3, repeat: ImageRepeat.repeat, colorFilter: ColorFilter.mode( @@ -50,7 +50,7 @@ class QuestionPage extends StatelessWidget { ), child: Column( children: [ - setPlatform(android: MySpaces.s20, iOS: 50)?.gapHeight ?? SizedBox.shrink(), + setPlatform(android: MySpaces.s20, iOS: 50)?.gapHeight ?? const SizedBox.shrink(), _topButtons(context), MySpaces.s10.gapHeight, Expanded( @@ -61,14 +61,14 @@ class QuestionPage extends StatelessWidget { builder: (context, state) { if (state.currentQuestion?.order == state.levelEntity?.questions?.length) { - return DiamondScreen(); + return const DiamondScreen(); } else { - return QuestionScreen(); + return const QuestionScreen(); } }, ), ), - setPlatform(android: MySpaces.s20,)?.gapHeight ?? SizedBox.shrink(), + setPlatform(android: MySpaces.s20,)?.gapHeight ?? const SizedBox.shrink(), ], ), ), diff --git a/lib/features/question/presentation/ui/screens/diamond_screen.dart b/lib/features/question/presentation/ui/screens/diamond_screen.dart index 2a236b7..8c8ac35 100644 --- a/lib/features/question/presentation/ui/screens/diamond_screen.dart +++ b/lib/features/question/presentation/ui/screens/diamond_screen.dart @@ -41,7 +41,7 @@ class DiamondScreen extends StatelessWidget { Lottie.asset( MyAnimations.lightPurple, ), - MyImage( + const MyImage( image: MyAssets.diamondBig, ), Positioned( @@ -58,7 +58,7 @@ class DiamondScreen extends StatelessWidget { style: MYTextStyle.titr0, ), ShaderMask( - shaderCallback: (bounds) => LinearGradient( + shaderCallback: (bounds) => const LinearGradient( begin: Alignment.centerLeft, end: Alignment.centerRight, colors: [ @@ -72,7 +72,7 @@ class DiamondScreen extends StatelessWidget { shadows: [ BoxShadow( color: MyColors.black.withValues(alpha: 0.25), - offset: Offset(0, 1.22), + offset: const Offset(0, 1.22), blurRadius: 0.82, ), ], @@ -150,7 +150,7 @@ class DiamondScreen extends StatelessWidget { Widget _ship(BuildContext context) { - return ShipAnim( + return const ShipAnim( child: MyImage(image: MyAssets.ship), ); } diff --git a/lib/features/question/presentation/ui/screens/question_screen.dart b/lib/features/question/presentation/ui/screens/question_screen.dart index 4f5d106..506bf41 100644 --- a/lib/features/question/presentation/ui/screens/question_screen.dart +++ b/lib/features/question/presentation/ui/screens/question_screen.dart @@ -42,14 +42,14 @@ class _QuestionScreenState extends State with TickerProviderStat WidgetsBinding.instance.addObserver(this); context.read().answerAnimationController = AnimationController( vsync: this, - duration: Duration(milliseconds: 500), - reverseDuration: Duration(milliseconds: 500), + duration: const Duration(milliseconds: 500), + reverseDuration: const Duration(milliseconds: 500), ); context.read().imageAnimationController = AnimationController( vsync: this, - duration: Duration(milliseconds: 500), - reverseDuration: Duration(milliseconds: 500), + duration: const Duration(milliseconds: 500), + reverseDuration: const Duration(milliseconds: 500), ); if(LocalStorage.readData(key: MyConstants.firstShowcase) == 'true') { context.read().imageAnimationController.forward(); @@ -93,10 +93,10 @@ class _QuestionScreenState extends State with TickerProviderStat Widget _questionImage(BuildContext context) { return Column( children: [ - Spacer(), + const Spacer(), BlocBuilder( builder: (context, state) => FadeAnimDelayed( - duration: Duration(seconds: 1), + duration: const Duration(seconds: 1), child: FadeAnimController( key: Key('${state.currentQuestion?.image}'), controller: context.read().imageAnimationController, @@ -111,7 +111,7 @@ class _QuestionScreenState extends State with TickerProviderStat ), ), ), - Spacer(), + const Spacer(), ], ); } @@ -141,7 +141,7 @@ class _QuestionScreenState extends State with TickerProviderStat style: MYTextStyle.titr1.copyWith( shadows: [ BoxShadow( - offset: Offset(0, 2), + offset: const Offset(0, 2), color: MyColors.black.withValues(alpha: 0.25), ), ], @@ -161,13 +161,13 @@ class _QuestionScreenState extends State with TickerProviderStat previous.currentQuestion?.id != current.currentQuestion?.id, builder: (context, state) => GridView.builder( itemCount: state.currentQuestion?.answers?.length ?? 0, - physics: NeverScrollableScrollPhysics(), + physics: const NeverScrollableScrollPhysics(), shrinkWrap: true, clipBehavior: Clip.none, padding: EdgeInsets.symmetric( horizontal: setSize(context: context, tablet: 70) ?? 0, ), - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 2, crossAxisSpacing: MySpaces.s20, mainAxisSpacing: 20, @@ -175,7 +175,7 @@ class _QuestionScreenState extends State with TickerProviderStat ), itemBuilder: (context, index) => state.currentQuestion?.answers?[index].imageId == null - ? SizedBox.shrink() + ? const SizedBox.shrink() : SlideAnim( key: Key('${state.currentQuestion?.id}'), controller: context.read().answerAnimationController, diff --git a/lib/features/question/presentation/ui/widgets/glassy_button.dart b/lib/features/question/presentation/ui/widgets/glassy_button.dart index 2e9cc1c..4befc3c 100644 --- a/lib/features/question/presentation/ui/widgets/glassy_button.dart +++ b/lib/features/question/presentation/ui/widgets/glassy_button.dart @@ -25,7 +25,7 @@ class GlassyButton extends StatelessWidget { end: Alignment.bottomCenter, colors: [ Colors.white.withValues(alpha: 0.3), - Color(0XFF6930DA).withValues(alpha: 0.1), + const Color(0XFF6930DA).withValues(alpha: 0.1), ], ), border: Border.all(color: Colors.white.withValues(alpha: 0.3)), @@ -33,7 +33,7 @@ class GlassyButton extends StatelessWidget { child: MyInkwell( onTap: onTap, audio: audio, - borderRadius: BorderRadius.all(Radius.circular(100)), + borderRadius: const BorderRadius.all(Radius.circular(100)), child: Padding( padding: EdgeInsets.all( setSize(context: context, mobile: MySpaces.s12, tablet: MySpaces.s20) ?? 0, diff --git a/lib/features/question/presentation/ui/widgets/question_stepper.dart b/lib/features/question/presentation/ui/widgets/question_stepper.dart index d7408b4..f763ca4 100644 --- a/lib/features/question/presentation/ui/widgets/question_stepper.dart +++ b/lib/features/question/presentation/ui/widgets/question_stepper.dart @@ -15,7 +15,7 @@ class QuestionStepper extends StatelessWidget { height: 70, child: EasyStepper( activeStep: currentStep - 1, - lineStyle: LineStyle( + lineStyle: const LineStyle( lineLength: 20, lineType: LineType.normal, defaultLineColor: Color(0XFFDFDDF6), @@ -29,36 +29,36 @@ class QuestionStepper extends StatelessWidget { showLoadingAnimation: false, stepRadius: 18, showStepBorder: false, - padding: EdgeInsets.all(0), + padding: const EdgeInsets.all(0), enableStepTapping: false, steps: List.generate( length, (index) => EasyStep( customStep: index == length - 1 - ? MyImage(image: MyAssets.diamond, size: 50) + ? const MyImage(image: MyAssets.diamond, size: 50) : ClipPath( clipper: _StepperClipper(), child: Container( height: 32, width: 32, - padding: EdgeInsets.all(4), - decoration: BoxDecoration( + padding: const EdgeInsets.all(4), + decoration: const BoxDecoration( color: Color(0XFFDFDDF6), shape: BoxShape.circle, ), child: ClipPath( clipper: _StepperClipper(), child: Container( - padding: EdgeInsets.all(6), + padding: const EdgeInsets.all(6), decoration: BoxDecoration( shape: BoxShape.circle, color: index < currentStep - 1 - ? Color(0XFF21B738) + ? const Color(0XFF21B738) : index == currentStep - 1 - ? Color(0XFF847AC4) + ? const Color(0XFF847AC4) : Colors.transparent, ), - child: index < currentStep - 1 ? MyImage(image: MyAssets.done) : null, + child: index < currentStep - 1 ? const MyImage(image: MyAssets.done) : null, ), ), ), diff --git a/lib/features/question/presentation/ui/widgets/question_title.dart b/lib/features/question/presentation/ui/widgets/question_title.dart index 4d4305e..5262ec9 100644 --- a/lib/features/question/presentation/ui/widgets/question_title.dart +++ b/lib/features/question/presentation/ui/widgets/question_title.dart @@ -31,7 +31,7 @@ class QuestionTitle extends StatelessWidget { BoxShadow( color: MyColors.black.withValues(alpha: 0.25), blurRadius: 0.82, - offset: Offset(0, 1.22), + offset: const Offset(0, 1.22), ), ], ), diff --git a/lib/features/sample/presentation/ui/sample_page.dart b/lib/features/sample/presentation/ui/sample_page.dart index 848565d..0292338 100644 --- a/lib/features/sample/presentation/ui/sample_page.dart +++ b/lib/features/sample/presentation/ui/sample_page.dart @@ -5,7 +5,7 @@ class SamplePage extends StatelessWidget { @override Widget build(BuildContext context) { - return Scaffold( + return const Scaffold( body: Center( child: Text('Sample Page'), ), diff --git a/lib/features/splash/presentation/bloc/splash_bloc.dart b/lib/features/splash/presentation/bloc/splash_bloc.dart index b4270a2..266f31f 100644 --- a/lib/features/splash/presentation/bloc/splash_bloc.dart +++ b/lib/features/splash/presentation/bloc/splash_bloc.dart @@ -21,7 +21,7 @@ class SplashBloc extends Bloc { Future goToHomePage(BuildContext context) async { await preCacheImages(); await Future.delayed( - Duration(seconds: 2), + const Duration(seconds: 2), () { if (context.mounted) { context.goNamed(Routes.homePage); diff --git a/lib/features/splash/presentation/ui/splash_page.dart b/lib/features/splash/presentation/ui/splash_page.dart index 7036d27..79ea4a3 100644 --- a/lib/features/splash/presentation/ui/splash_page.dart +++ b/lib/features/splash/presentation/ui/splash_page.dart @@ -32,7 +32,7 @@ class _SplashPageState extends State { height: context.heightScreen, width: context.widthScreen, decoration: BoxDecoration( - gradient: LinearGradient( + gradient: const LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ @@ -41,7 +41,7 @@ class _SplashPageState extends State { ], ), image: DecorationImage( - image: AssetImage(MyAssets.pattern), + image: const AssetImage(MyAssets.pattern), scale: 3, repeat: ImageRepeat.repeat, colorFilter: ColorFilter.mode( @@ -62,7 +62,7 @@ class _SplashPageState extends State { } Widget _image() { - return Stack( + return const Stack( children: [ MyImage( image: MyAssets.hadiHoda, diff --git a/lib/init_bindings.dart b/lib/init_bindings.dart index 9a80563..cf4e6e5 100644 --- a/lib/init_bindings.dart +++ b/lib/init_bindings.dart @@ -70,18 +70,18 @@ void initBindings() { locator.registerLazySingleton(() => LoadingStreamUseCase(locator())); /// Guider Feature - locator.registerLazySingleton(() => GuiderDatasourceImpl()); + locator.registerLazySingleton(() => const GuiderDatasourceImpl()); locator.registerLazySingleton(() => GuiderRepositoryImpl(locator())); locator.registerLazySingleton(() => GetFirstLevelUseCase(locator())); /// Question Feature - locator.registerLazySingleton(() => QuestionDatasourceImpl()); + locator.registerLazySingleton(() => const QuestionDatasourceImpl()); locator.registerLazySingleton(() => QuestionRepositoryImpl(locator())); locator.registerLazySingleton(() => GetLevelUseCase(locator())); locator.registerLazySingleton(() => GetNextLevelUseCase(locator())); /// Level Feature - locator.registerLazySingleton(() => LocalLevelDatasourceImpl()); + locator.registerLazySingleton(() => const LocalLevelDatasourceImpl()); locator.registerLazySingleton(() => LevelRepositoryImpl(locator())); locator.registerLazySingleton(() => GetLevelsUseCase(locator())); } diff --git a/lib/main.dart b/lib/main.dart index b09833c..1b11c47 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -44,7 +44,7 @@ class MainApp extends StatelessWidget { themeMode: ThemeService.getTheme(), locale: state.locale, supportedLocales: MyConstants.languages.map( - (e) => e.locale ?? Locale('en', 'US'), + (e) => e.locale ?? const Locale('en', 'US'), ), routerConfig: appPages, localizationsDelegates: const [ diff --git a/pubspec.lock b/pubspec.lock deleted file mode 100644 index b4f8cb6..0000000 --- a/pubspec.lock +++ /dev/null @@ -1,1183 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" - url: "https://pub.dev" - source: hosted - version: "67.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" - url: "https://pub.dev" - source: hosted - version: "6.4.1" - archive: - dependency: transitive - description: - name: archive - sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd" - url: "https://pub.dev" - source: hosted - version: "4.0.7" - args: - dependency: transitive - description: - name: args - sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 - url: "https://pub.dev" - source: hosted - version: "2.7.0" - async: - dependency: transitive - description: - name: async - sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" - url: "https://pub.dev" - source: hosted - version: "2.13.0" - audio_session: - dependency: transitive - description: - name: audio_session - sha256: "8f96a7fecbb718cb093070f868b4cdcb8a9b1053dce342ff8ab2fde10eb9afb7" - url: "https://pub.dev" - source: hosted - version: "0.2.2" - auto_size_text: - dependency: "direct main" - description: - name: auto_size_text - sha256: "3f5261cd3fb5f2a9ab4e2fc3fba84fd9fcaac8821f20a1d4e71f557521b22599" - url: "https://pub.dev" - source: hosted - version: "3.0.0" - bloc: - dependency: "direct main" - description: - name: bloc - sha256: e18b8e7825e9921d67a6d256dba0b6015ece8a577eb0a411845c46a352994d78 - url: "https://pub.dev" - source: hosted - version: "9.0.1" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - build: - dependency: transitive - description: - name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - build_config: - dependency: transitive - description: - name: build_config - sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33" - url: "https://pub.dev" - source: hosted - version: "1.1.2" - build_daemon: - dependency: transitive - description: - name: build_daemon - sha256: "8e928697a82be082206edb0b9c99c5a4ad6bc31c9e9b8b2f291ae65cd4a25daa" - url: "https://pub.dev" - source: hosted - version: "4.0.4" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" - url: "https://pub.dev" - source: hosted - version: "2.4.2" - build_runner: - dependency: "direct dev" - description: - name: build_runner - sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d" - url: "https://pub.dev" - source: hosted - version: "2.4.13" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 - url: "https://pub.dev" - source: hosted - version: "7.3.2" - built_collection: - dependency: transitive - description: - name: built_collection - sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" - url: "https://pub.dev" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - sha256: a30f0a0e38671e89a492c44d005b5545b830a961575bbd8336d42869ff71066d - url: "https://pub.dev" - source: hosted - version: "8.12.0" - characters: - dependency: transitive - description: - name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - charcode: - dependency: transitive - description: - name: charcode - sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a - url: "https://pub.dev" - source: hosted - version: "1.4.0" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f" - url: "https://pub.dev" - source: hosted - version: "2.0.4" - clock: - dependency: transitive - description: - name: clock - sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b - url: "https://pub.dev" - source: hosted - version: "1.1.2" - code_builder: - dependency: transitive - description: - name: code_builder - sha256: "11654819532ba94c34de52ff5feb52bd81cba1de00ef2ed622fd50295f9d4243" - url: "https://pub.dev" - source: hosted - version: "4.11.0" - collection: - dependency: transitive - description: - name: collection - sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" - url: "https://pub.dev" - source: hosted - version: "1.19.1" - confetti: - dependency: "direct main" - description: - name: confetti - sha256: "79376a99648efbc3f23582f5784ced0fe239922bd1a0fb41f582051eba750751" - url: "https://pub.dev" - source: hosted - version: "0.8.0" - convert: - dependency: transitive - description: - name: convert - sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 - url: "https://pub.dev" - source: hosted - version: "3.1.2" - crypto: - dependency: transitive - description: - name: crypto - sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" - url: "https://pub.dev" - source: hosted - version: "3.0.6" - csslib: - dependency: transitive - description: - name: csslib - sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" - url: "https://pub.dev" - source: hosted - version: "1.0.2" - dart_style: - dependency: transitive - description: - name: dart_style - sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" - url: "https://pub.dev" - source: hosted - version: "2.3.6" - dbus: - dependency: transitive - description: - name: dbus - sha256: "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c" - url: "https://pub.dev" - source: hosted - version: "0.7.11" - dio: - dependency: "direct main" - description: - name: dio - sha256: d90ee57923d1828ac14e492ca49440f65477f4bb1263575900be731a3dac66a9 - url: "https://pub.dev" - source: hosted - version: "5.9.0" - dio_web_adapter: - dependency: transitive - description: - name: dio_web_adapter - sha256: "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - easy_stepper: - dependency: "direct main" - description: - name: easy_stepper - sha256: "63f66314a509ec690c8152a41288961fd96ba9e92ef184299f068a5e78bd16ad" - url: "https://pub.dev" - source: hosted - version: "0.8.5+1" - equatable: - dependency: "direct main" - description: - name: equatable - sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7" - url: "https://pub.dev" - source: hosted - version: "2.0.7" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" - url: "https://pub.dev" - source: hosted - version: "1.3.3" - ffi: - dependency: transitive - description: - name: ffi - sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - file: - dependency: transitive - description: - name: file - sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 - url: "https://pub.dev" - source: hosted - version: "7.0.1" - fixnum: - dependency: transitive - description: - name: fixnum - sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be - url: "https://pub.dev" - source: hosted - version: "1.1.1" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_archive: - dependency: "direct main" - description: - name: flutter_archive - sha256: "5ca235f304c12bf468979235f400f79846d204169d715939e39197106f5fc970" - url: "https://pub.dev" - source: hosted - version: "6.0.3" - flutter_bloc: - dependency: "direct main" - description: - name: flutter_bloc - sha256: cf51747952201a455a1c840f8171d273be009b932c75093020f9af64f2123e38 - url: "https://pub.dev" - source: hosted - version: "9.1.1" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" - url: "https://pub.dev" - source: hosted - version: "5.0.0" - flutter_localizations: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - sha256: "7294967ff0a6d98638e7acb774aac3af2550777accd8149c90af5b014e6d44d8" - url: "https://pub.dev" - source: hosted - version: "3.1.0" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 - url: "https://pub.dev" - source: hosted - version: "4.0.0" - get: - dependency: transitive - description: - name: get - sha256: "5ed34a7925b85336e15d472cc4cfe7d9ebf4ab8e8b9f688585bf6b50f4c3d79a" - url: "https://pub.dev" - source: hosted - version: "4.7.3" - get_it: - dependency: "direct main" - description: - name: get_it - sha256: a4292e7cf67193f8e7c1258203104eb2a51ec8b3a04baa14695f4064c144297b - url: "https://pub.dev" - source: hosted - version: "8.2.0" - gif: - dependency: "direct main" - description: - name: gif - sha256: ade95694f1471da737922806818ffade2814d1d7f8d10af38ebcf36ace012bc0 - url: "https://pub.dev" - source: hosted - version: "2.3.0" - glob: - dependency: transitive - description: - name: glob - sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de - url: "https://pub.dev" - source: hosted - version: "2.1.3" - go_router: - dependency: "direct main" - description: - name: go_router - sha256: c752e2d08d088bf83742cb05bf83003f3e9d276ff1519b5c92f9d5e60e5ddd23 - url: "https://pub.dev" - source: hosted - version: "16.2.4" - graphs: - dependency: transitive - description: - name: graphs - sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - hive: - dependency: "direct main" - description: - name: hive - sha256: "8dcf6db979d7933da8217edcec84e9df1bdb4e4edc7fc77dbd5aa74356d6d941" - url: "https://pub.dev" - source: hosted - version: "2.2.3" - hive_generator: - dependency: "direct dev" - description: - name: hive_generator - sha256: "06cb8f58ace74de61f63500564931f9505368f45f98958bd7a6c35ba24159db4" - url: "https://pub.dev" - source: hosted - version: "2.0.1" - html: - dependency: transitive - description: - name: html - sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602" - url: "https://pub.dev" - source: hosted - version: "0.15.6" - http: - dependency: transitive - description: - name: http - sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007 - url: "https://pub.dev" - source: hosted - version: "1.5.0" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 - url: "https://pub.dev" - source: hosted - version: "3.2.2" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" - url: "https://pub.dev" - source: hosted - version: "4.1.2" - intl: - dependency: "direct main" - description: - name: intl - sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" - url: "https://pub.dev" - source: hosted - version: "0.20.2" - io: - dependency: transitive - description: - name: io - sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b - url: "https://pub.dev" - source: hosted - version: "1.0.5" - js: - dependency: transitive - description: - name: js - sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" - url: "https://pub.dev" - source: hosted - version: "0.7.2" - json_annotation: - dependency: transitive - description: - name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" - url: "https://pub.dev" - source: hosted - version: "4.9.0" - just_audio: - dependency: "direct main" - description: - name: just_audio - sha256: "9694e4734f515f2a052493d1d7e0d6de219ee0427c7c29492e246ff32a219908" - url: "https://pub.dev" - source: hosted - version: "0.10.5" - just_audio_platform_interface: - dependency: transitive - description: - name: just_audio_platform_interface - sha256: "2532c8d6702528824445921c5ff10548b518b13f808c2e34c2fd54793b999a6a" - url: "https://pub.dev" - source: hosted - version: "4.6.0" - just_audio_web: - dependency: transitive - description: - name: just_audio_web - sha256: "6ba8a2a7e87d57d32f0f7b42856ade3d6a9fbe0f1a11fabae0a4f00bb73f0663" - url: "https://pub.dev" - source: hosted - version: "0.4.16" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" - url: "https://pub.dev" - source: hosted - version: "11.0.2" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" - url: "https://pub.dev" - source: hosted - version: "3.0.10" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - lints: - dependency: transitive - description: - name: lints - sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 - url: "https://pub.dev" - source: hosted - version: "5.1.1" - logging: - dependency: transitive - description: - name: logging - sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 - url: "https://pub.dev" - source: hosted - version: "1.3.0" - lottie: - dependency: "direct main" - description: - name: lottie - sha256: "8ae0be46dbd9e19641791dc12ee480d34e1fd3f84c749adc05f3ad9342b71b95" - url: "https://pub.dev" - source: hosted - version: "3.3.2" - matcher: - dependency: transitive - description: - name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 - url: "https://pub.dev" - source: hosted - version: "0.12.17" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec - url: "https://pub.dev" - source: hosted - version: "0.11.1" - meta: - dependency: transitive - description: - name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c - url: "https://pub.dev" - source: hosted - version: "1.16.0" - mime: - dependency: transitive - description: - name: mime - sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" - url: "https://pub.dev" - source: hosted - version: "2.0.0" - nested: - dependency: transitive - description: - name: nested - sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - package_config: - dependency: transitive - description: - name: package_config - sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc - url: "https://pub.dev" - source: hosted - version: "2.2.0" - package_info_plus: - dependency: transitive - description: - name: package_info_plus - sha256: f69da0d3189a4b4ceaeb1a3defb0f329b3b352517f52bed4290f83d4f06bc08d - url: "https://pub.dev" - source: hosted - version: "9.0.0" - package_info_plus_platform_interface: - dependency: transitive - description: - name: package_info_plus_platform_interface - sha256: "202a487f08836a592a6bd4f901ac69b3a8f146af552bbd14407b6b41e1c3f086" - url: "https://pub.dev" - source: hosted - version: "3.2.1" - path: - dependency: transitive - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - path_drawing: - dependency: "direct main" - description: - name: path_drawing - sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 - url: "https://pub.dev" - source: hosted - version: "1.0.1" - path_parsing: - dependency: transitive - description: - name: path_parsing - sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - path_provider: - dependency: "direct main" - description: - name: path_provider - sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" - url: "https://pub.dev" - source: hosted - version: "2.1.5" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - sha256: "993381400e94d18469750e5b9dcb8206f15bc09f9da86b9e44a9b0092a0066db" - url: "https://pub.dev" - source: hosted - version: "2.2.18" - path_provider_foundation: - dependency: transitive - description: - name: path_provider_foundation - sha256: "16eef174aacb07e09c351502740fa6254c165757638eba1e9116b0a781201bbd" - url: "https://pub.dev" - source: hosted - version: "2.4.2" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 - url: "https://pub.dev" - source: hosted - version: "2.2.1" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 - url: "https://pub.dev" - source: hosted - version: "2.3.0" - petitparser: - dependency: transitive - description: - name: petitparser - sha256: "1a97266a94f7350d30ae522c0af07890c70b8e62c71e8e3920d1db4d23c057d1" - url: "https://pub.dev" - source: hosted - version: "7.0.1" - platform: - dependency: transitive - description: - name: platform - sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" - url: "https://pub.dev" - source: hosted - version: "3.1.6" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://pub.dev" - source: hosted - version: "2.1.8" - pod_player: - dependency: "direct main" - description: - name: pod_player - sha256: "38564f2e0d9b06fa9e4ad5023be2f6fa4cd9f95f70ace2f517a6d899b166a502" - url: "https://pub.dev" - source: hosted - version: "0.2.2" - pool: - dependency: transitive - description: - name: pool - sha256: "978783255c543aa3586a1b3c21f6e9d720eb315376a915872c61ef8b5c20177d" - url: "https://pub.dev" - source: hosted - version: "1.5.2" - posix: - dependency: transitive - description: - name: posix - sha256: "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61" - url: "https://pub.dev" - source: hosted - version: "6.0.3" - pretty_dio_logger: - dependency: "direct main" - description: - name: pretty_dio_logger - sha256: "36f2101299786d567869493e2f5731de61ce130faa14679473b26905a92b6407" - url: "https://pub.dev" - source: hosted - version: "1.4.0" - provider: - dependency: transitive - description: - name: provider - sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272" - url: "https://pub.dev" - source: hosted - version: "6.1.5+1" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" - url: "https://pub.dev" - source: hosted - version: "2.2.0" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" - url: "https://pub.dev" - source: hosted - version: "1.5.0" - rxdart: - dependency: transitive - description: - name: rxdart - sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962" - url: "https://pub.dev" - source: hosted - version: "0.28.0" - shared_preferences: - dependency: "direct main" - description: - name: shared_preferences - sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5" - url: "https://pub.dev" - source: hosted - version: "2.5.3" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - sha256: bd14436108211b0d4ee5038689a56d4ae3620fd72fd6036e113bf1345bc74d9e - url: "https://pub.dev" - source: hosted - version: "2.4.13" - shared_preferences_foundation: - dependency: transitive - description: - name: shared_preferences_foundation - sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03" - url: "https://pub.dev" - source: hosted - version: "2.5.4" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019 - url: "https://pub.dev" - source: hosted - version: "2.4.3" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shelf: - dependency: transitive - description: - name: shelf - sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 - url: "https://pub.dev" - source: hosted - version: "1.4.2" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67 - url: "https://pub.dev" - source: hosted - version: "2.0.1" - showcaseview: - dependency: "direct main" - description: - name: showcaseview - sha256: "59e5edf33cbe3afb56edcbf25de553211409a576cbbbdda226c574410a314a71" - url: "https://pub.dev" - source: hosted - version: "5.0.1" - simple_sparse_list: - dependency: transitive - description: - name: simple_sparse_list - sha256: aa648fd240fa39b49dcd11c19c266990006006de6699a412de485695910fbc1f - url: "https://pub.dev" - source: hosted - version: "0.1.4" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - source_gen: - dependency: transitive - description: - name: source_gen - sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" - url: "https://pub.dev" - source: hosted - version: "1.5.0" - source_helper: - dependency: transitive - description: - name: source_helper - sha256: "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c" - url: "https://pub.dev" - source: hosted - version: "1.3.5" - source_span: - dependency: transitive - description: - name: source_span - sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" - url: "https://pub.dev" - source: hosted - version: "1.10.1" - sprintf: - dependency: transitive - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" - source: hosted - version: "1.12.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - stream_transform: - dependency: transitive - description: - name: stream_transform - sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 - url: "https://pub.dev" - source: hosted - version: "2.1.1" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" - url: "https://pub.dev" - source: hosted - version: "1.4.1" - synchronized: - dependency: transitive - description: - name: synchronized - sha256: c254ade258ec8282947a0acbbc90b9575b4f19673533ee46f2f6e9b3aeefd7c0 - url: "https://pub.dev" - source: hosted - version: "3.4.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" - url: "https://pub.dev" - source: hosted - version: "1.2.2" - test_api: - dependency: transitive - description: - name: test_api - sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" - url: "https://pub.dev" - source: hosted - version: "0.7.6" - timing: - dependency: transitive - description: - name: timing - sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" - url: "https://pub.dev" - source: hosted - version: "1.0.2" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - unicode: - dependency: transitive - description: - name: unicode - sha256: "0d99edbd2e74726bed2e4989713c8bec02e5581628e334d8c88c0271593fb402" - url: "https://pub.dev" - source: hosted - version: "1.1.8" - universal_html: - dependency: transitive - description: - name: universal_html - sha256: c0bcae5c733c60f26c7dfc88b10b0fd27cbcc45cb7492311cdaa6067e21c9cd4 - url: "https://pub.dev" - source: hosted - version: "2.3.0" - universal_io: - dependency: transitive - description: - name: universal_io - sha256: f63cbc48103236abf48e345e07a03ce5757ea86285ed313a6a032596ed9301e2 - url: "https://pub.dev" - source: hosted - version: "2.3.1" - uuid: - dependency: transitive - description: - name: uuid - sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff - url: "https://pub.dev" - source: hosted - version: "4.5.1" - vector_graphics: - dependency: "direct main" - description: - name: vector_graphics - sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6 - url: "https://pub.dev" - source: hosted - version: "1.1.19" - vector_graphics_codec: - dependency: transitive - description: - name: vector_graphics_codec - sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" - url: "https://pub.dev" - source: hosted - version: "1.1.13" - vector_graphics_compiler: - dependency: "direct dev" - description: - name: vector_graphics_compiler - sha256: d354a7ec6931e6047785f4db12a1f61ec3d43b207fc0790f863818543f8ff0dc - url: "https://pub.dev" - source: hosted - version: "1.1.19" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b - url: "https://pub.dev" - source: hosted - version: "2.2.0" - video_player: - dependency: transitive - description: - name: video_player - sha256: "096bc28ce10d131be80dfb00c223024eb0fba301315a406728ab43dd99c45bdf" - url: "https://pub.dev" - source: hosted - version: "2.10.1" - video_player_android: - dependency: transitive - description: - name: video_player_android - sha256: d74b66f283afff135d5be0ceccca2ca74dff7df1e9b1eaca6bd4699875d3ae60 - url: "https://pub.dev" - source: hosted - version: "2.8.22" - video_player_avfoundation: - dependency: transitive - description: - name: video_player_avfoundation - sha256: e4d33b79a064498c6eb3a6a492b6a5012573d4943c28d566caf1a6c0840fe78d - url: "https://pub.dev" - source: hosted - version: "2.8.8" - video_player_platform_interface: - dependency: transitive - description: - name: video_player_platform_interface - sha256: "57c5d73173f76d801129d0531c2774052c5a7c11ccb962f1830630decd9f24ec" - url: "https://pub.dev" - source: hosted - version: "6.6.0" - video_player_web: - dependency: transitive - description: - name: video_player_web - sha256: "9f3c00be2ef9b76a95d94ac5119fb843dca6f2c69e6c9968f6f2b6c9e7afbdeb" - url: "https://pub.dev" - source: hosted - version: "2.4.0" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" - url: "https://pub.dev" - source: hosted - version: "15.0.2" - wakelock_plus: - dependency: transitive - description: - name: wakelock_plus - sha256: "9296d40c9adbedaba95d1e704f4e0b434be446e2792948d0e4aa977048104228" - url: "https://pub.dev" - source: hosted - version: "1.4.0" - wakelock_plus_platform_interface: - dependency: transitive - description: - name: wakelock_plus_platform_interface - sha256: "036deb14cd62f558ca3b73006d52ce049fabcdcb2eddfe0bf0fe4e8a943b5cf2" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - watcher: - dependency: transitive - description: - name: watcher - sha256: "5bf046f41320ac97a469d506261797f35254fa61c641741ef32dacda98b7d39c" - url: "https://pub.dev" - source: hosted - version: "1.1.3" - web: - dependency: transitive - description: - name: web - sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - web_socket: - dependency: transitive - description: - name: web_socket - sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c" - url: "https://pub.dev" - source: hosted - version: "1.0.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 - url: "https://pub.dev" - source: hosted - version: "3.0.3" - win32: - dependency: transitive - description: - name: win32 - sha256: d7cb55e04cd34096cd3a79b3330245f54cb96a370a1c27adb3c84b917de8b08e - url: "https://pub.dev" - source: hosted - version: "5.15.0" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - xml: - dependency: transitive - description: - name: xml - sha256: "971043b3a0d3da28727e40ed3e0b5d18b742fa5a68665cca88e74b7876d5e025" - url: "https://pub.dev" - source: hosted - version: "6.6.1" - yaml: - dependency: transitive - description: - name: yaml - sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce - url: "https://pub.dev" - source: hosted - version: "3.1.3" - youtube_explode_dart: - dependency: transitive - description: - name: youtube_explode_dart - sha256: "947ba05e0c4f050743e480e7bca3575ff6427d86cc898c1a69f5e1d188cdc9e0" - url: "https://pub.dev" - source: hosted - version: "2.5.3" -sdks: - dart: ">=3.9.2 <4.0.0" - flutter: ">=3.35.0" diff --git a/pubspec.yaml b/pubspec.yaml index 5be1773..d7b3d24 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: hadi_hoda_flutter description: "A new Flutter project." publish_to: 'none' -version: 0.2.1+1 +version: 0.3.1+1 environment: sdk: ^3.9.2 @@ -9,7 +9,6 @@ environment: dependencies: auto_size_text: ^3.0.0 bloc: ^9.0.0 - confetti: ^0.8.0 dio: ^5.9.0 easy_stepper: ^0.8.5+1 equatable: ^2.0.7 @@ -52,9 +51,7 @@ flutter: - assets/animations/ - assets/audios/ - assets/videos/ - - path: assets/svg/ - transformers: - - package: vector_graphics_compiler + - assets/svg/ fonts: