$case method

void $case(
  1. bool predicate(
    1. T value
    ), {
  2. Key? key,
  3. required Widget build(
    1. BuildContext context,
    2. T value
    ),
})

Implementation

void $case(
  bool Function(T value) predicate, {
  Key? key,
  required Widget Function(BuildContext context, T value) build,
}) {
  cases.add(endpoint.$case(
    predicate,
    build: build,
  ));
}