18 lines
533 B
Dart
18 lines
533 B
Dart
import 'notifier.dart';
|
|
import 'notifier_gaps.dart';
|
|
|
|
/// Consumer sites. This file declares no notifier, so it only contributes
|
|
/// usage.
|
|
class NotifierView {
|
|
const NotifierView();
|
|
|
|
/// BAD: consumes a notifier that never notifies.
|
|
Object buildInert() => Consumer<InertNotifier>(
|
|
builder: (context, notifier, child) => notifier.value,
|
|
);
|
|
|
|
/// GOOD: consumes a notifier that does notify.
|
|
Object buildLive() => Consumer<LiveNotifier>(
|
|
builder: (context, notifier, child) => notifier.value,
|
|
);
|
|
}
|