diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fecebf..38f6273 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 1.0.4 +* Updated installation, usage and setup in README + ## 1.0.3 ### Fixes * Fix: Avoid `setState` being inside `initState` of `LiveDataBuilder` and `LiveDataListener` diff --git a/README.md b/README.md index f970ff2..efe0f04 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ A set of abstractions, utilities inspired from Android Jetpack 🚀 to help mana

- +

## Features @@ -64,7 +64,7 @@ FloatingActionButton( ) ``` -## Getting started +## Setup (One time in a flutter project)
Create a ViewModelFactory for your app @@ -83,9 +83,19 @@ class MyAppViewModelFactory extends ViewModelFactory { } ``` -
+If you use dependency injection frameworks like `get_it`, your factory could like this +```dart +class MyAppViewModelFactory extends ViewModelFactory { + const MyAppViewModelFactory(); -TBA: Add instructions for the users of dependency frameworks like [`get_it`](https://pub.dev/packages/get_it) + @override + T create() { + return GetIt.I.get(); + } +} +``` + +
Provide your ViewModelFactory at the root of your App