added controller scope and extension for context
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../service/controller_scope.dart';
|
||||
|
||||
extension ControllerContext on BuildContext {
|
||||
T controller<T extends ChangeNotifier>() {
|
||||
return ControllerScope.of<T>(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user