From 2990c836d597b926a9f3b70791f88e646055dc0c Mon Sep 17 00:00:00 2001 From: FahadFahim71 <45163265+FahadFahim71@users.noreply.github.com> Date: Wed, 31 Jan 2024 11:56:38 +0100 Subject: [PATCH] feat: add introduction screen builder --- .gitignore | 3 +- .metadata | 45 -- CHANGELOG.md | 14 + analysis_options.yaml | 29 +- example/analysis_options.yaml | 29 +- example/lib/main.dart | 67 +- example/pubspec.lock | 583 ------------------ example/pubspec.yaml | 13 +- lib/flutter_start.dart | 3 +- lib/src/models/start_configuration.dart | 42 +- lib/src/services/killswitch_service.dart | 4 +- .../flutter_start_userstory_go_router.dart | 97 ++- .../flutter_start_userstory_navigator.dart | 94 ++- pubspec.lock | 576 ----------------- pubspec.yaml | 18 +- 15 files changed, 234 insertions(+), 1383 deletions(-) delete mode 100644 .metadata create mode 100644 CHANGELOG.md delete mode 100644 example/pubspec.lock delete mode 100644 pubspec.lock diff --git a/.gitignore b/.gitignore index 7dbd97a..e388e46 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,7 @@ migrate_working_dir/ # The .vscode folder contains launch configuration and tasks you configure in # VS Code which you may wish to be included in version control, so this line # is commented out by default. -#.vscode/ +.vscode/ # Flutter/Dart/Pub related **/doc/api/ @@ -43,3 +43,4 @@ app.*.map.json /android/app/release ios .metadata +pubspec.lock diff --git a/.metadata b/.metadata deleted file mode 100644 index eea2802..0000000 --- a/.metadata +++ /dev/null @@ -1,45 +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: "67457e669f79e9f8d13d7a68fe09775fefbb79f4" - channel: "stable" - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - - platform: android - create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - - platform: ios - create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - - platform: linux - create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - - platform: macos - create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - - platform: web - create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - - platform: windows - create_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - base_revision: 67457e669f79e9f8d13d7a68fe09775fefbb79f4 - - # 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/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..ea57cbf --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,14 @@ +## 2.0.0 + +- Add support for default configurable splashscreen +- Add introductionpagebuilder +- Upgrade to flutter_introduction 2.1.0 +- Change the options to optionbuilders to provide BuildContext + +## 1.1.0 + +- Add killswitch functionality + +## 1.0.0 + +- Initial release diff --git a/analysis_options.yaml b/analysis_options.yaml index 0d29021..8ea00ce 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,28 +1,9 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. +include: package:flutter_iconica_analysis/analysis_options.yaml -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml +# Possible to overwrite the rules from the package +analyzer: + exclude: + linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml index 0d29021..8ea00ce 100644 --- a/example/analysis_options.yaml +++ b/example/analysis_options.yaml @@ -1,28 +1,9 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. +include: package:flutter_iconica_analysis/analysis_options.yaml -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml +# Possible to overwrite the rules from the package +analyzer: + exclude: + linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/example/lib/main.dart b/example/lib/main.dart index b984a2c..725adb9 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -12,34 +12,19 @@ class MyApp extends StatelessWidget { const MyApp({super.key}); @override - Widget build(BuildContext context) { - return const MaterialApp( - home: Home(), - ); - } + Widget build(BuildContext context) => const MaterialApp( + home: Home(), + ); } class Home extends StatelessWidget { const Home({super.key}); @override - Widget build(BuildContext context) { - return startNavigatorUserStory(config, context); - } + Widget build(BuildContext context) => + startNavigatorUserStory(config, context); } -final GoRouter _router = GoRouter( - routes: [ - GoRoute( - path: '/', - builder: (BuildContext context, GoRouterState state) { - return const Home(); - }, - ), - ...getStartRoutes() - ], -); - List getStartRoutes() => getStartStoryRoutes( config, ); @@ -50,7 +35,7 @@ StartUserStoryConfiguration config = StartUserStoryConfiguration( onFinish: onFinish, ), homeEntry: const HomeEntry(), - introductionOptions: IntroductionOptions( + introductionOptionsBuilder: (ctx) => IntroductionOptions( pages: [ IntroductionPage( title: const Text('First page'), @@ -106,28 +91,24 @@ class _SplashScreenState extends State { } @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text("SplashScreen"), - ), - body: const Center(child: Text("SplashScreen")), - ); - } + Widget build(BuildContext context) => Scaffold( + appBar: AppBar( + title: const Text('SplashScreen'), + ), + body: const Center(child: Text('SplashScreen')), + ); } class HomeEntry extends StatelessWidget { const HomeEntry({super.key}); @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text("HomeEntry"), - ), - body: const Center(child: Text("HomeEntry")), - ); - } + Widget build(BuildContext context) => Scaffold( + appBar: AppBar( + title: const Text('HomeEntry'), + ), + body: const Center(child: Text('HomeEntry')), + ); } class ExampleIntroductionDataProvider @@ -136,14 +117,10 @@ class ExampleIntroductionDataProvider String key = 'example'; @override - Future setCompleted({bool value = true}) async { - // ignore: void_checks - return Future.value(false); - } + Future setCompleted({bool value = true}) async => + // ignore: void_checks + false; @override - Future shouldShow() { - // ignore: void_checks - return Future.value(true); - } + Future shouldShow() async => true; } diff --git a/example/pubspec.lock b/example/pubspec.lock deleted file mode 100644 index ae41956..0000000 --- a/example/pubspec.lock +++ /dev/null @@ -1,583 +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: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 - url: "https://pub.dev" - source: hosted - version: "64.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" - url: "https://pub.dev" - source: hosted - version: "6.2.0" - args: - dependency: transitive - description: - name: args - sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 - url: "https://pub.dev" - source: hosted - version: "2.4.2" - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - build: - dependency: transitive - description: - name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - 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: a3ec2e0f967bc47f69f95009bb93db936288d61d5343b9436e378b28a2f830c6 - url: "https://pub.dev" - source: hosted - version: "8.9.0" - characters: - dependency: transitive - description: - name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" - code_builder: - dependency: transitive - description: - name: code_builder - sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 - url: "https://pub.dev" - source: hosted - version: "4.10.0" - collection: - dependency: transitive - description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - convert: - dependency: transitive - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - crypto: - dependency: transitive - description: - name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://pub.dev" - source: hosted - version: "3.0.3" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d - url: "https://pub.dev" - source: hosted - version: "1.0.6" - dart_style: - dependency: transitive - description: - name: dart_style - sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368" - url: "https://pub.dev" - source: hosted - version: "2.3.4" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - ffi: - dependency: transitive - description: - name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - file: - dependency: transitive - description: - name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - fixnum: - dependency: transitive - description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_data_interface: - dependency: transitive - description: - path: "." - ref: "1.0.0" - resolved-ref: "500ed1d08095b33387ae3aa4ed1a2ad4d2fb2ac3" - url: "https://github.com/Iconica-Development/flutter_data_interface.git" - source: git - version: "1.0.0" - flutter_introduction: - dependency: transitive - description: - path: "packages/flutter_introduction" - ref: "2.0.0" - resolved-ref: d4037160ce6c7d51d5d1b35b3803bc46a257c7b5 - url: "https://github.com/Iconica-Development/flutter_introduction" - source: git - version: "2.0.0" - flutter_introduction_interface: - dependency: transitive - description: - path: "packages/flutter_introduction_interface" - ref: "2.0.0" - resolved-ref: d4037160ce6c7d51d5d1b35b3803bc46a257c7b5 - url: "https://github.com/Iconica-Development/flutter_introduction" - source: git - version: "2.0.0" - flutter_introduction_service: - dependency: transitive - description: - path: "packages/flutter_introduction_service" - ref: "2.0.0" - resolved-ref: d4037160ce6c7d51d5d1b35b3803bc46a257c7b5 - url: "https://github.com/Iconica-Development/flutter_introduction" - source: git - version: "2.0.0" - flutter_introduction_shared_preferences: - dependency: "direct main" - description: - path: "packages/flutter_introduction_shared_preferences" - ref: "2.0.0" - resolved-ref: d4037160ce6c7d51d5d1b35b3803bc46a257c7b5 - url: "https://github.com/Iconica-Development/flutter_introduction" - source: git - version: "2.0.0" - flutter_introduction_widget: - dependency: transitive - description: - path: "packages/flutter_introduction_widget" - ref: "2.0.0" - resolved-ref: d4037160ce6c7d51d5d1b35b3803bc46a257c7b5 - url: "https://github.com/Iconica-Development/flutter_introduction" - source: git - version: "2.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 - url: "https://pub.dev" - source: hosted - version: "2.0.3" - flutter_start: - dependency: "direct main" - description: - path: ".." - relative: true - source: path - version: "1.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" - glob: - dependency: transitive - description: - name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - go_router: - dependency: "direct main" - description: - name: go_router - sha256: "3b40e751eaaa855179b416974d59d29669e750d2e50fcdb2b37f1cb0ca8c803a" - url: "https://pub.dev" - source: hosted - version: "13.0.1" - http: - dependency: transitive - description: - name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba - url: "https://pub.dev" - source: hosted - version: "1.2.0" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - lints: - dependency: transitive - description: - name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - logging: - dependency: transitive - description: - name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" - url: "https://pub.dev" - source: hosted - version: "0.12.16" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" - url: "https://pub.dev" - source: hosted - version: "0.5.0" - meta: - dependency: transitive - description: - name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e - url: "https://pub.dev" - source: hosted - version: "1.10.0" - mockito: - dependency: transitive - description: - name: mockito - sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" - url: "https://pub.dev" - source: hosted - version: "5.4.4" - package_config: - dependency: transitive - description: - name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - package_info_plus: - dependency: transitive - description: - name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" - url: "https://pub.dev" - source: hosted - version: "5.0.1" - package_info_plus_platform_interface: - dependency: transitive - description: - name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" - url: "https://pub.dev" - source: hosted - version: "2.0.1" - path: - dependency: transitive - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" - 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: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" - url: "https://pub.dev" - source: hosted - version: "2.2.1" - platform: - dependency: transitive - description: - name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" - url: "https://pub.dev" - source: hosted - version: "3.1.4" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://pub.dev" - source: hosted - version: "2.1.8" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - shared_preferences: - dependency: transitive - description: - name: shared_preferences - sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02" - url: "https://pub.dev" - source: hosted - version: "2.2.2" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" - url: "https://pub.dev" - source: hosted - version: "2.2.1" - shared_preferences_foundation: - dependency: transitive - description: - name: shared_preferences_foundation - sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" - url: "https://pub.dev" - source: hosted - version: "2.3.5" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21" - url: "https://pub.dev" - source: hosted - version: "2.2.2" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_gen: - dependency: transitive - description: - name: source_gen - sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" - url: "https://pub.dev" - source: hosted - version: "1.5.0" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://pub.dev" - source: hosted - version: "0.6.1" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://pub.dev" - source: hosted - version: "1.3.2" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - watcher: - dependency: transitive - description: - name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - web: - dependency: transitive - description: - name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 - url: "https://pub.dev" - source: hosted - version: "0.3.0" - win32: - dependency: transitive - description: - name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" - url: "https://pub.dev" - source: hosted - version: "5.2.0" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d - url: "https://pub.dev" - source: hosted - version: "1.0.4" - yaml: - dependency: transitive - description: - name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" - url: "https://pub.dev" - source: hosted - version: "3.1.2" -sdks: - dart: ">=3.2.5 <4.0.0" - flutter: ">=3.16.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index e8c8065..a6f1a41 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,25 +1,30 @@ name: example -description: "A new Flutter project." +description: "Flutter_start example app" publish_to: "none" + environment: sdk: ">=3.2.5 <4.0.0" + dependencies: flutter: sdk: flutter - cupertino_icons: ^1.0.2 - go_router: ^13.0.1 + go_router: any flutter_start: path: ../ flutter_introduction_shared_preferences: git: url: https://github.com/Iconica-Development/flutter_introduction - ref: 2.0.0 + ref: 2.1.0 path: packages/flutter_introduction_shared_preferences dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^2.0.0 + flutter_iconica_analysis: + git: + url: https://github.com/Iconica-Development/flutter_iconica_analysis + ref: 6.0.0 flutter: uses-material-design: true diff --git a/lib/flutter_start.dart b/lib/flutter_start.dart index 0f7d905..b6623f3 100644 --- a/lib/flutter_start.dart +++ b/lib/flutter_start.dart @@ -1,4 +1,5 @@ +export 'package:flutter_introduction/flutter_introduction.dart'; export 'package:flutter_start/src/models/start_configuration.dart'; +export 'package:flutter_start/src/routes.dart'; export 'package:flutter_start/src/user_stories/flutter_start_userstory_go_router.dart'; export 'package:flutter_start/src/user_stories/flutter_start_userstory_navigator.dart'; -export 'package:flutter_introduction/flutter_introduction.dart'; diff --git a/lib/src/models/start_configuration.dart b/lib/src/models/start_configuration.dart index 739869d..29437f8 100644 --- a/lib/src/models/start_configuration.dart +++ b/lib/src/models/start_configuration.dart @@ -5,25 +5,59 @@ import 'package:flutter_introduction/flutter_introduction.dart'; class StartUserStoryConfiguration { const StartUserStoryConfiguration({ this.splashScreenBuilder, - this.introductionOptions = const IntroductionOptions(), + this.introductionBuilder, + this.introductionOptionsBuilder, this.introductionService, this.homeEntry, + this.homeScreenRoute, this.introductionFallbackScreen, this.introductionScrollPhysics, this.showIntroduction = true, this.useKillswitch = false, + this.minimumSplashScreenDuration = 3, + this.splashScreenFuture, + this.splashScreenCenterWidget, + this.splashScreenBackgroundColor, }); + + /// You can use this to build your own splash screen. final Widget Function( BuildContext context, Function() onFinish, )? splashScreenBuilder; + /// This is used to wrap the introduction widget in your own custom page. + final Widget Function( + BuildContext context, + Widget introductionPage, + )? introductionBuilder; + + /// The route that is used to navigate to the home screen. + final String? homeScreenRoute; + final Widget? homeEntry; - final IntroductionOptions introductionOptions; + final IntroductionOptions Function(BuildContext context)? + introductionOptionsBuilder; final Widget? introductionFallbackScreen; final IntroductionService? introductionService; final ScrollPhysics? introductionScrollPhysics; - final bool? showIntroduction; - final bool? useKillswitch; + + /// If the introduction should be shown. + final bool showIntroduction; + + /// If the killswitch is enabled this app can be remotely disabled. + final bool useKillswitch; + + /// The widget that is shown in the center of the splash screen. + final WidgetBuilder? splashScreenCenterWidget; + + /// The background color of the splash screen. + final Color? splashScreenBackgroundColor; + + /// The minimum duration the splash screen in seconds. + final int minimumSplashScreenDuration; + + /// The future that is awaited before the splash screen is closed. + final Future Function(BuildContext context)? splashScreenFuture; } diff --git a/lib/src/services/killswitch_service.dart b/lib/src/services/killswitch_service.dart index 6430556..55c983c 100644 --- a/lib/src/services/killswitch_service.dart +++ b/lib/src/services/killswitch_service.dart @@ -5,8 +5,8 @@ import 'package:package_info_plus/package_info_plus.dart'; class KillswitchService { Future isKillswitchActive() async { - PackageInfo packageInfo = await PackageInfo.fromPlatform(); - String appName = packageInfo.appName; + var packageInfo = await PackageInfo.fromPlatform(); + var appName = packageInfo.appName; var response = await http .get( Uri.parse('https://active-obelugnnza-uc.a.run.app/?appName=$appName'), diff --git a/lib/src/user_stories/flutter_start_userstory_go_router.dart b/lib/src/user_stories/flutter_start_userstory_go_router.dart index 03a2fc7..04dcbd6 100644 --- a/lib/src/user_stories/flutter_start_userstory_go_router.dart +++ b/lib/src/user_stories/flutter_start_userstory_go_router.dart @@ -2,6 +2,8 @@ // // SPDX-License-Identifier: BSD-3-Clause +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_introduction/flutter_introduction.dart'; import 'package:flutter_introduction_shared_preferences/flutter_introduction_shared_preferences.dart'; @@ -20,27 +22,59 @@ List getStartStoryRoutes( path: StartUserStoryRoutes.splashScreen, pageBuilder: (context, state) { var go = context.go; + var killSwitchIsActive = false; + Future myFunction() async { + await Future.wait( + [ + configuration.splashScreenFuture?.call(context) ?? + Future.value(), + Future.delayed( + Duration.zero, + () async { + if (configuration.useKillswitch) + killSwitchIsActive = + await KillswitchService().isKillswitchActive(); + }, + ), + Future.delayed( + Duration( + seconds: configuration.minimumSplashScreenDuration, + ), + () async {}, + ), + ], + ); + + if (configuration.useKillswitch) { + if (!killSwitchIsActive) { + return; + } + } + if (!configuration.showIntroduction) { + return go( + configuration.homeScreenRoute ?? StartUserStoryRoutes.home, + ); + } + return go(StartUserStoryRoutes.introduction); + } + + if (configuration.splashScreenBuilder == null) { + unawaited(myFunction()); + } return buildScreenWithoutTransition( context: context, state: state, child: configuration.splashScreenBuilder?.call( context, - () async { - if (configuration.useKillswitch == true) { - var isActive = - await KillswitchService().isKillswitchActive(); - if (!isActive) { - return; - } - } - if (configuration.showIntroduction == false) { - return go(StartUserStoryRoutes.home); - } - return go(StartUserStoryRoutes.introduction); - }, + () async => myFunction(), ) ?? - const Scaffold( - body: SizedBox.shrink(), + Scaffold( + backgroundColor: configuration.splashScreenBackgroundColor, + body: Center( + child: + configuration.splashScreenCenterWidget?.call(context) ?? + const SizedBox.shrink(), + ), ), ); }, @@ -51,33 +85,28 @@ List getStartStoryRoutes( var introduction = Introduction( service: configuration.introductionService ?? IntroductionService( - SharedPreferencesIntroductionDataProvider()), + SharedPreferencesIntroductionDataProvider(), + ), navigateTo: () { - context.go(StartUserStoryRoutes.home); + context.go( + configuration.homeScreenRoute ?? StartUserStoryRoutes.home, + ); }, - options: configuration.introductionOptions, + options: configuration.introductionOptionsBuilder?.call(context) ?? + const IntroductionOptions(), physics: configuration.introductionScrollPhysics, child: configuration.introductionFallbackScreen, ); return buildScreenWithoutTransition( context: context, state: state, - child: Scaffold( - body: introduction, - ), - ); - }, - ), - GoRoute( - path: StartUserStoryRoutes.home, - pageBuilder: (context, state) { - var home = configuration.homeEntry; - return buildScreenWithoutTransition( - context: context, - state: state, - child: Scaffold( - body: home, - ), + child: configuration.introductionBuilder?.call( + context, + introduction, + ) ?? + Scaffold( + body: introduction, + ), ); }, ), diff --git a/lib/src/user_stories/flutter_start_userstory_navigator.dart b/lib/src/user_stories/flutter_start_userstory_navigator.dart index c4da210..39ac17d 100644 --- a/lib/src/user_stories/flutter_start_userstory_navigator.dart +++ b/lib/src/user_stories/flutter_start_userstory_navigator.dart @@ -4,8 +4,12 @@ import 'package:flutter_start/flutter_start.dart'; import 'package:flutter_start/src/services/killswitch_service.dart'; Widget startNavigatorUserStory( - StartUserStoryConfiguration configuration, BuildContext context) { - if (configuration.splashScreenBuilder == null) { + StartUserStoryConfiguration configuration, + BuildContext context, +) { + if (configuration.splashScreenBuilder == null && + configuration.splashScreenCenterWidget == null && + configuration.splashScreenBackgroundColor == null) { return _introduction(configuration, context); } return _splashScreen(configuration, context); @@ -16,32 +20,57 @@ Widget _splashScreen( BuildContext context, ) { var navigator = Navigator.of(context); + var killSwitchIsActive = false; + Future myFunction() async { + await Future.wait( + [ + configuration.splashScreenFuture?.call(context) ?? Future.value(), + Future.delayed( + Duration.zero, + () async { + if (configuration.useKillswitch) + killSwitchIsActive = + await KillswitchService().isKillswitchActive(); + }, + ), + Future.delayed( + Duration( + seconds: configuration.minimumSplashScreenDuration, + ), + () async {}, + ), + ], + ); + + if (configuration.useKillswitch) { + if (!killSwitchIsActive) { + return; + } + } + if (!configuration.showIntroduction) { + await navigator.pushReplacement( + MaterialPageRoute( + builder: (context) => _home(configuration, context), + ), + ); + } + await navigator.pushReplacement( + MaterialPageRoute( + builder: (context) => _introduction(configuration, context), + ), + ); + } + return configuration.splashScreenBuilder?.call( context, - () async { - bool isActive; - if (configuration.useKillswitch == true) { - isActive = await KillswitchService().isKillswitchActive(); - if (!isActive) { - return () {}; - } - } - if (configuration.showIntroduction == false) { - return navigator.pushReplacement( - MaterialPageRoute( - builder: (context) => _home(configuration, context), - ), - ); - } - return navigator.pushReplacement( - MaterialPageRoute( - builder: (context) => _introduction(configuration, context), - ), - ); - }, + () async => myFunction(), ) ?? - const Scaffold( - body: SizedBox.shrink(), + Scaffold( + backgroundColor: configuration.splashScreenBackgroundColor, + body: Center( + child: configuration.splashScreenCenterWidget?.call(context) ?? + const SizedBox.shrink(), + ), ); } @@ -52,14 +81,13 @@ Widget _introduction( var introduction = Introduction( service: configuration.introductionService ?? IntroductionService(SharedPreferencesIntroductionDataProvider()), - navigateTo: () { - Navigator.of(context).pushReplacement( - MaterialPageRoute( - builder: (context) => _home(configuration, context), - ), - ); - }, - options: configuration.introductionOptions, + navigateTo: () async => Navigator.of(context).pushReplacement( + MaterialPageRoute( + builder: (context) => _home(configuration, context), + ), + ), + options: configuration.introductionOptionsBuilder?.call(context) ?? + const IntroductionOptions(), physics: configuration.introductionScrollPhysics, child: configuration.introductionFallbackScreen, ); diff --git a/pubspec.lock b/pubspec.lock deleted file mode 100644 index 4f8c917..0000000 --- a/pubspec.lock +++ /dev/null @@ -1,576 +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: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 - url: "https://pub.dev" - source: hosted - version: "64.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" - url: "https://pub.dev" - source: hosted - version: "6.2.0" - args: - dependency: transitive - description: - name: args - sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 - url: "https://pub.dev" - source: hosted - version: "2.4.2" - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - build: - dependency: transitive - description: - name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - 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: c9aabae0718ec394e5bc3c7272e6bb0dc0b32201a08fe185ec1d8401d3e39309 - url: "https://pub.dev" - source: hosted - version: "8.8.1" - characters: - dependency: transitive - description: - name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.dev" - source: hosted - version: "1.3.0" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" - code_builder: - dependency: transitive - description: - name: code_builder - sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 - url: "https://pub.dev" - source: hosted - version: "4.10.0" - collection: - dependency: transitive - description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - convert: - dependency: transitive - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" - url: "https://pub.dev" - source: hosted - version: "3.1.1" - crypto: - dependency: transitive - description: - name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://pub.dev" - source: hosted - version: "3.0.3" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d - url: "https://pub.dev" - source: hosted - version: "1.0.6" - dart_style: - dependency: transitive - description: - name: dart_style - sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368" - url: "https://pub.dev" - source: hosted - version: "2.3.4" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" - source: hosted - version: "1.3.1" - ffi: - dependency: transitive - description: - name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - file: - dependency: transitive - description: - name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" - url: "https://pub.dev" - source: hosted - version: "7.0.0" - fixnum: - dependency: transitive - description: - name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_data_interface: - dependency: transitive - description: - path: "." - ref: "1.0.0" - resolved-ref: "500ed1d08095b33387ae3aa4ed1a2ad4d2fb2ac3" - url: "https://github.com/Iconica-Development/flutter_data_interface.git" - source: git - version: "1.0.0" - flutter_introduction: - dependency: "direct main" - description: - path: "packages/flutter_introduction" - ref: "2.0.0" - resolved-ref: d4037160ce6c7d51d5d1b35b3803bc46a257c7b5 - url: "https://github.com/Iconica-Development/flutter_introduction" - source: git - version: "2.0.0" - flutter_introduction_interface: - dependency: transitive - description: - path: "packages/flutter_introduction_interface" - ref: "2.0.0" - resolved-ref: d4037160ce6c7d51d5d1b35b3803bc46a257c7b5 - url: "https://github.com/Iconica-Development/flutter_introduction" - source: git - version: "2.0.0" - flutter_introduction_service: - dependency: transitive - description: - path: "packages/flutter_introduction_service" - ref: "2.0.0" - resolved-ref: d4037160ce6c7d51d5d1b35b3803bc46a257c7b5 - url: "https://github.com/Iconica-Development/flutter_introduction" - source: git - version: "2.0.0" - flutter_introduction_shared_preferences: - dependency: "direct main" - description: - path: "packages/flutter_introduction_shared_preferences" - ref: "2.0.0" - resolved-ref: d4037160ce6c7d51d5d1b35b3803bc46a257c7b5 - url: "https://github.com/Iconica-Development/flutter_introduction" - source: git - version: "2.0.0" - flutter_introduction_widget: - dependency: transitive - description: - path: "packages/flutter_introduction_widget" - ref: "2.0.0" - resolved-ref: d4037160ce6c7d51d5d1b35b3803bc46a257c7b5 - url: "https://github.com/Iconica-Development/flutter_introduction" - source: git - version: "2.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 - url: "https://pub.dev" - source: hosted - version: "2.0.3" - 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" - glob: - dependency: transitive - description: - name: glob - sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - go_router: - dependency: "direct main" - description: - name: go_router - sha256: "3b40e751eaaa855179b416974d59d29669e750d2e50fcdb2b37f1cb0ca8c803a" - url: "https://pub.dev" - source: hosted - version: "13.0.1" - http: - dependency: "direct main" - description: - name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba - url: "https://pub.dev" - source: hosted - version: "1.2.0" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - lints: - dependency: transitive - description: - name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - logging: - dependency: transitive - description: - name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" - url: "https://pub.dev" - source: hosted - version: "0.12.16" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" - url: "https://pub.dev" - source: hosted - version: "0.5.0" - meta: - dependency: transitive - description: - name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e - url: "https://pub.dev" - source: hosted - version: "1.10.0" - mockito: - dependency: transitive - description: - name: mockito - sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" - url: "https://pub.dev" - source: hosted - version: "5.4.4" - package_config: - dependency: transitive - description: - name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" - url: "https://pub.dev" - source: hosted - version: "2.1.0" - package_info_plus: - dependency: "direct main" - description: - name: package_info_plus - sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79" - url: "https://pub.dev" - source: hosted - version: "5.0.1" - package_info_plus_platform_interface: - dependency: transitive - description: - name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" - url: "https://pub.dev" - source: hosted - version: "2.0.1" - path: - dependency: transitive - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" - 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: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" - url: "https://pub.dev" - source: hosted - version: "2.2.1" - platform: - dependency: transitive - description: - name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" - url: "https://pub.dev" - source: hosted - version: "3.1.4" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://pub.dev" - source: hosted - version: "2.1.8" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - shared_preferences: - dependency: transitive - description: - name: shared_preferences - sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02" - url: "https://pub.dev" - source: hosted - version: "2.2.2" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" - url: "https://pub.dev" - source: hosted - version: "2.2.1" - shared_preferences_foundation: - dependency: transitive - description: - name: shared_preferences_foundation - sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" - url: "https://pub.dev" - source: hosted - version: "2.3.5" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21" - url: "https://pub.dev" - source: hosted - version: "2.2.2" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_gen: - dependency: transitive - description: - name: source_gen - sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" - url: "https://pub.dev" - source: hosted - version: "1.5.0" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://pub.dev" - source: hosted - version: "0.6.1" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://pub.dev" - source: hosted - version: "1.3.2" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - watcher: - dependency: transitive - description: - name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" - url: "https://pub.dev" - source: hosted - version: "1.1.0" - web: - dependency: transitive - description: - name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 - url: "https://pub.dev" - source: hosted - version: "0.3.0" - win32: - dependency: transitive - description: - name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" - url: "https://pub.dev" - source: hosted - version: "5.2.0" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d - url: "https://pub.dev" - source: hosted - version: "1.0.4" - yaml: - dependency: transitive - description: - name: yaml - sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" - url: "https://pub.dev" - source: hosted - version: "3.1.2" -sdks: - dart: ">=3.2.5 <4.0.0" - flutter: ">=3.16.0" diff --git a/pubspec.yaml b/pubspec.yaml index 3f3f5ce..9268a77 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: flutter_start description: "Flutter_start is a package that allows you to jumpstart your application with a splashScreen, introduction and a home." publish_to: "none" -version: 1.1.0 +version: 2.0.0 environment: sdk: ">=3.2.5 <4.0.0" @@ -10,24 +10,28 @@ dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.2 + go_router: any + http: any + package_info_plus: any flutter_introduction: git: url: https://github.com/Iconica-Development/flutter_introduction - ref: 2.0.0 + ref: 2.1.0 path: packages/flutter_introduction flutter_introduction_shared_preferences: git: url: https://github.com/Iconica-Development/flutter_introduction - ref: 2.0.0 + ref: 2.1.0 path: packages/flutter_introduction_shared_preferences - go_router: ^13.0.1 - http: ^1.2.0 - package_info_plus: ^5.0.1 + dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + flutter_iconica_analysis: + git: + url: https://github.com/Iconica-Development/flutter_iconica_analysis + ref: 6.0.0 flutter: uses-material-design: true