JourneyState<T extends StatefulWidget>  class 
    abstract
 
A specialized state class for journey pages in NavigationHub journey layouts
This class extends NyState with journey-specific functionality to make it easier to create onboarding flows and multi-step journeys.
- Inheritance
- 
    - Object
- State<T> 
- NyBaseState<T> 
- NyState<T> 
- JourneyState
 
Constructors
- JourneyState({String? path, })
Properties
- allowStateUpdates → bool
- 
  Check if the state should listen for events via the EventBus.
  no setterinherited
- completionPercentage → double
- 
  The completion percentage (0.0 to 1.0)
  no setter
- context → BuildContext
- 
  The location in the tree where this widget builds.
  no setterinherited
- currentStep → int
- 
  The current step index (0-based)
  no setter
- eventBus → EventBus?
- 
  Helper to get the EventBus.
  no setterinherited
- eventSubscription ↔ StreamSubscription?
- 
  The eventSubscription is used to listen for UpdateState events.
  getter/setter pairinherited
- hashCode → int
- 
  The hash code for this object.
  no setterinherited
- hasInitComplete ↔ bool
- 
  Check if the initState has already been loaded.
  getter/setter pairinherited
- init → dynamic Function()
- 
  Initialize your widget in init.
  no setterinherited
- isFirstStep → bool
- 
  Whether this is the first step
  no setter
- isLastStep → bool
- 
  Whether this is the last step
  no setter
- journeyHelper → JourneyHelper
- 
  Get the journey helper instance
  no setter
- loadingStyle → LoadingStyle
- 
  Define the LoadingStyle for the widget.
  no setterinherited
- mediaQuery → MediaQueryData
- 
  Helper to get the MediaQueryData.
  no setterinherited
- mounted → bool
- 
  Whether this State object is currently in a tree.
  no setterinherited
- 
  The state name of the navigation hub
  final
- overrideLoading ↔ bool
- 
  Override the loading state.
  getter/setter pairinherited
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  no setterinherited
- shouldLoadView → bool
- 
  Check if the widget should be loaded.
  no setterinherited
- 
  stateActions
  → Map<String, Function> 
- 
  Get the state actions
  no setterinherited
- stateData ↔ dynamic
- 
  The stateData contains the last value set from a updateState()call.getter/setter pairinherited
- stateName ↔ String?
- 
  The stateName is used as the ID for the UpdateState class.
  getter/setter pairinherited
- textTheme → TextTheme
- 
  Helper to get the TextTheme.
  no setterinherited
- totalSteps → int
- 
  The total number of steps
  no setter
- widget → T
- 
  The current configuration.
  no setterinherited
Methods
- 
  activate() → void 
- 
  Called when this object is reinserted into the tree after having been
removed via deactivate.
  inherited
- 
  afterLoad({required dynamic child(), Widget? loading, String? loadingKey}) → Widget 
- 
  The afterLoad method will check if the state is loading
If loading it will display the loadingwidget. You can also specify the name of theloadingKey.inherited
- 
  afterNotLocked(String name, {required dynamic child(), Widget? loading}) → Widget 
- 
  The afterNotLocked method will check if the state is locked,
if the state is locked it will display the loadingwidget.inherited
- 
  afterNotNull(dynamic variable, {required dynamic child(), Widget? loading}) → Widget 
- 
  The afterNotNull method will check if the variablepassed in is null If the variable is not null, it will display theloadingwidget.inherited
- 
  attemptContinue() → Future< bool> 
- Attempt to continue to the next step with validation
- 
  awaitData({String name = 'default', required Function perform, bool shouldSetStateBefore = true, bool shouldSetStateAfter = true}) → Future< void> 
- 
  Use the awaitData method when initial fetching data for a widget.
E.g. When your page first loads and you want to populate your widgets with
data.
  inherited
- 
  build(BuildContext context) → Widget 
- 
  Describes the part of the user interface represented by this widget.
  inherited
- 
  buildJourneyContent({required Widget content, Widget? nextButton, Widget? backButton, ProgressIndicatorPosition progressPosition = ProgressIndicatorPosition.top, JourneyProgressStyle? progressStyle, EdgeInsetsGeometry contentPadding = const EdgeInsets.all(16.0), EdgeInsets? progressIndicatorPadding, Widget? header, CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center}) → Widget 
