From 0061660142900d63562b0d8f76575002c56cf23f Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Mon, 23 Nov 2020 08:06:15 +0100 Subject: [PATCH] chore: Update adaptive dialogs --- lib/views/homeserver_picker.dart | 5 ++++- pubspec.lock | 2 +- pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/views/homeserver_picker.dart b/lib/views/homeserver_picker.dart index a9127d0c..17bf565e 100644 --- a/lib/views/homeserver_picker.dart +++ b/lib/views/homeserver_picker.dart @@ -14,17 +14,20 @@ import 'package:url_launcher/url_launcher.dart'; class HomeserverPicker extends StatelessWidget { Future _setHomeserverAction(BuildContext context) async { + const prefix = 'https://'; final homeserver = await showTextInputDialog( title: L10n.of(context).enterYourHomeserver, context: context, textFields: [ DialogTextField( hintText: AppConfig.defaultHomeserver, + prefixText: prefix, + keyboardType: TextInputType.url, ) ], ); if (homeserver?.single?.isEmpty ?? true) return; - _checkHomeserverAction(homeserver.single, context); + _checkHomeserverAction(prefix + homeserver.single, context); } void _checkHomeserverAction(String homeserver, BuildContext context) async { diff --git a/pubspec.lock b/pubspec.lock index 56659770..607ec432 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -14,7 +14,7 @@ packages: name: adaptive_dialog url: "https://pub.dartlang.org" source: hosted - version: "0.9.0+1" + version: "0.9.1" analyzer: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 5c3e1934..f6a19a0b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -39,7 +39,7 @@ dependencies: open_file: ^3.0.3 mime_type: ^0.3.2 flushbar: ^1.10.4 - adaptive_dialog: ^0.9.0+1 + adaptive_dialog: ^0.9.1 flutter_matrix_html: ^0.1.13 moor: ^3.4.0 sqlite3_flutter_libs: ^0.2.0