childForSlot method

  1. @override
Widget? childForSlot(
  1. CustomCbSlot slot
)
override

Returns the widget that is currently occupying the provided slot.

The RenderObject configured by this class will be configured to have the RenderObject produced by the returned Widget in the provided slot.

Implementation

@override
Widget? childForSlot(CustomCbSlot slot) {
  switch (slot) {
    case CustomCbSlot.cb:
      return Checkbox(value: value, onChanged: (value) {});
    case CustomCbSlot.child:
      return child;
  }
}