chore: Update adaptive dialogs
This commit is contained in:
parent
1efc1f9450
commit
8de1960a54
3 changed files with 6 additions and 3 deletions
|
|
@ -14,17 +14,20 @@ import 'package:url_launcher/url_launcher.dart';
|
|||
|
||||
class HomeserverPicker extends StatelessWidget {
|
||||
Future<void> _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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue