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