diff --git a/lib/entities/localization_item.dart b/lib/entities/localization_item.dart index 985416f..90809ec 100644 --- a/lib/entities/localization_item.dart +++ b/lib/entities/localization_item.dart @@ -5,6 +5,7 @@ class LocalizationItem { String noResultsFound; String unnamedLocation; String tapToSelectLocation; + String searchPlace; LocalizationItem({ @@ -14,5 +15,6 @@ class LocalizationItem { this.noResultsFound = 'No results found', this.unnamedLocation = 'Unnamed location', this.tapToSelectLocation = 'Tap to select this location', + this.searchPlace = 'Search place' }); } diff --git a/lib/widgets/place_picker.dart b/lib/widgets/place_picker.dart index 8890144..0505c86 100644 --- a/lib/widgets/place_picker.dart +++ b/lib/widgets/place_picker.dart @@ -96,7 +96,7 @@ class PlacePickerState extends State { return Scaffold( appBar: AppBar( key: this.appBarKey, - title: SearchInput(searchPlace), + title: SearchInput(searchPlace, widget.localizationItem.searchPlace), centerTitle: true, automaticallyImplyLeading: false, ), diff --git a/lib/widgets/search_input.dart b/lib/widgets/search_input.dart index bc6892e..c067c05 100644 --- a/lib/widgets/search_input.dart +++ b/lib/widgets/search_input.dart @@ -5,8 +5,8 @@ import 'package:flutter/material.dart'; /// Custom Search input field, showing the search and clear icons. class SearchInput extends StatefulWidget { final ValueChanged onSearchInput; - - SearchInput(this.onSearchInput); + final String hintText; + SearchInput(this.onSearchInput, this.hintText); @override State createState() => SearchInputState(); @@ -61,7 +61,7 @@ class SearchInputState extends State { SizedBox(width: 8), Expanded( child: TextField( - decoration: InputDecoration(hintText: "Search place", border: InputBorder.none), + decoration: InputDecoration(hintText: widget.hintText, border: InputBorder.none), controller: this.editController, onChanged: (value) { setState(() {