1
0
Fork 0
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.
 
 
 
 
 
thesis_shop/lib/bloc_provider.dart

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;
}
}