- Build a content widget with optional journey progress indicators and navigation buttons
- 
  buildJourneyPage({required Widget content, Widget? nextButton, Widget? backButton, ProgressIndicatorPosition progressPosition = ProgressIndicatorPosition.top, JourneyProgressStyle? progressStyle, EdgeInsetsGeometry contentPadding = const EdgeInsets.all(16.0), EdgeInsets? progressIndicatorPadding, Widget? header, Color? backgroundColor, Widget? appBar, CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center}) → Widget 
- Build a full-screen journey page with customizable elements
- 
  canContinue() → Future< bool> 
- Check if the journey can continue to the next step Override this method to add validation logic
- 
  changeLanguage(String language, {bool restartState = true}) → Future< void> 
- 
  Update the language in the application
  inherited
- 
  color({Color? light, Color? dark}) → Color 
- 
  Get the color based on the device mode
  inherited
- 
  confirmAction(dynamic action(), {required String title, String dismissText = "Cancel", String confirmText = "Yes", CupertinoThemeData? cupertinoThemeData, ThemeData? themeData, Color barrierColor = kCupertinoModalBarrierColor, bool barrierDismissible = true, bool semanticsDismissible = false, RouteSettings? routeSettings, Offset? anchorPoint}) → void 
- 
  Allow the user to confirm an action. Provide atitlefor the confirm button. You can also provide adismissTextfor the cancel button. E.g. confirmAction(() { ... perform action }, title: "Delete account?", dismissText: "Cancel");inherited
- 
  data<T> ({dynamic defaultValue}) → T? 
- 
  Get data from the NyStatefulWidget controller.
  inherited
- 
  deactivate() → void 
- 
  Called when this object is removed from the tree.
  inherited
- 
  debugFillProperties(DiagnosticPropertiesBuilder properties) → void 
- 
  Add additional properties associated with the node.
  inherited
- 
  didChangeDependencies() → void 
- 
  Called when a dependency of this State object changes.
  inherited
- 
  didUpdateWidget(covariant T oldWidget) → void 
- 
  Called whenever the widget configuration changes.
  inherited
- 
  dispose() → void 
- 
  Called when this object is removed from the tree permanently.
  inherited
- 
  goToFirstStep() → void 
- Jump to the first step
- 
  goToLastStep() → void 
- Jump to the last step
- 
  goToNextStep() → void 
- Jump to the next step
- 
  goToPreviousStep() → void 
- Jump to the previous step
- 
  goToStep(int stepIndex) → void 
- Jump to a specific step by index
- 
  hasQueryParameter(String key) → bool 
- 
  Check if the queryParameters contains a specific key.
  inherited
- 
  initState() → void 
- 
  Called when this object is inserted into the tree.
  inherited
- 
  isLoading({String name = 'default'}) → bool 
- 
  Checks the value from your loading map.
Provide the nameof the loader.inherited
- 
  isLocked(String name) → bool 
- 
  Checks the value from your lock map.
Provide the nameof the lock.inherited
- 
  listen<E extends NyEvent> (dynamic callback(Map? data)) → NyEventSubscription< NyEvent> 
- 
  Listen to an event with a callback function
Returns a subscription reference that can be used to cancel later
  inherited
- 
  lockRelease(String name, {required Function perform, bool shouldSetState = true}) → Future< void> 
- 
  The lockRelease method will call the function provided in performand then block the function from being called again until it has finished.inherited
- 
  nextStep() → Future< bool> 
- Navigate to the next step - returns true if successful For use when explicitly wanting to navigate, typically from a button press
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  onAfterNext() → Future< void> 
- Called after navigating to the next step Override this method to perform actions after continuing
- 
  onBackPressed() → Future< void> 
- Simple helper for navigating to the previous step
- 
  onBeforeNext() → Future< void> 
- Called before navigating to the next step Override this method to perform actions before continuing
- 
  onCannotContinue() → Future< void> 
- Called when unable to continue (canContinue returns false) Override this method to handle validation failures
- 
  onComplete() → Future< void> 
