diff --git a/.editorconfig b/.editorconfig index 8d86e4518e450377768d1de80adafba87984a148..b0b3e1fe2543143896ee06ae7b9984f8bd038f73 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,5 +11,8 @@ insert_final_newline = true [*.json] indent_size = 2 +[*.yaml] +indent_size = 2 + [*.md] trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore index e96d80b3fdf4147567d33e3084ad71c44569aed6..54ae0222de3e722adfb2b48c14d77c4d074dafda 100644 --- a/.gitignore +++ b/.gitignore @@ -1,123 +1,3 @@ -# Built application files -*.apk -*.aar -*.ap_ -*.aab - -# Files for the ART/Dalvik VM -*.dex - -# Java class files -*.class - -# Generated files -bin/ -gen/ -out/ -# Uncomment the following line in case you need and you don't have the release build type files in your app -# release/ - -# Gradle files -.gradle/ -build/ - -# Local configuration file (sdk path, etc) -local.properties - -# Proguard folder generated by Eclipse -proguard/ - -# Log Files -*.log - -# Android Studio Navigation editor temp files -.navigation/ - -# Android Studio captures folder -captures/ - -# IntelliJ -*.iml -.idea/workspace.xml -.idea/tasks.xml -.idea/gradle.xml -.idea/assetWizardSettings.xml -.idea/dictionaries -.idea/libraries -# Android Studio 3 in .gitignore file. -.idea/caches -.idea/modules.xml -# Comment next line if keeping position of elements in Navigation Editor is relevant for you -.idea/navEditor.xml - -# Keystore files -# Uncomment the following lines if you do not want to check your keystore files in. -#*.jks -#*.keystore - -# External native build folder generated in Android Studio 2.2 and later -.externalNativeBuild -.cxx/ - -# Google Services (e.g. APIs or Firebase) -# google-services.json - -# Freeline -freeline.py -freeline/ -freeline_project_description.json - -# fastlane -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output -fastlane/readme.md - -# Version control -vcs.xml - -# lint -lint/intermediates/ -lint/generated/ -lint/outputs/ -lint/tmp/ -# lint/reports/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -**/generated_plugin_registrant.dart -.packages -.pub-cache/ -.pub/ -flutter_*.png -linked_*.ds -unlinked.ds -unlinked_spec.ds - -# packages file containing multi-root paths -.packages.generated - -# Visual Studio Code related -.classpath -.project -.settings/ -.vscode/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java -**/android/key.properties -*.jks - # Miscellaneous *.class *.log @@ -128,6 +8,7 @@ unlinked_spec.ds .buildlog/ .history .svn/ +migrate_working_dir/ # IntelliJ related *.iml @@ -159,4 +40,7 @@ app.*.symbols # Obfuscation related app.*.map.json -.glci +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/assets/fonts/Nunito-Bold.ttf b/assets/fonts/Nunito-Bold.ttf deleted file mode 100644 index 6519feb781449ebe0015cbc74dfd9e13110fbba9..0000000000000000000000000000000000000000 Binary files a/assets/fonts/Nunito-Bold.ttf and /dev/null differ diff --git a/assets/fonts/Nunito-Light.ttf b/assets/fonts/Nunito-Light.ttf deleted file mode 100644 index 8a0736c41cd6c2a1225d356bf274de1d0afc3497..0000000000000000000000000000000000000000 Binary files a/assets/fonts/Nunito-Light.ttf and /dev/null differ diff --git a/assets/fonts/Nunito-Medium.ttf b/assets/fonts/Nunito-Medium.ttf deleted file mode 100644 index 88fccdc0638b6f5d6ac49d9d269dc3d518618ad1..0000000000000000000000000000000000000000 Binary files a/assets/fonts/Nunito-Medium.ttf and /dev/null differ diff --git a/assets/fonts/Nunito-Regular.ttf b/assets/fonts/Nunito-Regular.ttf deleted file mode 100644 index e7b8375a896ef0cd8e06730a78c84532b377e784..0000000000000000000000000000000000000000 Binary files a/assets/fonts/Nunito-Regular.ttf and /dev/null differ diff --git a/lib/config/default_game_settings.dart b/lib/config/default_game_settings.dart index 64897e33d43c702893dd30aaa32b23b21820a994..0f419af06ad60be5d466e4b37fa334732d7899ee 100644 --- a/lib/config/default_game_settings.dart +++ b/lib/config/default_game_settings.dart @@ -1,4 +1,4 @@ -import 'package:hangman/utils/tools.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; class DefaultGameSettings { // available game parameters codes diff --git a/lib/config/default_global_settings.dart b/lib/config/default_global_settings.dart index 0c9062fb9bfe986f977d5591ba4bd5061fcaa977..d92229c2e02064684ed4a2caeb272ff63325776a 100644 --- a/lib/config/default_global_settings.dart +++ b/lib/config/default_global_settings.dart @@ -1,4 +1,4 @@ -import 'package:hangman/utils/tools.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; class DefaultGlobalSettings { // available global parameters codes diff --git a/lib/config/menu.dart b/lib/config/menu.dart index d59a4278e25e81b369d2eb12cd4cd055ace5fce0..51a01be76d7cb1e4c5bbd9d947fce584838bd178 100644 --- a/lib/config/menu.dart +++ b/lib/config/menu.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:unicons/unicons.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/ui/screens/page_about.dart'; import 'package:hangman/ui/screens/page_game.dart'; diff --git a/lib/config/theme.dart b/lib/config/theme.dart deleted file mode 100644 index 74f532fd5abf693979118609564d29167e902009..0000000000000000000000000000000000000000 --- a/lib/config/theme.dart +++ /dev/null @@ -1,190 +0,0 @@ -import 'package:flutter/material.dart'; - -/// Colors from Tailwind CSS (v3.0) - June 2022 -/// -/// https://tailwindcss.com/docs/customizing-colors - -const int _primaryColor = 0xFF6366F1; -const MaterialColor primarySwatch = MaterialColor(_primaryColor, <int, Color>{ - 50: Color(0xFFEEF2FF), // indigo-50 - 100: Color(0xFFE0E7FF), // indigo-100 - 200: Color(0xFFC7D2FE), // indigo-200 - 300: Color(0xFFA5B4FC), // indigo-300 - 400: Color(0xFF818CF8), // indigo-400 - 500: Color(_primaryColor), // indigo-500 - 600: Color(0xFF4F46E5), // indigo-600 - 700: Color(0xFF4338CA), // indigo-700 - 800: Color(0xFF3730A3), // indigo-800 - 900: Color(0xFF312E81), // indigo-900 -}); - -const int _textColor = 0xFF64748B; -const MaterialColor textSwatch = MaterialColor(_textColor, <int, Color>{ - 50: Color(0xFFF8FAFC), // slate-50 - 100: Color(0xFFF1F5F9), // slate-100 - 200: Color(0xFFE2E8F0), // slate-200 - 300: Color(0xFFCBD5E1), // slate-300 - 400: Color(0xFF94A3B8), // slate-400 - 500: Color(_textColor), // slate-500 - 600: Color(0xFF475569), // slate-600 - 700: Color(0xFF334155), // slate-700 - 800: Color(0xFF1E293B), // slate-800 - 900: Color(0xFF0F172A), // slate-900 -}); - -const Color errorColor = Color(0xFFDC2626); // red-600 - -final ColorScheme lightColorScheme = ColorScheme.light( - primary: primarySwatch.shade500, - secondary: primarySwatch.shade500, - onSecondary: Colors.white, - error: errorColor, - onSurface: textSwatch.shade500, - surface: textSwatch.shade50, - surfaceContainerHighest: Colors.white, - shadow: textSwatch.shade900.withOpacity(.1), -); - -final ColorScheme darkColorScheme = ColorScheme.dark( - primary: primarySwatch.shade500, - secondary: primarySwatch.shade500, - onSecondary: Colors.white, - error: errorColor, - onSurface: textSwatch.shade300, - surface: const Color(0xFF262630), - surfaceContainerHighest: const Color(0xFF282832), - shadow: textSwatch.shade900.withOpacity(.2), -); - -final ThemeData lightTheme = ThemeData( - colorScheme: lightColorScheme, - fontFamily: 'Nunito', - textTheme: TextTheme( - displayLarge: TextStyle( - color: textSwatch.shade700, - fontFamily: 'Nunito', - ), - displayMedium: TextStyle( - color: textSwatch.shade600, - fontFamily: 'Nunito', - ), - displaySmall: TextStyle( - color: textSwatch.shade500, - fontFamily: 'Nunito', - ), - headlineLarge: TextStyle( - color: textSwatch.shade700, - fontFamily: 'Nunito', - ), - headlineMedium: TextStyle( - color: textSwatch.shade600, - fontFamily: 'Nunito', - ), - headlineSmall: TextStyle( - color: textSwatch.shade500, - fontFamily: 'Nunito', - ), - titleLarge: TextStyle( - color: textSwatch.shade700, - fontFamily: 'Nunito', - ), - titleMedium: TextStyle( - color: textSwatch.shade600, - fontFamily: 'Nunito', - ), - titleSmall: TextStyle( - color: textSwatch.shade500, - fontFamily: 'Nunito', - ), - bodyLarge: TextStyle( - color: textSwatch.shade700, - fontFamily: 'Nunito', - ), - bodyMedium: TextStyle( - color: textSwatch.shade600, - fontFamily: 'Nunito', - ), - bodySmall: TextStyle( - color: textSwatch.shade500, - fontFamily: 'Nunito', - ), - labelLarge: TextStyle( - color: textSwatch.shade700, - fontFamily: 'Nunito', - ), - labelMedium: TextStyle( - color: textSwatch.shade600, - fontFamily: 'Nunito', - ), - labelSmall: TextStyle( - color: textSwatch.shade500, - fontFamily: 'Nunito', - ), - ), -); - -final ThemeData darkTheme = lightTheme.copyWith( - colorScheme: darkColorScheme, - textTheme: TextTheme( - displayLarge: TextStyle( - color: textSwatch.shade200, - fontFamily: 'Nunito', - ), - displayMedium: TextStyle( - color: textSwatch.shade300, - fontFamily: 'Nunito', - ), - displaySmall: TextStyle( - color: textSwatch.shade400, - fontFamily: 'Nunito', - ), - headlineLarge: TextStyle( - color: textSwatch.shade200, - fontFamily: 'Nunito', - ), - headlineMedium: TextStyle( - color: textSwatch.shade300, - fontFamily: 'Nunito', - ), - headlineSmall: TextStyle( - color: textSwatch.shade400, - fontFamily: 'Nunito', - ), - titleLarge: TextStyle( - color: textSwatch.shade200, - fontFamily: 'Nunito', - ), - titleMedium: TextStyle( - color: textSwatch.shade300, - fontFamily: 'Nunito', - ), - titleSmall: TextStyle( - color: textSwatch.shade400, - fontFamily: 'Nunito', - ), - bodyLarge: TextStyle( - color: textSwatch.shade200, - fontFamily: 'Nunito', - ), - bodyMedium: TextStyle( - color: textSwatch.shade300, - fontFamily: 'Nunito', - ), - bodySmall: TextStyle( - color: textSwatch.shade400, - fontFamily: 'Nunito', - ), - labelLarge: TextStyle( - color: textSwatch.shade200, - fontFamily: 'Nunito', - ), - labelMedium: TextStyle( - color: textSwatch.shade300, - fontFamily: 'Nunito', - ), - labelSmall: TextStyle( - color: textSwatch.shade400, - fontFamily: 'Nunito', - ), - ), -); diff --git a/lib/cubit/game_cubit.dart b/lib/cubit/game_cubit.dart index 3aa1c51b6742b9d23085faa15a06d45ad17d8538..4d66725b5c3059725c79bbc06b758c5128529bc3 100644 --- a/lib/cubit/game_cubit.dart +++ b/lib/cubit/game_cubit.dart @@ -1,10 +1,9 @@ -import 'package:equatable/equatable.dart'; import 'package:flutter/material.dart'; -import 'package:hangman/data/fetch_data_helper.dart'; -import 'package:hangman/models/game/picked_word.dart'; -import 'package:hydrated_bloc/hydrated_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; +import 'package:hangman/data/fetch_data_helper.dart'; import 'package:hangman/models/game/game.dart'; +import 'package:hangman/models/game/picked_word.dart'; import 'package:hangman/models/settings/settings_game.dart'; import 'package:hangman/models/settings/settings_global.dart'; diff --git a/lib/cubit/nav_cubit.dart b/lib/cubit/nav_cubit.dart index 85303abe21a8dae2319d3e3c75ed7afb1574d143..e12c8b979550655cac5d4ac5255b34bceab10df3 100644 --- a/lib/cubit/nav_cubit.dart +++ b/lib/cubit/nav_cubit.dart @@ -1,4 +1,4 @@ -import 'package:hydrated_bloc/hydrated_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/config/menu.dart'; diff --git a/lib/cubit/settings_game_cubit.dart b/lib/cubit/settings_game_cubit.dart index 09144f1439b220798c221dbaf6af946a06e77a29..7ac7299c4fd0290f2e9fcb7a8ad5b18166d47285 100644 --- a/lib/cubit/settings_game_cubit.dart +++ b/lib/cubit/settings_game_cubit.dart @@ -1,6 +1,5 @@ -import 'package:equatable/equatable.dart'; import 'package:flutter/material.dart'; -import 'package:hydrated_bloc/hydrated_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/config/default_game_settings.dart'; import 'package:hangman/models/settings/settings_game.dart'; diff --git a/lib/cubit/settings_global_cubit.dart b/lib/cubit/settings_global_cubit.dart index 091dd900589b74458d55241d7ce97cdbb62f211b..bfbac997eb07196e4415e9452ebd7fb5f35b91c3 100644 --- a/lib/cubit/settings_global_cubit.dart +++ b/lib/cubit/settings_global_cubit.dart @@ -1,6 +1,5 @@ -import 'package:equatable/equatable.dart'; import 'package:flutter/material.dart'; -import 'package:hydrated_bloc/hydrated_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/config/default_global_settings.dart'; import 'package:hangman/models/settings/settings_global.dart'; diff --git a/lib/cubit/theme_cubit.dart b/lib/cubit/theme_cubit.dart index b793e895dbb0c672d451cd403e0036c3d9ac9b42..1ecab6014c67a0393eabbf704b8b85c9e988705e 100644 --- a/lib/cubit/theme_cubit.dart +++ b/lib/cubit/theme_cubit.dart @@ -1,6 +1,5 @@ -import 'package:equatable/equatable.dart'; import 'package:flutter/material.dart'; -import 'package:hydrated_bloc/hydrated_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; part 'theme_state.dart'; diff --git a/lib/main.dart b/lib/main.dart index dbcc7a7bbe21aa82bc61e254512d60b074cab448..8d45b4a61c37e092c4de8a9ecda9e086815704c1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,15 +1,10 @@ import 'dart:io'; -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:hive/hive.dart'; -import 'package:hydrated_bloc/hydrated_bloc.dart'; -import 'package:path_provider/path_provider.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/config/default_global_settings.dart'; -import 'package:hangman/config/theme.dart'; import 'package:hangman/cubit/game_cubit.dart'; import 'package:hangman/cubit/nav_cubit.dart'; import 'package:hangman/cubit/settings_game_cubit.dart'; diff --git a/lib/models/game/game.dart b/lib/models/game/game.dart index bff643d2f87b809edc6dd160a47bb9d4ce8a5b6e..3cae751b4f99e7f9817d8150d270687b00ac4422 100644 --- a/lib/models/game/game.dart +++ b/lib/models/game/game.dart @@ -1,6 +1,7 @@ +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; + import 'package:hangman/models/settings/settings_game.dart'; import 'package:hangman/models/settings/settings_global.dart'; -import 'package:hangman/utils/tools.dart'; typedef MovingTile = String; typedef Player = String; diff --git a/lib/models/game/picked_word.dart b/lib/models/game/picked_word.dart index 890e2ae58cba347555e3d2cf9e0e4bd8c6321428..d1bda281859d3af1aea9b28521cb781b417b6748 100644 --- a/lib/models/game/picked_word.dart +++ b/lib/models/game/picked_word.dart @@ -1,4 +1,4 @@ -import 'package:hangman/utils/tools.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; class PickedWord { const PickedWord({ diff --git a/lib/models/settings/settings_game.dart b/lib/models/settings/settings_game.dart index 4c0f947021504509c75a39b8f5487a45982cce46..f0c97f557b43e65dc3251e10576d2450d7eeabbe 100644 --- a/lib/models/settings/settings_game.dart +++ b/lib/models/settings/settings_game.dart @@ -1,5 +1,6 @@ +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; + import 'package:hangman/config/default_game_settings.dart'; -import 'package:hangman/utils/tools.dart'; class GameSettings { final String gameMode; diff --git a/lib/models/settings/settings_global.dart b/lib/models/settings/settings_global.dart index d9c3326f4bbb863be20bd606167a4dd0d7f73335..88d7c14b21bda9ad55d15c80952274ed0464e689 100644 --- a/lib/models/settings/settings_global.dart +++ b/lib/models/settings/settings_global.dart @@ -1,5 +1,6 @@ +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; + import 'package:hangman/config/default_global_settings.dart'; -import 'package:hangman/utils/tools.dart'; class GlobalSettings { String skin; diff --git a/lib/ui/helpers/app_titles.dart b/lib/ui/helpers/app_titles.dart deleted file mode 100644 index b98107b12fabc3114ebfbec994166b588abcf1ad..0000000000000000000000000000000000000000 --- a/lib/ui/helpers/app_titles.dart +++ /dev/null @@ -1,32 +0,0 @@ -import 'package:easy_localization/easy_localization.dart'; -import 'package:flutter/material.dart'; - -class AppHeader extends StatelessWidget { - const AppHeader({super.key, required this.text}); - - final String text; - - @override - Widget build(BuildContext context) { - return Text( - tr(text), - textAlign: TextAlign.start, - style: Theme.of(context).textTheme.headlineMedium!.apply(fontWeightDelta: 2), - ); - } -} - -class AppTitle extends StatelessWidget { - const AppTitle({super.key, required this.text}); - - final String text; - - @override - Widget build(BuildContext context) { - return Text( - tr(text), - textAlign: TextAlign.start, - style: Theme.of(context).textTheme.titleLarge!.apply(fontWeightDelta: 2), - ); - } -} diff --git a/lib/ui/helpers/outlined_text_widget.dart b/lib/ui/helpers/outlined_text_widget.dart deleted file mode 100644 index 6d8c7f77e10191464866ebaac4b5ed3a856f0731..0000000000000000000000000000000000000000 --- a/lib/ui/helpers/outlined_text_widget.dart +++ /dev/null @@ -1,51 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:hangman/utils/color_extensions.dart'; - -class OutlinedText extends StatelessWidget { - const OutlinedText({ - super.key, - required this.text, - required this.fontSize, - required this.textColor, - this.outlineColor, - }); - - final String text; - final double fontSize; - final Color textColor; - final Color? outlineColor; - - @override - Widget build(BuildContext context) { - final double delta = fontSize / 30; - - return Text( - text, - style: TextStyle( - inherit: true, - fontSize: fontSize, - fontWeight: FontWeight.w600, - color: textColor, - shadows: [ - Shadow( - offset: Offset(-delta, -delta), - color: outlineColor ?? textColor.darken(), - ), - Shadow( - offset: Offset(delta, -delta), - color: outlineColor ?? textColor.darken(), - ), - Shadow( - offset: Offset(delta, delta), - color: outlineColor ?? textColor.darken(), - ), - Shadow( - offset: Offset(-delta, delta), - color: outlineColor ?? textColor.darken(), - ), - ], - ), - ); - } -} diff --git a/lib/ui/helpers/styled_button.dart b/lib/ui/helpers/styled_button.dart deleted file mode 100644 index 72e5621ce80f9f619d1713234c5976e9c5e22c86..0000000000000000000000000000000000000000 --- a/lib/ui/helpers/styled_button.dart +++ /dev/null @@ -1,210 +0,0 @@ -import 'package:auto_size_text/auto_size_text.dart'; -import 'package:flutter/material.dart'; - -import 'package:hangman/utils/color_extensions.dart'; - -class StyledButton extends StatelessWidget { - const StyledButton({ - super.key, - required this.color, - required this.onPressed, - this.onLongPress, - required this.child, - }); - - final Color color; - final VoidCallback? onPressed; - final VoidCallback? onLongPress; - final Widget child; - - factory StyledButton.text({ - Key? key, - required VoidCallback? onPressed, - VoidCallback? onLongPress, - required String caption, - required Color color, - }) { - final Widget captionWidget = AutoSizeText( - caption, - maxLines: 1, - style: TextStyle( - inherit: true, - fontWeight: FontWeight.w900, - color: color.darken(60), - shadows: [ - Shadow( - blurRadius: 5.0, - color: color.lighten(60), - offset: const Offset(2, 2), - ), - Shadow( - blurRadius: 5.0, - color: color.lighten(60), - offset: const Offset(2, -2), - ), - Shadow( - blurRadius: 5.0, - color: color.lighten(60), - offset: const Offset(-2, 2), - ), - Shadow( - blurRadius: 5.0, - color: color.lighten(60), - offset: const Offset(-2, -2), - ), - ], - ), - ); - - return StyledButton( - color: color, - onPressed: onPressed, - onLongPress: onLongPress, - child: captionWidget, - ); - } - - factory StyledButton.icon({ - Key? key, - required VoidCallback? onPressed, - VoidCallback? onLongPress, - required Icon icon, - required Color color, - required double iconSize, - }) { - return StyledButton( - color: color, - onPressed: onPressed, - onLongPress: onLongPress, - child: Icon( - icon.icon, - color: icon.color ?? color.darken(60), - size: iconSize, - shadows: [ - Shadow( - blurRadius: 5.0, - color: color.lighten(60), - offset: const Offset(2, 2), - ), - Shadow( - blurRadius: 5.0, - color: color.lighten(60), - offset: const Offset(2, -2), - ), - Shadow( - blurRadius: 5.0, - color: color.lighten(60), - offset: const Offset(-2, 2), - ), - Shadow( - blurRadius: 5.0, - color: color.lighten(60), - offset: const Offset(-2, -2), - ), - ], - ), - ); - } - - @override - Widget build(BuildContext context) { - const double borderWidth = 4; - final Color borderColor = color.darken(40); - const double borderRadius = 10; - - return Container( - margin: const EdgeInsets.all(2), - padding: const EdgeInsets.all(2), - decoration: BoxDecoration( - color: color, - border: Border.all( - color: borderColor, - width: borderWidth, - ), - borderRadius: BorderRadius.circular(borderRadius), - ), - child: CustomPaint( - painter: StyledButtonPainter( - baseColor: color, - ), - child: MaterialButton( - onPressed: onPressed, - onLongPress: onLongPress, - padding: const EdgeInsets.all(8), - materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, - minWidth: 40, - child: child, - ), - ), - ); - } -} - -class StyledButtonPainter extends CustomPainter { - StyledButtonPainter({ - required this.baseColor, - }); - - final Color baseColor; - - @override - void paint(Canvas canvas, Size size) { - final Color lightColor = baseColor.lighten(20); - final Color darkColor = baseColor.darken(20); - - final Paint paint = Paint()..style = PaintingStyle.fill; - - const double cornerRadius = 6; - - Path topPath = Path() - ..moveTo(cornerRadius, 0) - ..lineTo(size.width - cornerRadius, 0) - ..arcToPoint( - Offset(size.width, cornerRadius), - radius: const Radius.circular(cornerRadius), - ) - ..lineTo(size.width, size.height * .35) - ..quadraticBezierTo( - size.width * .4, - size.height * .1, - 0, - size.height * .3, - ) - ..lineTo(0, cornerRadius) - ..arcToPoint( - const Offset(cornerRadius, 0), - radius: const Radius.circular(cornerRadius), - ); - - Path bottomPath = Path() - ..moveTo(cornerRadius, size.height) - ..lineTo(size.width - cornerRadius, size.height) - ..arcToPoint( - Offset(size.width, size.height - cornerRadius), - radius: const Radius.circular(cornerRadius), - clockwise: false, - ) - ..lineTo(size.width, size.height * .7) - ..quadraticBezierTo( - size.width * .6, - size.height * .9, - 0, - size.height * .7, - ) - ..lineTo(0, size.height - cornerRadius) - ..arcToPoint( - Offset(cornerRadius, size.height), - radius: const Radius.circular(cornerRadius), - clockwise: false, - ); - - paint.color = lightColor; - canvas.drawPath(topPath, paint); - - paint.color = darkColor; - canvas.drawPath(bottomPath, paint); - } - - @override - bool shouldRepaint(CustomPainter oldDelegate) => false; -} diff --git a/lib/ui/layouts/game_layout.dart b/lib/ui/layouts/game_layout.dart index 0cb2223e8fef4363513c721a81f6e2bce3b6dbe4..63101a74becb586e0ca8510c6e0b1cee74fcfd63 100644 --- a/lib/ui/layouts/game_layout.dart +++ b/lib/ui/layouts/game_layout.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:hangman/config/game_colors.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; +import 'package:hangman/config/game_colors.dart'; import 'package:hangman/cubit/game_cubit.dart'; import 'package:hangman/models/game/game.dart'; import 'package:hangman/ui/widgets/game/game_answer.dart'; diff --git a/lib/ui/layouts/parameters_layout.dart b/lib/ui/layouts/parameters_layout.dart index 4c52362f878d27bc1d809233c5ce35b048f108f2..45539aa5aa67f97d8f2694b2cc337e6175351596 100644 --- a/lib/ui/layouts/parameters_layout.dart +++ b/lib/ui/layouts/parameters_layout.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/config/default_game_settings.dart'; import 'package:hangman/config/default_global_settings.dart'; diff --git a/lib/ui/parameters/parameter_painter.dart b/lib/ui/parameters/parameter_painter.dart index 96a7a233f328f66f25ed26bd18197e5307748466..2ea72100b09281b7a86647a363bf53c427b845c2 100644 --- a/lib/ui/parameters/parameter_painter.dart +++ b/lib/ui/parameters/parameter_painter.dart @@ -2,10 +2,11 @@ import 'dart:math'; import 'package:flutter/material.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; + import 'package:hangman/config/default_game_settings.dart'; import 'package:hangman/models/settings/settings_game.dart'; import 'package:hangman/models/settings/settings_global.dart'; -import 'package:hangman/utils/tools.dart'; class ParameterPainter extends CustomPainter { const ParameterPainter({ diff --git a/lib/ui/parameters/parameter_widget.dart b/lib/ui/parameters/parameter_widget.dart index 0e805a82e8b6fd16bed6d5da2a6354378772ec2e..0015bbbd3c92a6e7d709875879bbe243674fa108 100644 --- a/lib/ui/parameters/parameter_widget.dart +++ b/lib/ui/parameters/parameter_widget.dart @@ -1,12 +1,12 @@ import 'package:flutter/material.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; + import 'package:hangman/config/default_game_settings.dart'; import 'package:hangman/config/default_global_settings.dart'; import 'package:hangman/models/settings/settings_game.dart'; import 'package:hangman/models/settings/settings_global.dart'; -import 'package:hangman/ui/helpers/styled_button.dart'; import 'package:hangman/ui/parameters/parameter_painter.dart'; -import 'package:hangman/utils/tools.dart'; class ParameterWidget extends StatelessWidget { const ParameterWidget({ diff --git a/lib/ui/screens/page_about.dart b/lib/ui/screens/page_about.dart index f1d171f40eb516cde51a56207eec12e7c0d52d01..ab73e304b8138295f6669330b928e0d1d0263565 100644 --- a/lib/ui/screens/page_about.dart +++ b/lib/ui/screens/page_about.dart @@ -1,8 +1,5 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:package_info_plus/package_info_plus.dart'; - -import 'package:hangman/ui/helpers/app_titles.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; class PageAbout extends StatelessWidget { const PageAbout({super.key}); diff --git a/lib/ui/screens/page_game.dart b/lib/ui/screens/page_game.dart index 9d0bee2f20118c5c8551d9ab1223bfa7f8ead34d..b844191444884114488d3f3a81675d7e1f9eda74 100644 --- a/lib/ui/screens/page_game.dart +++ b/lib/ui/screens/page_game.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/cubit/game_cubit.dart'; import 'package:hangman/models/game/game.dart'; diff --git a/lib/ui/screens/page_settings.dart b/lib/ui/screens/page_settings.dart index fe20de3a220e09a4c9d3033367392cab797ec9b1..eee5c4c5fbc08ab3f06445cacd292d338ab69b3f 100644 --- a/lib/ui/screens/page_settings.dart +++ b/lib/ui/screens/page_settings.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; -import 'package:hangman/ui/helpers/app_titles.dart'; import 'package:hangman/ui/settings/settings_form.dart'; class PageSettings extends StatelessWidget { diff --git a/lib/ui/settings/settings_form.dart b/lib/ui/settings/settings_form.dart index e79a6be64ff97787f6d52ccf9ae25e11006aa52f..20207843103e95ddbf9a20cdf8d341506a509e23 100644 --- a/lib/ui/settings/settings_form.dart +++ b/lib/ui/settings/settings_form.dart @@ -1,6 +1,5 @@ -import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; -import 'package:unicons/unicons.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/ui/settings/theme_card.dart'; diff --git a/lib/ui/settings/theme_card.dart b/lib/ui/settings/theme_card.dart index c5efb0be8249094bd49fde8e3b3a31ca3346d98e..7a0aab554d362592ea202180ca563bc943cf390e 100644 --- a/lib/ui/settings/theme_card.dart +++ b/lib/ui/settings/theme_card.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/cubit/theme_cubit.dart'; diff --git a/lib/ui/skeleton.dart b/lib/ui/skeleton.dart index 87fd74cf99a82a412190aa7d3284f00f95ecc2e5..f3b359324267e90303811b30b5f014e059753886 100644 --- a/lib/ui/skeleton.dart +++ b/lib/ui/skeleton.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/config/menu.dart'; import 'package:hangman/cubit/nav_cubit.dart'; diff --git a/lib/ui/widgets/actions/button_delete_saved_game.dart b/lib/ui/widgets/actions/button_delete_saved_game.dart index 27bea6e9e5e01d6d1078b5ac15026b558b5eacba..d158694a6ac2304d9f0fab16b1e2f55c91b71f70 100644 --- a/lib/ui/widgets/actions/button_delete_saved_game.dart +++ b/lib/ui/widgets/actions/button_delete_saved_game.dart @@ -1,8 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/cubit/game_cubit.dart'; -import 'package:hangman/ui/helpers/styled_button.dart'; class DeleteSavedGameButton extends StatelessWidget { const DeleteSavedGameButton({super.key}); diff --git a/lib/ui/widgets/actions/button_game_quit.dart b/lib/ui/widgets/actions/button_game_quit.dart index 77675a3b86c5fab898620983af39f61655842d7a..05f123ed2fce93365eb4ae0ae9073ab3da46858b 100644 --- a/lib/ui/widgets/actions/button_game_quit.dart +++ b/lib/ui/widgets/actions/button_game_quit.dart @@ -1,8 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/cubit/game_cubit.dart'; -import 'package:hangman/ui/helpers/styled_button.dart'; class QuitGameButton extends StatelessWidget { const QuitGameButton({super.key}); diff --git a/lib/ui/widgets/actions/button_game_start_new.dart b/lib/ui/widgets/actions/button_game_start_new.dart index 0e59b84bc4753027b5ece12f62db56146fddc2f6..9b8c4e9d29eeec09a368fee248389d5c381811c3 100644 --- a/lib/ui/widgets/actions/button_game_start_new.dart +++ b/lib/ui/widgets/actions/button_game_start_new.dart @@ -1,10 +1,9 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/cubit/game_cubit.dart'; import 'package:hangman/cubit/settings_game_cubit.dart'; import 'package:hangman/cubit/settings_global_cubit.dart'; -import 'package:hangman/ui/helpers/styled_button.dart'; class StartNewGameButton extends StatelessWidget { const StartNewGameButton({super.key}); diff --git a/lib/ui/widgets/actions/button_resume_saved_game.dart b/lib/ui/widgets/actions/button_resume_saved_game.dart index 356305fe57621cd315136a4b36dada1b8fad5009..bdd518240bc6876ab93ade916df632b055f669ab 100644 --- a/lib/ui/widgets/actions/button_resume_saved_game.dart +++ b/lib/ui/widgets/actions/button_resume_saved_game.dart @@ -1,8 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/cubit/game_cubit.dart'; -import 'package:hangman/ui/helpers/styled_button.dart'; class ResumeSavedGameButton extends StatelessWidget { const ResumeSavedGameButton({super.key}); diff --git a/lib/ui/widgets/game/game_answer.dart b/lib/ui/widgets/game/game_answer.dart index 5d76196a6e65b9482fef9a118b7c7e27e450157a..7c0fde332abd004a7b885623bbf18f7d8bf5c991 100644 --- a/lib/ui/widgets/game/game_answer.dart +++ b/lib/ui/widgets/game/game_answer.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/cubit/game_cubit.dart'; import 'package:hangman/models/game/game.dart'; diff --git a/lib/ui/widgets/game/game_clue.dart b/lib/ui/widgets/game/game_clue.dart index 0fe839f8eb8de116592a9072348fbe74e4caf276..b4b6420bb04f00d3e72201b2fef953821c195efb 100644 --- a/lib/ui/widgets/game/game_clue.dart +++ b/lib/ui/widgets/game/game_clue.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/cubit/game_cubit.dart'; import 'package:hangman/models/game/game.dart'; diff --git a/lib/ui/widgets/game/game_end.dart b/lib/ui/widgets/game/game_end.dart index 08e0dcc5c923fa95ccad0e56c676eef765c5bfe2..8a4fb5b6470a5b15ac2e5dbc46af097f80758ee7 100644 --- a/lib/ui/widgets/game/game_end.dart +++ b/lib/ui/widgets/game/game_end.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/cubit/game_cubit.dart'; import 'package:hangman/models/game/game.dart'; diff --git a/lib/ui/widgets/game/game_hidden_word.dart b/lib/ui/widgets/game/game_hidden_word.dart index 0cd443e5b6bf9813b5c44866d296e114480238c1..0db9df9b0995cf70004868cd5df46e3a0995e565 100644 --- a/lib/ui/widgets/game/game_hidden_word.dart +++ b/lib/ui/widgets/game/game_hidden_word.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/cubit/game_cubit.dart'; import 'package:hangman/models/game/game.dart'; diff --git a/lib/ui/widgets/game/game_top.dart b/lib/ui/widgets/game/game_top.dart index 9e5bb63e1617ea148664247d1ffbb480b19fb7ef..4ab6c49223bcf44563be06f19392c4e5b450a615 100644 --- a/lib/ui/widgets/game/game_top.dart +++ b/lib/ui/widgets/game/game_top.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/cubit/game_cubit.dart'; import 'package:hangman/models/game/game.dart'; diff --git a/lib/ui/widgets/game/game_virtual_keyboard.dart b/lib/ui/widgets/game/game_virtual_keyboard.dart index 02c028832b9ef86ed0e468a309ce4dd665b1c29d..080014e942fcef75bb6750203185902aaeb5a42a 100644 --- a/lib/ui/widgets/game/game_virtual_keyboard.dart +++ b/lib/ui/widgets/game/game_virtual_keyboard.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/cubit/game_cubit.dart'; import 'package:hangman/models/game/game.dart'; diff --git a/lib/ui/widgets/game/game_virtual_keyboard_key.dart b/lib/ui/widgets/game/game_virtual_keyboard_key.dart index 1f6b3f0945f951d47126061bf8b03dcdd3d75ae8..e42178166437aabdc7daab640aacce713a51aab9 100644 --- a/lib/ui/widgets/game/game_virtual_keyboard_key.dart +++ b/lib/ui/widgets/game/game_virtual_keyboard_key.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:hangman/config/game_colors.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; +import 'package:hangman/config/game_colors.dart'; import 'package:hangman/cubit/game_cubit.dart'; class GameVirtualKeyboardKeyWidget extends StatelessWidget { diff --git a/lib/ui/widgets/global_app_bar.dart b/lib/ui/widgets/global_app_bar.dart index f93b4f0c0ffa9838731e19987370050564026b33..1c09d072907503b3fb16f6b4e34b0c9603c70971 100644 --- a/lib/ui/widgets/global_app_bar.dart +++ b/lib/ui/widgets/global_app_bar.dart @@ -1,12 +1,10 @@ import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_custom_toolbox/flutter_toolbox.dart'; import 'package:hangman/config/menu.dart'; import 'package:hangman/cubit/game_cubit.dart'; import 'package:hangman/cubit/nav_cubit.dart'; import 'package:hangman/models/game/game.dart'; -import 'package:hangman/ui/helpers/app_titles.dart'; -import 'package:hangman/ui/helpers/styled_button.dart'; class GlobalAppBar extends StatelessWidget implements PreferredSizeWidget { const GlobalAppBar({super.key}); @@ -38,7 +36,7 @@ class GlobalAppBar extends StatelessWidget implements PreferredSizeWidget { // go to Settings page menuActions.add(ElevatedButton( onPressed: () { - context.read<NavCubit>().goToSettingsPage(); + BlocProvider.of<NavCubit>(context).goToSettingsPage(); }, style: ElevatedButton.styleFrom( shape: const CircleBorder(), @@ -49,7 +47,7 @@ class GlobalAppBar extends StatelessWidget implements PreferredSizeWidget { // go to About page menuActions.add(ElevatedButton( onPressed: () { - context.read<NavCubit>().goToAboutPage(); + BlocProvider.of<NavCubit>(context).goToAboutPage(); }, style: ElevatedButton.styleFrom( shape: const CircleBorder(), @@ -60,7 +58,7 @@ class GlobalAppBar extends StatelessWidget implements PreferredSizeWidget { // back to Home page menuActions.add(ElevatedButton( onPressed: () { - context.read<NavCubit>().goToGamePage(); + BlocProvider.of<NavCubit>(context).goToGamePage(); }, style: ElevatedButton.styleFrom( shape: const CircleBorder(), diff --git a/lib/utils/color_extensions.dart b/lib/utils/color_extensions.dart deleted file mode 100644 index 4e55e338f0d3ed98b233d1ef887b7b3e17e29d97..0000000000000000000000000000000000000000 --- a/lib/utils/color_extensions.dart +++ /dev/null @@ -1,33 +0,0 @@ -import 'dart:ui'; - -extension ColorExtension on Color { - Color darken([int percent = 40]) { - assert(1 <= percent && percent <= 100); - final value = 1 - percent / 100; - return Color.fromARGB( - alpha, - (red * value).round(), - (green * value).round(), - (blue * value).round(), - ); - } - - Color lighten([int percent = 40]) { - assert(1 <= percent && percent <= 100); - final value = percent / 100; - return Color.fromARGB( - alpha, - (red + ((255 - red) * value)).round(), - (green + ((255 - green) * value)).round(), - (blue + ((255 - blue) * value)).round(), - ); - } - - Color avg(Color other) { - final red = (this.red + other.red) ~/ 2; - final green = (this.green + other.green) ~/ 2; - final blue = (this.blue + other.blue) ~/ 2; - final alpha = (this.alpha + other.alpha) ~/ 2; - return Color.fromARGB(alpha, red, green, blue); - } -} diff --git a/lib/utils/tools.dart b/lib/utils/tools.dart deleted file mode 100644 index fd48b2b009b80b22248d6e7f08a63e96c4065bd7..0000000000000000000000000000000000000000 --- a/lib/utils/tools.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'package:flutter/foundation.dart'; - -void printlog(String message) { - if (!kReleaseMode) { - debugPrint(message); - } -} diff --git a/pubspec.lock b/pubspec.lock index 36a345c00a0e8bd3912bbbd06fc5514b8fea0142..5ff49d1dc09bf4143b9a4f0f11e54d9a6d77332d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,20 +5,20 @@ packages: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.6.0" async: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.12.0" auto_size_text: - dependency: "direct main" + dependency: transitive description: name: auto_size_text sha256: "3f5261cd3fb5f2a9ab4e2fc3fba84fd9fcaac8821f20a1d4e71f557521b22599" @@ -61,10 +61,10 @@ packages: dependency: transitive description: name: crypto - sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.6" csslib: dependency: transitive description: @@ -82,7 +82,7 @@ packages: source: hosted version: "0.1.6" easy_localization: - dependency: "direct main" + dependency: transitive description: name: easy_localization sha256: fa59bcdbbb911a764aa6acf96bbb6fa7a5cf8234354fc45ec1a43a0349ef0201 @@ -98,7 +98,7 @@ packages: source: hosted version: "0.0.2" equatable: - dependency: "direct main" + dependency: transitive description: name: equatable sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 @@ -127,13 +127,22 @@ packages: source: sdk version: "0.0.0" flutter_bloc: - dependency: "direct main" + dependency: transitive description: name: flutter_bloc sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a url: "https://pub.dev" source: hosted version: "8.1.6" + flutter_custom_toolbox: + dependency: "direct main" + description: + path: "." + ref: "0.1.1" + resolved-ref: ba7137ca9edec7e503ed3dbfe7f6ede7e9cfbf4d + url: "https://git.harrault.fr/android/flutter-toolbox.git" + source: git + version: "0.1.1" flutter_lints: dependency: "direct dev" description: @@ -153,7 +162,7 @@ packages: source: sdk version: "0.0.0" hive: - dependency: "direct main" + dependency: transitive description: name: hive sha256: "8dcf6db979d7933da8217edcec84e9df1bdb4e4edc7fc77dbd5aa74356d6d941" @@ -185,7 +194,7 @@ packages: source: hosted version: "4.0.2" hydrated_bloc: - dependency: "direct main" + dependency: transitive description: name: hydrated_bloc sha256: af35b357739fe41728df10bec03aad422cdc725a1e702e03af9d2a41ea05160c @@ -233,13 +242,13 @@ packages: source: hosted version: "1.0.0" package_info_plus: - dependency: "direct main" + dependency: transitive description: name: package_info_plus - sha256: "894f37107424311bdae3e476552229476777b8752c5a2a2369c0cb9a2d5442ef" + sha256: df3eb3e0aed5c1107bb0fdb80a8e82e778114958b1c5ac5644fb1ac9cae8a998 url: "https://pub.dev" source: hosted - version: "8.0.3" + version: "8.1.0" package_info_plus_platform_interface: dependency: transitive description: @@ -257,7 +266,7 @@ packages: source: hosted version: "1.9.0" path_provider: - dependency: "direct main" + dependency: transitive description: name: path_provider sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 @@ -308,10 +317,10 @@ packages: dependency: transitive description: name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" url: "https://pub.dev" source: hosted - version: "3.1.5" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: @@ -401,10 +410,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" + sha256: "0bd04f5bb74fcd6ff0606a888a30e917af9bd52820b178eaa464beb11dca84b6" url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" synchronized: dependency: transitive description: @@ -425,12 +434,12 @@ packages: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" unicons: - dependency: "direct main" + dependency: transitive description: name: unicons sha256: f3eab9d87c226415ef857cfd2167e1d12ad81ea1f5783b46cf644224fea4eab7 @@ -457,10 +466,10 @@ packages: dependency: transitive description: name: win32 - sha256: "4d45dc9069dba4619dc0ebd93c7cec5e66d8482cb625a370ac806dcc8165f2ec" + sha256: "2735daae5150e8b1dfeb3eb0544b4d3af0061e9e82cef063adcd583bdae4306a" url: "https://pub.dev" source: hosted - version: "5.5.5" + version: "5.7.0" xdg_directories: dependency: transitive description: @@ -470,5 +479,5 @@ packages: source: hosted version: "1.1.0" sdks: - dart: ">=3.5.0 <4.0.0" + dart: ">=3.5.3 <4.0.0" flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index 27cfef33d45efddf7c808bbb18f9a0b774731279..9310d6a1ecd30ff885cee2d4d3ce47996c1ef74e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Hangman game, have fun with words and letters! publish_to: "none" -version: 1.3.2+32 +version: 1.4.0+33 environment: sdk: "^3.0.0" @@ -13,15 +13,10 @@ dependencies: sdk: flutter # base - auto_size_text: ^3.0.0 - easy_localization: ^3.0.1 - equatable: ^2.0.5 - flutter_bloc: ^8.1.1 - hive: ^2.2.3 - hydrated_bloc: ^9.0.0 - package_info_plus: ^8.0.0 - path_provider: ^2.0.11 - unicons: ^3.0.0 + flutter_custom_toolbox: + git: + url: https://git.harrault.fr/android/flutter-toolbox.git + ref: 0.1.1 # specific diacritic: ^0.1.4 @@ -42,13 +37,3 @@ flutter: - family: Tiza fonts: - asset: assets/fonts/tiza.ttf - - family: Nunito - fonts: - - asset: assets/fonts/Nunito-Bold.ttf - weight: 700 - - asset: assets/fonts/Nunito-Medium.ttf - weight: 500 - - asset: assets/fonts/Nunito-Regular.ttf - weight: 400 - - asset: assets/fonts/Nunito-Light.ttf - weight: 300