$guard<T>.isNotEmpty constructor

$guard<T>.isNotEmpty(
  1. LiveData<T> lv, {
  2. Key? key,
  3. required Widget build(
    1. BuildContext context,
    2. T value
    ),
})

Implementation

factory $guard.isNotEmpty(
  LiveData<T> lv, {
  Key? key,
  required Widget Function(BuildContext context, T value) build,
}) =>
    $guard<T>(
      lv,
      key: key,
      when: (T t) {
        if (t is List) return t.isNotEmpty;
        return true;
      },
      build: build,
    );