- Called when the journey is complete (at the last step) Override this method to perform completion actions
- 
  onNextPressed() → Future< void> 
- Simple helper for navigating to the next step This combines validation logic with navigation
- 
  pop({dynamic result}) → void 
- 
  Pop the current widget from the stack.
  inherited
- 
  previousStep() → Future< bool> 
- Navigate to the previous step - returns true if successful For use when explicitly wanting to navigate, typically from a button press
- 
  pushTo(Widget page, {dynamic data, dynamic onPop(dynamic value)?}) → void 
- 
  Push to a new page
  inherited
- 
  queryParameters({String? key}) → dynamic 
- 
  Get queryParameters from the NyStatefulWidget controller.
  inherited
- 
  reassemble() → void 
- 
  Called whenever the application is reassembled during debugging, for
example during hot reload.
  inherited
- 
  reboot() → Future< void> 
- 
  Reboot your widget.
  inherited
- 
  resetCurrentStep() → void 
- Reset the current step
- 
  setLoading(bool value, {String name = 'default', bool resetState = true}) → void 
- 
  Set the value of a loading key by padding a true or false
  inherited
- 
  setState(VoidCallback fn) → void 
- 
  Notify the framework that the internal state of this object has changed.
  inherited
- 
  showToast({ToastNotificationStyleType style = ToastNotificationStyleType.success, required String title, required String description, IconData? icon, Duration? duration}) → void 
- 
  Show a toast notification
  inherited
- 
  showToastCustom({String? title, String? description, ToastNotificationStyleType? style}) → void 
- 
  Display a custom Toast message.
  inherited
- 
  showToastDanger({String? title, required String description, ToastNotificationStyleType? style}) → void 
- 
  Displays a Toast message containing "Error" for the title, you
only need to provide a description.inherited
- 
  showToastInfo({String? title, required String description, ToastNotificationStyleType? style}) → void 
- 
  Displays a Toast message containing "Info" for the title, you
only need to provide a description.inherited
- 
  showToastOops({String? title, required String description, ToastNotificationStyleType? style}) → void 
- 
  Displays a Toast message containing "Oops" for the title, you
only need to provide a description.inherited
- 
  showToastSorry({String? title, required String description, ToastNotificationStyleType? style}) → void 
- 
  Displays a Toast message containing "Sorry" for the title, you
only need to provide a description.inherited
- 
  showToastSuccess({String? title, required String description, ToastNotificationStyleType? style}) → void 
- 
  Displays a Toast message containing "Success" for the title, you
only need to provide a description.inherited
- 
  showToastWarning({String? title, required String description, ToastNotificationStyleType? style}) → void 
- 
  Displays a Toast message containing "Warning" for the title, you
only need to provide a description.inherited
- 
  stateUpdated(dynamic data) → Future< void> 
- 
  When you call updateState, this method will be called within your
State. The dataparameter will contain any data passed from the updateState method.inherited
- 
  toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode 
- 
  Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
  inherited
- 
  toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String 
- 
  A string representation of this object.
  inherited
- 
  toStringShort() → String 
- 
  A brief description of this object, usually just the runtimeType and the
hashCode.
  inherited
- 
  validate({required Map< String, dynamic> rules, Map<String, dynamic> ? data, Map<String, dynamic> ? messages, bool showAlert = true, Duration? alertDuration, ToastNotificationStyleType alertStyle = ToastNotificationStyleType.warning, required dynamic onSuccess()?, dynamic onFailure(Exception exception)?, String? lockRelease}) → void
- 
  Validate data from your widget.
  inherited
- 
  view(BuildContext context) → Widget 
- 
  Display your widget.
  inherited
- 
  whenEnv(String env, {required Function perform, bool shouldSetState = true}) → Future< void> 
- 
  Perform an action when the application's envis in a certain stateinherited
- 
  whenStateAction(Map< String, Function> actions) → void
- 
  Handle what happens when an action is called
actionsis a map of actionsinherited
- 
  whenTheme<T> ({required T light(), T dark()?}) → T 
- 
  When the theme is in lightmode, returnlightfunction, else returndarkfunctioninherited
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  inherited