chore: Update adaptive dialogs

This commit is contained in:
Christian Pauly 2020-11-23 08:06:15 +01:00
parent d60709b72c
commit 0061660142
3 changed files with 6 additions and 3 deletions

View File

@ -14,17 +14,20 @@ import 'package:url_launcher/url_launcher.dart';
class HomeserverPicker extends StatelessWidget { class HomeserverPicker extends StatelessWidget {
Future<void> _setHomeserverAction(BuildContext context) async { Future<void> _setHomeserverAction(BuildContext context) async {
const prefix = 'https://';
final homeserver = await showTextInputDialog( final homeserver = await showTextInputDialog(
title: L10n.of(context).enterYourHomeserver, title: L10n.of(context).enterYourHomeserver,
context: context, context: context,
textFields: [ textFields: [
DialogTextField( DialogTextField(
hintText: AppConfig.defaultHomeserver, hintText: AppConfig.defaultHomeserver,
prefixText: prefix,
keyboardType: TextInputType.url,
) )
], ],
); );
if (homeserver?.single?.isEmpty ?? true) return; if (homeserver?.single?.isEmpty ?? true) return;
_checkHomeserverAction(homeserver.single, context); _checkHomeserverAction(prefix + homeserver.single, context);
} }
void _checkHomeserverAction(String homeserver, BuildContext context) async { void _checkHomeserverAction(String homeserver, BuildContext context) async {

View File

@ -14,7 +14,7 @@ packages:
name: adaptive_dialog name: adaptive_dialog
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.9.0+1" version: "0.9.1"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:

View File

@ -39,7 +39,7 @@ dependencies:
open_file: ^3.0.3 open_file: ^3.0.3
mime_type: ^0.3.2 mime_type: ^0.3.2
flushbar: ^1.10.4 flushbar: ^1.10.4
adaptive_dialog: ^0.9.0+1 adaptive_dialog: ^0.9.1
flutter_matrix_html: ^0.1.13 flutter_matrix_html: ^0.1.13
moor: ^3.4.0 moor: ^3.4.0
sqlite3_flutter_libs: ^0.2.0 sqlite3_flutter_libs: ^0.2.0