11import 'package:country_picker/country_picker.dart' as picker;
22import 'package:flutter/material.dart' ;
3+ import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart' ;
34import 'package:ui_kit/ui_kit.dart' ;
45
56/// A form field for selecting a country using the `country_picker` package.
@@ -23,6 +24,7 @@ class CountryPickerFormField extends StatelessWidget {
2324
2425 @override
2526 Widget build (BuildContext context) {
27+ final l10n = AppLocalizationsX (context).l10n;
2628 return InkWell (
2729 onTap: () {
2830 picker.showCountryPicker (
@@ -37,9 +39,8 @@ class CountryPickerFormField extends StatelessWidget {
3739 topRight: Radius .circular (AppSpacing .md),
3840 ),
3941 inputDecoration: InputDecoration (
40- labelText: 'Search' , // TODO(fulleni): Localize this string
41- hintText:
42- 'Start typing to search...' , // TODO(fulleni): Localize this
42+ labelText: l10n.countryPickerSearchLabel,
43+ hintText: l10n.countryPickerSearchHint,
4344 prefixIcon: const Icon (Icons .search),
4445 border: OutlineInputBorder (
4546 borderSide: BorderSide (
@@ -74,7 +75,7 @@ class CountryPickerFormField extends StatelessWidget {
7475 ] else
7576 Expanded (
7677 child: Text (
77- 'Select a country' , // TODO(you): Localize this string
78+ l10n.countryPickerSelectCountryLabel,
7879 style: Theme .of (context)
7980 .textTheme
8081 .bodyLarge
0 commit comments