Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions sites/docs/src/content/deployment/flavors.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,16 @@ The Flutter framework provides the `appFlavor` constant, which retrieves the nam
### Access the current flavor

1. **Import the services library:**
To access the `appFlavor` constant, add the following import to your Dart file:
To access the `appFlavor` constant,
add the following import to your Dart file:

```dart
import 'package:flutter/services.dart';
```

1. **Check the flavor value:**
Use the `appFlavor` constant in your application logic (often in `main()`) to handle flavor-specific configurations:
Use the `appFlavor` constant in your application logic
(often in `main()`) to handle flavor-specific configurations:

```dart
void main() {
Expand Down Expand Up @@ -379,7 +382,7 @@ you need to add the `default-flavor` field to your project's
pubspec. To learn more, see the [`default-flavor` field][]
in [Flutter pubspec options][].

[`default-flavor` field]: /tools/pubspec#default-flavor-field
[`default-flavor` field]: /tools/pubspec#default-flavor

### Add unique build settings

Expand Down
Loading
Loading