mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-02 17:29:34 +01:00
chore: Update adaptive dialogs
This commit is contained in:
parent
d60709b72c
commit
0061660142
@ -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 {
|
||||||
|
@ -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:
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user