-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
_Description of what this PR is changing or adding, and why:_ Updated https://github.com/flutter/website/tree/main/src/get-started/flutter-for/android-devs.md page as it is containing some outdated information. _Issues fixed by this PR (if any):_ #10101 ## Presubmit checklist - [x] This PR doesn’t contain automatically generated corrections (Grammarly or similar). - [x] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style) — for example, it doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person). - [x] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer. --------- Co-authored-by: Murtaza Hussain <murtaza.hussain@koderlabs.com>
- Loading branch information
1 parent
148ab2b
commit 5195806
Showing
5 changed files
with
54 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
arb-dir: lib | ||
template-arb-file: arb_examples.arb | ||
output-localization-file: app_localizations.dart |
13 changes: 13 additions & 0 deletions
13
examples/get-started/flutter-for/android_devs/lib/arb_examples.arb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"@@locale": "en", | ||
"hello":"Hello {userName}", | ||
"@hello":{ | ||
"description":"A message with a single parameter", | ||
"placeholders":{ | ||
"userName":{ | ||
"type":"String", | ||
"example":"Bob" | ||
} | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
examples/get-started/flutter-for/android_devs/lib/localization_examples.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; | ||
|
||
class MyWidget extends StatelessWidget { | ||
const MyWidget({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return | ||
// #docregion AccessString | ||
Text(AppLocalizations.of(context)!.hello('John')); | ||
// #enddocregion AccessString | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters