Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement