ConditionalNavigations class

A class that facilitates conditional navigation between two pages based on a specified condition.

The ConditionalNavigations class evaluates a boolean condition and navigates to either the truePage or the falsePage depending on the result of the condition.

  • condition: A function that returns a boolean value. If true, navigation will proceed to the truePage. Otherwise, it will navigate to the falsePage.
  • truePage: The widget to navigate to if the condition evaluates to true.
  • falsePage: The widget to navigate to if the condition evaluates to false.

Constructors

ConditionalNavigations({required bool condition(), required Widget truePage, required Widget falsePage})

Properties

condition bool Function()
final
falsePage Widget
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
truePage Widget
final

Methods

evaluate() Widget
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited