Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
n-bernat committed Sep 7, 2024
1 parent 1024ad5 commit 889218c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,18 @@ class AppPreferences extends BaseAppPreferences {
currentUser,
];
}
```

```dart
// Sample enum.
enum FontSize {
small,
medium,
large,
}
```

```dart
// Sample custom object.
class User {
const User({required this.name});
Expand Down Expand Up @@ -97,7 +101,7 @@ Future<void> main() async {

3. Provide and use it everywhere in your app:

- `provider`
- using `provider`

```dart
// Provide
Expand All @@ -119,7 +123,7 @@ final fontSize = context.select<AppPreferences, FontSize>(
);
```

- Global instance
- using a global instance

```dart
// Declare
Expand Down

0 comments on commit 889218c

Please sign in to comment.