INNER CODE UNIT · Dart
FlutterCleanArchitecture
ShadyBoukhary/flutter_clean_architecture · lib/flutter_clean_architecture.dart:14
class FlutterCleanArchitecture {
/// Retrieves a Controller from the widget tree if one exists
/// Can be used in widgets that exist in pages and need to use the same controller
static Con getController<Con extends Controller>(BuildContext context,
{bool listen = true}) {
return Provider.of<Con>(context, listen: listen);
}
/// Enable customize default view breakpoints. To do so, just call it before `runApp`.
///
/// ```dart
/// void main() {
// FlutterCleanArchitecture.setDefaultViewBreakpoints(
// desktopBreakpointMinimumWidth: 1000,
// tabletBreakpointMinimumWidth: 700,
// watchBreakpointMinimumWidth: 250,
// );
// runApp(MyApp());