> For the complete documentation index, see [llms.txt](https://asamarsal.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://asamarsal.gitbook.io/notes/personal-documentation/mobile/flutter/riverpod.md).

# Riverpod

https\://pub.dev/packages/flutter\_riverpod

1. Install package dengan perintah

```
flutter pub add flutter_riverpod
```

2. Bungkus dengan ProviderScope

```
void main() {
  runApp(const ProviderScope(child: MyApp()));
}
```

Struktur file

```
├── main.dart
├── src/
│   ├── app.dart
│   ├── pages/    
│   │   └── home_page.dart
│   ├── providers/
│   │   └── counter_provider.dart
│   ├── widgets/
│   ├── models/
│   └── services/
```
