Guest User

Untitled

a guest
Dec 15th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. static Model of(BuildContext context) {
  2. _ModelBindingScope scope = context.inheritFromWidgetOfExactType(_ModelBindingScope);
  3. return scope.modelBindingState.currentModel;
  4. }
  5.  
  6. static void update(BuildContext context, Model newModel) {
  7. _ModelBindingScope scope = context.inheritFromWidgetOfExactType(_ModelBindingScope);
  8. scope.modelBindingState.updateModel(newModel);
  9. }
Add Comment
Please, Sign In to add comment