You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
578 B
26 lines
578 B
import 'package:flutter/material.dart';
|
|
|
|
class BlocProvider {
|
|
// TODO TBD
|
|
}
|
|
|
|
class AppState extends InheritedWidget {
|
|
final BlocProvider blocs;
|
|
const AppState({
|
|
Key? key,
|
|
required this.blocs,
|
|
required Widget child,
|
|
}) : super(key: key, child: child);
|
|
|
|
static AppState of(BuildContext context) {
|
|
final AppState? result =
|
|
context.dependOnInheritedWidgetOfExactType<AppState>();
|
|
assert(result != null, 'No AppState found in context');
|
|
return result!;
|
|
}
|
|
|
|
@override
|
|
bool updateShouldNotify(AppState oldWidget) {
|
|
return true;
|
|
}
|
|
}
|
|
|