data<T> method

T? data<T>({
  1. dynamic defaultValue,
})

Get data from the NyStatefulWidget controller.

Implementation

// ignore: avoid_shadowing_type_parameters
T? data<T>({dynamic defaultValue}) {
  if (widget is NyStatefulWidget) {
    return (widget as NyStatefulWidget)
        .controller
        .data(defaultValue: defaultValue);
  }
  return null;
}