SHARE
TWEET

Untitled

a guest Sep 17th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class DynamicValues {
  2.   static Widget get image => floop['image'];
  3.   static set image(Widget widget) => floop['image'] = widget;
  4.   // Here should go all the reads and writes to `floop`
  5. }
  6.  
  7. /// It's also possible to create a local [ObservedMap].
  8. /// `floop` is just an instance of [ObservedMap].
  9. class DynamicValuesLocal {
  10.   static ObservedMap<String, dynamic> dyn = ObservedMap();
  11.  
  12.   static Widget get image => dyn['image'];
  13.   static set image(Widget widget) => dyn['image'] = widget;
  14. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top