create method

  1. @override
Widget create(
  1. SwitchWidgetData data,
  2. Environment environment,
  3. BuildContext context
)
override

create the widget given a WidgetData type data the widget data environment the current Environment context the BuildContext

Implementation

@override
Widget create(SwitchWidgetData data, Environment environment, BuildContext context) {
  // In edit mode, make the text field non-interactive
  return IgnorePointer(
    ignoring: true,
    child: Switch(
      value: false,
      onChanged: (bool newValue) {},
    ),
  );
}