diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_accounts_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_accounts_screen.dart index b0d7e2dc..155ca324 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_accounts_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_accounts_screen.dart @@ -4,17 +4,18 @@ import 'package:at_onboarding_flutter/utils/at_onboarding_dimens.dart'; import 'package:at_onboarding_flutter/widgets/at_onboarding_button.dart'; import 'package:flutter/material.dart'; -/// This screen shows the list of atsigns already available for the given email +/// This screen shows the list of atSign already available for the given email class AtOnboardingAccountsScreen extends StatefulWidget { - /// list of atsigns for the email + /// list of atSign for the email final List atsigns; - /// message to display along with the atsign list + /// message to display along with the atSign list final String? message; - /// the new atsign selected in the free atsign generator + /// the new atSign selected in the free atSign generator final String? newAtsign; + /// Configuration for the onboarding process final AtOnboardingConfig config; const AtOnboardingAccountsScreen({ diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_activate_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_activate_screen.dart index 9c182a15..7cc8575d 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_activate_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_activate_screen.dart @@ -20,10 +20,15 @@ import 'package:at_sync_ui_flutter/at_sync_material.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; +/// This screen is for activating an atSign during onboarding process class AtOnboardingActivateScreen extends StatefulWidget { - ///will hide webpage references. + /// If true, will hide webpage references final bool hideReferences; + + /// The atSign to be activated final String? atSign; + + /// The configuration for the onboarding process final AtOnboardingConfig config; const AtOnboardingActivateScreen({ diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_backup_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_backup_screen.dart index 81456847..b72cf2ea 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_backup_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_backup_screen.dart @@ -9,7 +9,9 @@ import 'package:at_onboarding_flutter/utils/at_onboarding_strings.dart'; import 'package:at_onboarding_flutter/widgets/at_onboarding_button.dart'; import 'package:flutter/material.dart'; +/// This screen is for backing up an atKey during onboarding class AtOnboardingBackupScreen extends StatefulWidget { + /// Configuration for the onboarding process final AtOnboardingConfig config; const AtOnboardingBackupScreen({ 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 1734d5ec..3dd2baa1 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 @@ -21,13 +21,19 @@ import 'package:flutter/material.dart'; import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; import 'package:url_launcher/url_launcher.dart'; +/// This screen is for generating atKey class AtOnboardingGenerateScreen extends StatefulWidget { + /// Callback function to be called when atKey generation is successful + /// It receives the generated atSign and its corresponding secret final Function({ required String atSign, required String secret, })? onGenerateSuccess; + /// Configuration for the onboarding process final AtOnboardingConfig config; + + /// Indicates whether the screen is navigated from the intro screen final bool isFromIntroScreen; const AtOnboardingGenerateScreen({ 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 d6b0ba8f..f22a494b 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 @@ -35,15 +35,25 @@ import 'package:url_launcher/url_launcher.dart'; import 'package:zxing2/qrcode.dart'; import 'package:image/image.dart' as img; +/// Home screen provides multiple options like upload atKey, generate new atSign, activatte existing atSign class AtOnboardingHomeScreen extends StatefulWidget { + /// Configuration for the onboarding process final AtOnboardingConfig config; - /// If true, shows the custom dialog to get an atsign + /// If true, shows the custom dialog to get an atSign final bool getAtSign; + + /// If true, hides references final bool hideReferences; + + /// If true, hides QR code scanning final bool hideQrScan; + /// Set status for onboarding process + /// Set the [onboardStatus] to OnboardingStatus.ACTIVATE by default final onboardStatus = OnboardingStatus.ACTIVATE; + + /// Specifies if the screen is being navigated from the intro screen final bool isFromIntroScreen; const AtOnboardingHomeScreen({ diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_input_atsign_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_input_atsign_screen.dart index 88ae9ba3..2f7e6c6a 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_input_atsign_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_input_atsign_screen.dart @@ -8,7 +8,9 @@ import 'package:at_onboarding_flutter/widgets/at_onboarding_button.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; +/// [AtOnboardingInputAtSignScreen] allows to enter atSign for activation process class AtOnboardingInputAtSignScreen extends StatefulWidget { + /// Configuration for the onboarding process final AtOnboardingConfig config; const AtOnboardingInputAtSignScreen({ diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_intro_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_intro_screen.dart index 6cca2645..ce36e585 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_intro_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_intro_screen.dart @@ -11,7 +11,12 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; +/// The introductory screen for the at onboarding process +/// [AtOnboardingIntroScreen] gives two options +/// 1. Already have an atSign - proceeds to home screen to upload atKey +/// 2. Get a free atSign - proceeds to generate free atSign class AtOnboardingIntroScreen extends StatefulWidget { + /// Configuration for the onboarding process final AtOnboardingConfig config; const AtOnboardingIntroScreen({ diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_otp_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_otp_screen.dart index fdce0bac..7a37978c 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_otp_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_otp_screen.dart @@ -16,8 +16,12 @@ import 'package:flutter/services.dart'; import 'package:pin_code_fields/pin_code_fields.dart'; import 'package:url_launcher/url_launcher.dart'; +/// Represent the result of OTP-based onboarding for an atSign class AtOnboardingOTPResult { + /// The atSign associated with the OTP result String atSign; + + /// The secret value, if available String? secret; AtOnboardingOTPResult({ @@ -26,7 +30,9 @@ class AtOnboardingOTPResult { }); } +/// This screen is to perform OTP-based verification class AtOnboardingOTPScreen extends StatefulWidget { + /// Static method to navigate to this screen static Future push({ required BuildContext context, required String atSign, @@ -47,12 +53,16 @@ class AtOnboardingOTPScreen extends StatefulWidget { ); } + /// The atSign to be displayed on the OTP screen final String atSign; + + /// The email address, if provided final String? email; - ///will hide webpage references. + /// If true, will hide webpage references final bool hideReferences; + /// The configuration for the onboarding process final AtOnboardingConfig config; const AtOnboardingOTPScreen({ @@ -620,4 +630,4 @@ class _AtOnboardingOTPScreenState extends State { }, ); } -} \ No newline at end of file +} diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_pair_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_pair_screen.dart index 473e332f..3cf44f6e 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_pair_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_pair_screen.dart @@ -14,17 +14,22 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:url_launcher/url_launcher.dart'; +/// This screen is for pairing an atSign during onboarding process class AtOnboardingPairScreen extends StatefulWidget { + /// The atSign to be paired final String atSign; - ///will hide webpage references. + /// If true, will hide webpage references. final bool hideReferences; + /// A function to be called when the pairing is successful + /// It takes [atSign] and [secret] as required parameters final Function({ required String atSign, required String secret, })? onGenerateSuccess; + /// Configuration for the onboarding process final AtOnboardingConfig config; const AtOnboardingPairScreen({ diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_qrcode_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_qrcode_screen.dart index 853a630b..cb7b0f92 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_qrcode_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_qrcode_screen.dart @@ -7,8 +7,12 @@ import 'package:flutter/material.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:qr_code_scanner/qr_code_scanner.dart'; +/// Represents the result of scanning a QR code during the onboarding process class AtOnboardingQRCodeResult { + /// The atSign associated with the QR result final String atSign; + + /// The secret associated with the QR result final String secret; AtOnboardingQRCodeResult({ @@ -17,7 +21,9 @@ class AtOnboardingQRCodeResult { }); } +/// The QR code screen used during the onboarding process. class AtOnboardingQRCodeScreen extends StatefulWidget { + /// Configuration for the onboarding process final AtOnboardingConfig config; const AtOnboardingQRCodeScreen({ diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_reference_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_reference_screen.dart index 2c656c42..718f575c 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_reference_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_reference_screen.dart @@ -5,7 +5,10 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:webview_flutter/webview_flutter.dart'; +/// Displays onboarding reference screens +/// It uses weview to display the [url] class AtOnboardingReferenceScreen extends StatefulWidget { + /// Static method to navigate to this screen static push({ required BuildContext context, required String? url, @@ -24,8 +27,13 @@ class AtOnboardingReferenceScreen extends StatefulWidget { ); } + /// The URL to display on the screen final String? url; + + /// The title for the screen final String? title; + + /// Configuration for the onboarding process final AtOnboardingConfig config; const AtOnboardingReferenceScreen({ diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_reset_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_reset_screen.dart index 95659de9..c6c6b7d4 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_reset_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_reset_screen.dart @@ -8,9 +8,9 @@ import 'package:at_onboarding_flutter/widgets/at_onboarding_dialog.dart'; import 'package:flutter/material.dart'; import 'package:at_onboarding_flutter/at_onboarding_result.dart'; - - +/// The screen is used for resetting the paired atSign class AtOnboardingResetScreen extends StatefulWidget { + /// Configuration for the onboarding process final AtOnboardingConfig config; const AtOnboardingResetScreen({ diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_start_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_start_screen.dart index d5522606..e929e9dc 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_start_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_start_screen.dart @@ -13,7 +13,9 @@ import 'package:at_onboarding_flutter/widgets/at_onboarding_dialog.dart'; import 'package:at_sync_ui_flutter/at_sync_material.dart'; import 'package:flutter/material.dart'; +/// The starting screen for the onboarding process class AtOnboardingStartScreen extends StatefulWidget { + /// Configuration for the onboarding process final AtOnboardingConfig config; const AtOnboardingStartScreen({ diff --git a/packages/at_onboarding_flutter/lib/screen/at_onboarding_webview_screen.dart b/packages/at_onboarding_flutter/lib/screen/at_onboarding_webview_screen.dart index 8ee64c82..25166bf6 100644 --- a/packages/at_onboarding_flutter/lib/screen/at_onboarding_webview_screen.dart +++ b/packages/at_onboarding_flutter/lib/screen/at_onboarding_webview_screen.dart @@ -3,8 +3,12 @@ import 'package:at_onboarding_flutter/localizations/generated/l10n.dart'; import 'package:flutter/material.dart'; import 'package:webview_flutter/webview_flutter.dart'; +/// This screen is for showing WebView during the onboarding process class AtOnboardingWebviewScreen extends StatefulWidget { + /// The URL to be displayed final String? url; + + /// The title of the screen final String? title; const AtOnboardingWebviewScreen({