S2Tile<T>.fromState constructor
S2Tile<T>.fromState (
- S2State<
T> state, { - Key? key,
- Widget? value,
- GestureTapCallback? onTap,
- Widget? title,
- bool? isError,
- bool? isLoading,
- Widget? leading,
- Widget? trailing,
- String? loadingText,
- Widget? loadingMessage,
- Widget? loadingIndicator,
- bool isTwoLine = false,
- bool enabled = true,
- bool selected = false,
- bool dense = false,
- bool hideValue = false,
- EdgeInsetsGeometry? padding,
- Widget? body,
Create a default trigger widget from state
Implementation
S2Tile.fromState(
S2State<T> state, {
Key? key,
Widget? value,
GestureTapCallback? onTap,
Widget? title,
bool? isError,
bool? isLoading,
this.leading,
this.trailing,
this.loadingText,
this.loadingMessage,
this.loadingIndicator,
this.isTwoLine = false,
this.enabled = true,
this.selected = false,
this.dense = false,
this.hideValue = false,
this.padding,
this.body,
}) : title = title ?? state.titleWidget,
value = value ?? Text(state.selected.toString()),
onTap = onTap ?? state.showModal,
isLoading = isLoading ?? state.selected.isResolving,
isError = isError ?? state.selected.isNotValid,
super(key: key);