forked from firka/firka
fix: message content style and links
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
import 'package:firka/core/extensions.dart';
|
||||
import 'package:firka/app/app_state.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_html/flutter_html.dart';
|
||||
import 'package:majesticons_flutter/majesticons_flutter.dart';
|
||||
|
||||
import 'package:kreta_api/kreta_api.dart';
|
||||
import 'package:firka/core/firka_bundle.dart';
|
||||
import 'package:firka/ui/theme/style.dart';
|
||||
import 'package:firka/ui/shared/firka_icon.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
class MessageScreen extends StatelessWidget {
|
||||
final AppInitialization data;
|
||||
@@ -150,12 +152,18 @@ class MessageScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: SingleChildScrollView(
|
||||
child: Text(
|
||||
message.contentText,
|
||||
style: appStyle.fonts.B_16R.apply(
|
||||
color: appStyle.colors.textPrimary,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
child: Html(
|
||||
data: message.contentHTML,
|
||||
onLinkTap: (url, map, element) => {
|
||||
if (url != null) launchUrlString(url),
|
||||
},
|
||||
style: {
|
||||
"*": Style.fromTextStyle(
|
||||
appStyle.fonts.B_16R.apply(
|
||||
color: appStyle.colors.textPrimary,
|
||||
),
|
||||
),
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user