Open in app
Home
Notifications
Lists
Stories

Write
Hien Trung Nguyen
Hien Trung Nguyen

Home

Jul 15, 2020

Flutter in MVVM pattern

The first part I have created observable objects in Dart, and now it’s time to create Flutter project that follow MVVM pattern. Add this to your package’s pubspec.yaml file: dependencies: vmobject: ^1.0.1 ObserverWidget A widget auto rebuild every time the observable changed //define observable in viewmodel final count = Observable(0); //used in build…

Flutter

1 min read

Flutter in MVVM pattern
Flutter in MVVM pattern

Jun 17, 2020

New observable in Dart

An observable, computed objects written in Dart with built-in validation Observable An object will notify to all listeners/observers after its value changed. Example: var a = Observable('test'); a.listen(() { print(a.value); }); a.value = 'First test'; Output result: test First test Computed It’s an observable too, but its value will be calculated from…

Dart

2 min read

Hien Trung Nguyen

Hien Trung Nguyen

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable