SHARE
TWEET

Untitled

a guest Dec 15th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top