Skip to content

Commit

Permalink
added set locale to the example app
Browse files Browse the repository at this point in the history
  • Loading branch information
TimHoogstrate committed Mar 5, 2024
1 parent a38ab25 commit 1ba6858
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions geocoding/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 2.2.1

- Updates documentation related to setting the locale.
- Added `setLocaleIdentifier` to the example app.

## 2.2.0

Expand Down
25 changes: 25 additions & 0 deletions geocoding/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,31 @@ class _GeocodeWidgetState extends State<GeocodeWidget> {
});
}),
),
const Padding(
padding: EdgeInsets.only(top: 8),
),
Center(
child: ElevatedButton(
child: Text('Set locale en_US'),
onPressed: () {
setLocaleIdentifier("en_US").then((_) {
setState(() {});
});
})),
const Padding(
padding: EdgeInsets.only(top: 8),
),
Center(
child: ElevatedButton(
child: Text('Set locale nl_NL'),
onPressed: () {
setLocaleIdentifier("nl_NL").then((_) {
setState(() {});
});
})),
const Padding(
padding: EdgeInsets.only(top: 8),
),
Expanded(
child: SingleChildScrollView(
child: Container(
Expand Down

0 comments on commit 1ba6858

Please sign in to comment.