Commit 9fefbfd8 authored by Dario Satriani's avatar Dario Satriani 💬
Browse files

- Updated docs;

parent 91eaa87b
......@@ -16,6 +16,53 @@ A library for simplified __state (model) management__ and __service location__ i
* [ControllerGadget](#controllergadget)
* [Service](#service)
### Migration to 0.3.0
* The ```viewModel``` property and the ```init``` method have been removed from [ViewModelGadget](#viewmodelgadget).
Now the ```viewModel``` can be created and initialized using the ```create``` method.
What used to be:
```dart
ViewModelGadget<MyViewModel>(
viewModel: MyViewModel(),
init: (viewModel) => viewModel.controller = TextEditingController(),
...
)
```
is now:
```dart
ViewModelGadget<MyViewModel>(
create: () => MyViewModel()..controller = TextEditingController(),
...
)
```
* The ```controller``` property and the ```init``` method have been removed from [ViewGadget](#viewgadget).
Now the ```controller``` can be created and initialized using the ```create``` method.
What used to be:
```dart
ViewGadget<MyController>(
controller: MyWelcomeViewController(),
init: (controller) => ...,
...
)
```
is now:
```dart
ViewGadget<MyController>(
create: () => MyWelcomeViewController(),
...
)
```
## Introduction
State management in Flutter is tough. Flutter Gadgets provides a simple solution to that, along the same principles as [Redux](https://redux.js.org/), but in our opinion much simpler to adopt.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment