RadioLogic<S, V, F> class
1. DEFINE LOGIC
RadioLogic _radioLogic;
2. INITIALIZE LOGIC
_radioLogic = RadioLogic();
3. DISPOSE
_radioLogic.dispose();
4. LISTENER
Available states:
- (int) SelectedRadioState
- (F) FailureRadioState
Example:
_radioLogic.listener(
(context, state) {
if (state is SelectedRadioState)
print('selected ' + state.index.toString());
else
print('failure');
},
child: _scaffoldWidget(),
)
5. BUILDER
Available states:
- (int) SelectedRadioState
- (F) FailureRadioState
Example:
_radioLogic.builder(
(context, state) {
if (state is SelectedRadioState)
print('selected ' + state.index.toString());
else
print('failure');
return Container();
}
)
6. EVENTS
- selectEvent(index)
Example:
_radioLogic.selectEvent(index);
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
builder(
Widget builder(BuildContext, RadioState), {bool buildWhen(RadioState, RadioState)?}) → BlocBuilder< BlocBase, dynamic> -
dispose(
) → void -
listener(
void listener(BuildContext, RadioState), {bool listenWhen(RadioState, RadioState)?, required Widget child}) → BlocListener< BlocBase, dynamic> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
select(
dynamic index) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited