From 4aa0d9aa3d0f5b31a6a63719e6d5cbff38dabe31 Mon Sep 17 00:00:00 2001 From: Sardar1208 Date: Thu, 19 Oct 2023 15:57:27 +0530 Subject: [PATCH] fix: fixed tutorial_caoch_mark issue in at_omboarding --- .../at_onboarding_flutter/example/ios/Podfile.lock | 6 +++--- .../macos/Flutter/GeneratedPluginRegistrant.swift | 2 +- packages/at_onboarding_flutter/example/pubspec.yaml | 4 ++-- .../lib/screen/at_onboarding_generate_screen.dart | 7 ++++++- .../lib/screen/at_onboarding_home_screen.dart | 10 ++++++++-- packages/at_onboarding_flutter/pubspec.yaml | 2 +- 6 files changed, 21 insertions(+), 10 deletions(-) diff --git a/packages/at_onboarding_flutter/example/ios/Podfile.lock b/packages/at_onboarding_flutter/example/ios/Podfile.lock index 265eebed..912368ca 100644 --- a/packages/at_onboarding_flutter/example/ios/Podfile.lock +++ b/packages/at_onboarding_flutter/example/ios/Podfile.lock @@ -141,7 +141,7 @@ SPEC CHECKSUMS: at_file_saver: c0e052c72d8c0296318bd70f2ae7f510887014ce at_onboarding_flutter: e8219b6d0bfb236d3837ec3528871aebdcc56e8d biometric_storage: 1400f1382af3a4cc2bf05340e13c3d8de873ceb9 - device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea + device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6 DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 file_picker: ce3938a0df3cc1ef404671531facef740d03f920 @@ -149,12 +149,12 @@ SPEC CHECKSUMS: Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 flutter_keychain: 01aabf894ffe8b01adfda1d9df21c210c1b4b452 MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb - package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7 + package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85 path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6 qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e SDWebImage: 72f86271a6f3139cc7e4a89220946489d4b9a866 - share_plus: 599aa54e4ea31d4b4c0e9c911bcc26c55e791028 + share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5 shared_preferences_foundation: e2dae3258e06f44cc55f49d42024fd8dd03c590c SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780 url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 diff --git a/packages/at_onboarding_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift b/packages/at_onboarding_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift index 508252dd..591d027b 100644 --- a/packages/at_onboarding_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/packages/at_onboarding_flutter/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -20,7 +20,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { BiometricStorageMacOSPlugin.register(with: registry.registrar(forPlugin: "BiometricStorageMacOSPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) - FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) + FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) diff --git a/packages/at_onboarding_flutter/example/pubspec.yaml b/packages/at_onboarding_flutter/example/pubspec.yaml index e59328e0..781d137f 100644 --- a/packages/at_onboarding_flutter/example/pubspec.yaml +++ b/packages/at_onboarding_flutter/example/pubspec.yaml @@ -29,8 +29,6 @@ environment: dependencies: at_app_flutter: ^5.2.0 at_backupkey_flutter: ^4.0.10 - at_onboarding_flutter: - path: ../packages/at_onboarding_flutter cupertino_icons: ^1.0.6 flutter: sdk: flutter @@ -45,6 +43,8 @@ dev_dependencies: dependency_overrides: intl: ^0.17.0 + at_onboarding_flutter: + path: ../ # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_generate_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_generate_screen.dart index 72667811..1734d5ec 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_generate_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_generate_screen.dart @@ -106,10 +106,15 @@ class _AtOnboardingGenerateScreenState paddingFocus: 10, opacityShadow: 0.8, onFinish: _endTutorial, - onSkip: _endTutorial, + onSkip: skipTutorial, )..show(context: context); } + bool skipTutorial() { + _endTutorial(); + return true; + } + void _endTutorial() async { var tutorialInfo = await AtOnboardingTutorialService.getTutorialInfo(); tutorialInfo ??= AtTutorialServiceInfo(); diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_home_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_home_screen.dart index 2c5c3760..e0cf329b 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_home_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_home_screen.dart @@ -101,7 +101,8 @@ class _AtOnboardingHomeScreenState extends State { void _init() async { initTargets(); - await _checkShowTutorial(); + _showTutorial(); + // await _checkShowTutorial(); } Future _checkShowTutorial() async { @@ -139,10 +140,15 @@ class _AtOnboardingHomeScreenState extends State { paddingFocus: 10, opacityShadow: 0.8, onFinish: _endTutorial, - onSkip: _endTutorial, + onSkip: skipTutorial, )..show(context: context); } + bool skipTutorial() { + _endTutorial(); + return true; + } + void _endTutorial() async { var tutorialInfo = await AtOnboardingTutorialService.getTutorialInfo(); tutorialInfo ??= AtTutorialServiceInfo(); diff --git a/packages/at_onboarding_flutter/pubspec.yaml b/packages/at_onboarding_flutter/pubspec.yaml index aeb450f8..3e590adf 100644 --- a/packages/at_onboarding_flutter/pubspec.yaml +++ b/packages/at_onboarding_flutter/pubspec.yaml @@ -39,7 +39,7 @@ dependencies: pin_code_fields: ^8.0.1 qr_code_scanner: ^1.0.1 shared_preferences: ^2.2.1 - tutorial_coach_mark: ^1.2.9 + tutorial_coach_mark: ^1.2.11 url_launcher: ^6.1.14 webview_flutter: ^4.2.4 zxing2: ^0.2.0