diff --git a/assets/translations/en.json b/assets/translations/en.json index a46a889..0b98c48 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -169,7 +169,7 @@ "deleteThisWallet": "Delete this wallet", "cancel": "Cancel", "inBlockchainResult": "In {} blockchain", - "search": "Search", + "search": "Search an identity\nor an address", "currencyNode": "{} node :", "contactsManagementWithNbr": "My contacts ({})", "contactsManagement": "My contacts", diff --git a/assets/translations/es.json b/assets/translations/es.json index b8a6a03..262d239 100644 --- a/assets/translations/es.json +++ b/assets/translations/es.json @@ -170,7 +170,7 @@ "deleteThisWallet": "Borrar este monedero", "cancel": "Cancelar", "inBlockchainResult": "En la blockchain {}", - "search": "Buscar", + "search": "Buscar una identidad\no una dirección", "currencyNode": "Nodo {} :", "contactsManagementWithNbr": "Mis contactos ({})", "contactsManagement": "Mis contactos", diff --git a/assets/translations/fr.json b/assets/translations/fr.json index d3510bf..06ce1cb 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -170,7 +170,7 @@ "deleteThisWallet": "Supprimer ce portefeuille", "cancel": "Annuler", "inBlockchainResult": "Dans la blockchain {}", - "search": "Rechercher", + "search": "Rechercher une identité\nou une adresse", "currencyNode": "Noeud {} :", "contactsManagementWithNbr": "Mes contacts ({})", "contactsManagement": "Mes contacts", diff --git a/lib/screens/search.dart b/lib/screens/search.dart index 50f9009..3ccc490 100644 --- a/lib/screens/search.dart +++ b/lib/screens/search.dart @@ -18,8 +18,6 @@ class SearchScreen extends StatelessWidget { Widget build(BuildContext context) { final searchProvider = Provider.of(context); final screenHeight = MediaQuery.of(context).size.height; - // final _homeProvider = - // Provider.of(context, listen: false); return WillPopScope( onWillPop: () { @@ -51,6 +49,17 @@ class SearchScreen extends StatelessWidget { Padding( padding: const EdgeInsets.symmetric(horizontal: 17), child: TextField( + onSubmitted: searchProvider.searchController.text.length >= 2 + ? (_) { + Navigator.push( + context, + MaterialPageRoute(builder: (context) { + return const SearchResultScreen(); + }), + ); + } + : (value) {}, + textInputAction: TextInputAction.search, key: keySearchField, controller: searchProvider.searchController, autofocus: true, @@ -89,8 +98,8 @@ class SearchScreen extends StatelessWidget { ), const Spacer(flex: 1), SizedBox( - width: 410, - height: 70, + width: 320, + height: 90, child: ElevatedButton( key: keyConfirmSearch, style: ElevatedButton.styleFrom( @@ -109,8 +118,9 @@ class SearchScreen extends StatelessWidget { : null, child: Text( 'search'.tr(), + textAlign: TextAlign.center, style: const TextStyle( - fontSize: 24, fontWeight: FontWeight.w600), + fontSize: 21, fontWeight: FontWeight.w600), ), ), ), diff --git a/pubspec.yaml b/pubspec.yaml index 99d6f98..18d05bc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ description: Pay with G1. # pub.dev using `pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 0.0.13+42 +version: 0.0.14+43 environment: sdk: '>=2.12.0 <3.0.0'