refactor: Reimplement flutter matrix html locally

This commit is contained in:
Krille 2023-05-17 12:26:59 +02:00
commit 796a6fdae1
9 changed files with 431 additions and 291 deletions

View file

@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:flutter_linkify/flutter_linkify.dart';
import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:matrix/matrix.dart';
import 'package:matrix_link_text/link_text.dart';
import 'package:vrouter/vrouter.dart';
import 'package:fluffychat/utils/url_launcher.dart';
@ -153,17 +153,15 @@ class PublicRoomBottomSheet extends StatelessWidget {
color: Theme.of(context).colorScheme.secondary,
),
),
subtitle: LinkText(
subtitle: Linkify(
text: profile!.topic!,
linkStyle: const TextStyle(color: Colors.blueAccent),
textStyle: TextStyle(
style: TextStyle(
fontSize: 14,
color: Theme.of(context).textTheme.bodyMedium!.color,
),
beforeLaunch: (url) {
UrlLauncher(context, url.toString()).launchUrl();
return false;
},
onOpen: (url) =>
UrlLauncher(context, url.url).launchUrl(),
),
),
],