CoreScreen<E extends UiEvent, S extends DataState> class
abstract
Base class for building screen ui
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CoreScreen
Constructors
- CoreScreen({Key? key})
Properties
- context → BuildContext
-
Public getter for current build context
no setter
- currentState → S
-
Current state getter
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCurrentActive → bool
-
Util getter for whether screen is current active
no setter
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
processor
→ EventToStateProcessor<
E, S> -
Processor getter
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → S
-
Public getter for current build state
no setter
- tickerProvider → TickerProvider
-
TickerProvider public getter for animation uses
no setter
Methods
-
buildScreenUi(
BuildContext context) → Widget -
This method for build screen ui base on current data state. For ex: if state is
state.isLoading
is true then show ProgressBarif (state.isLoading) LoadingIndicatorWidget() else Container()
-
buildStateBuilderWidget(
{Key? key, required ReturnWidgetFunction builder, RebuildWidgetOnStateChangeCondition< S> ? rebuildOnCondition}) → Widget -
buildStateConsumerWidget(
{Key? key, required ReturnWidgetFunction builder, required VoidCallback listener, required Widget child, RebuildWidgetOnStateChangeCondition< S> ? rebuildOnCondition, RaiseListenerOnCondition<S> ? listenOnCondition}) → Widget -
buildStateListenerWidget(
{Key? key, required VoidCallback listener, required Widget child, RaiseListenerOnCondition< S> ? listenOnCondition}) → Widget -
buildStateSelectorWidget<
T> ({Key? key, required SelectorFunction< T> selector, required ReturnWidgetFunction builder}) → Widget -
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createEventProcessor(
BuildContext context) → EventToStateProcessor< E, S> -
Create & return
EventToStateProcessor
instance for use in this widget or its child. For ex:return LoginEventProcessor();
-
createState(
) → State< CoreScreen< E, S> > -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
handleRequest(
RequestData requestData) → Future< ResultData> - This method for handle request from processor or others return data for example: navigate to new screen and wait for result
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onScreenDisposed(
) → void - Call when screen which is statefull widget dispose
-
onScreenInit(
) → void - Call when screen which is statefull widget init its state
-
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
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited