S2Tile<T>.fromState constructor

S2Tile<T>.fromState(
  1. S2State<T> state, {
  2. Key key,
  3. Widget value,
  4. GestureTapCallback onTap,
  5. Widget title,
  6. bool isError,
  7. bool isLoading,
  8. Widget leading,
  9. Widget trailing,
  10. String loadingText,
  11. Widget loadingMessage,
  12. Widget loadingIndicator,
  13. bool isTwoLine = false,
  14. bool enabled = true,
  15. bool selected = false,
  16. bool dense = false,
  17. bool hideValue = false,
  18. EdgeInsetsGeometry padding,
  19. 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);