feat: add clear search box fix: close text size
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
"couldNotCreateTab": "Could not create tab: {error}",
|
||||
"@couldNotCreateTab": {"placeholders": {"error": {"type": "String"}}},
|
||||
"searchByName": "Search by name…",
|
||||
"clearSearch": "Clear search",
|
||||
"allCustomers": "All customers",
|
||||
"customer": "Customer",
|
||||
"noClosedTabs": "No closed tabs yet",
|
||||
|
||||
@@ -206,6 +206,12 @@ abstract class AppLocalizations {
|
||||
/// **'Search by name…'**
|
||||
String get searchByName;
|
||||
|
||||
/// No description provided for @clearSearch.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Clear search'**
|
||||
String get clearSearch;
|
||||
|
||||
/// No description provided for @allCustomers.
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
|
||||
@@ -64,6 +64,9 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
@override
|
||||
String get searchByName => 'Search by name…';
|
||||
|
||||
@override
|
||||
String get clearSearch => 'Clear search';
|
||||
|
||||
@override
|
||||
String get allCustomers => 'All customers';
|
||||
|
||||
|
||||
@@ -64,6 +64,9 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
@override
|
||||
String get searchByName => 'Zoeken op naam…';
|
||||
|
||||
@override
|
||||
String get clearSearch => 'Zoekopdracht wissen';
|
||||
|
||||
@override
|
||||
String get allCustomers => 'Alle klanten';
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
"couldNotCreateTab": "Poef kon niet worden aangemaakt: {error}",
|
||||
"@couldNotCreateTab": {"placeholders": {"error": {"type": "String"}}},
|
||||
"searchByName": "Zoeken op naam…",
|
||||
"clearSearch": "Zoekopdracht wissen",
|
||||
"allCustomers": "Alle klanten",
|
||||
"customer": "Klant",
|
||||
"noClosedTabs": "Nog geen gesloten poefs",
|
||||
|
||||
@@ -411,6 +411,18 @@ class _TabPanelState extends State<_TabPanel> {
|
||||
decoration: InputDecoration(
|
||||
hintText: l10n.searchByName,
|
||||
prefixIcon: Icon(Icons.search_rounded, size: 20),
|
||||
suffixIcon: _searchQuery.isEmpty
|
||||
? null
|
||||
: IconButton(
|
||||
onPressed: () {
|
||||
_searchController.clear();
|
||||
setState(() {
|
||||
_searchQuery = '';
|
||||
});
|
||||
},
|
||||
icon: const Icon(Icons.clear_rounded),
|
||||
tooltip: l10n.clearSearch,
|
||||
),
|
||||
isDense: true,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -39,11 +39,21 @@ class _SlideConfirmState extends State<SlideConfirm> {
|
||||
alignment: Alignment.centerLeft,
|
||||
children: [
|
||||
Center(
|
||||
child: Text(
|
||||
_confirmed ? l10n.closingTab : l10n.slideToConfirmClosing,
|
||||
style: TextStyle(
|
||||
color: scheme.error,
|
||||
fontWeight: FontWeight.w700,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: size),
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
_confirmed
|
||||
? l10n.closingTab
|
||||
: l10n.slideToConfirmClosing,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
color: scheme.error,
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user