|
|
@ -2,7 +2,9 @@ import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
|
|
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
|
|
|
|
|
|
|
import 'package:flutter_linkify/flutter_linkify.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:fluffychat/utils/url_launcher.dart';
|
|
|
|
import 'package:fluffychat/widgets/adaptive_dialogs/adaptive_dialog_action.dart';
|
|
|
|
import 'package:fluffychat/widgets/adaptive_dialogs/adaptive_dialog_action.dart';
|
|
|
|
|
|
|
|
|
|
|
|
Future<String?> showTextInputDialog({
|
|
|
|
Future<String?> showTextInputDialog({
|
|
|
@ -40,13 +42,20 @@ Future<String?> showTextInputDialog({
|
|
|
|
constraints: const BoxConstraints(maxWidth: 256),
|
|
|
|
constraints: const BoxConstraints(maxWidth: 256),
|
|
|
|
child: Text(title),
|
|
|
|
child: Text(title),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
content: Column(
|
|
|
|
content: ConstrainedBox(
|
|
|
|
|
|
|
|
constraints: const BoxConstraints(maxWidth: 256),
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
if (message != null)
|
|
|
|
if (message != null)
|
|
|
|
ConstrainedBox(
|
|
|
|
SelectableLinkify(
|
|
|
|
constraints: const BoxConstraints(maxWidth: 256),
|
|
|
|
text: message,
|
|
|
|
child: Text(message),
|
|
|
|
linkStyle: TextStyle(
|
|
|
|
|
|
|
|
color: Theme.of(context).colorScheme.primary,
|
|
|
|
|
|
|
|
decorationColor: Theme.of(context).colorScheme.primary,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
options: const LinkifyOptions(humanize: false),
|
|
|
|
|
|
|
|
onOpen: (url) => UrlLauncher(context, url.url).launchUrl(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
ValueListenableBuilder<String?>(
|
|
|
|
ValueListenableBuilder<String?>(
|
|
|
@ -108,6 +117,7 @@ Future<String?> showTextInputDialog({
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
actions: [
|
|
|
|
actions: [
|
|
|
|
AdaptiveDialogAction(
|
|
|
|
AdaptiveDialogAction(
|
|
|
|
onPressed: () => Navigator.of(context).pop(null),
|
|
|
|
onPressed: () => Navigator.of(context).pop(null),
|
|
|
|