31 lines
1.1 KiB
Plaintext

1. flutt
1.1. commands run in terminal
>>
flutter pub add flutter_riverpod
flutter pub add riverpod_annotation
flutter pub add dev:riverpod_generator
flutter pub add dev:build_runner
flutter pub add dev:custom_lint
flutter pub add dev:riverpod_lint
<<
1.2.
>>
flutter pub get
flutter pub run build_runner build ( instead of flutter pub run build_runner watch)
<<
1.3. Add Links.txt file.
1.4. Checkout in other station ==> Must re run 1.1. steps again. (I don't Know why)
(Re-run can update dependencies)
1.5. Update analysis_options.yaml, then run
>>
dart run custom_lint
<<
1.6. Add a "hello world" sample to "main_hello_riverpod.dart", we have some error in code.
Now run
>>
flutter pub run build_runner build
<<
to generate some files (include main_hello_riverpod.g.dart).
Then fix "main_hello_riverpod.dart" with (main.g.dart --> main_hello_riverpod.g.dart).