From 12dea89cd4b477c04ebe9a725a156cb7e9549d5d Mon Sep 17 00:00:00 2001 From: balint1414 Date: Fri, 17 Oct 2025 20:37:28 +0200 Subject: [PATCH] =?UTF-8?q?HTML=20h=C3=A1zin=C3=A1l?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/helpers/ui/common_bottom_sheets.dart | 35 ++++++++++++------- firka/pubspec.yaml | 1 + 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/firka/lib/helpers/ui/common_bottom_sheets.dart b/firka/lib/helpers/ui/common_bottom_sheets.dart index f18c969..c678a7d 100644 --- a/firka/lib/helpers/ui/common_bottom_sheets.dart +++ b/firka/lib/helpers/ui/common_bottom_sheets.dart @@ -7,6 +7,7 @@ import 'package:firka/helpers/extensions.dart'; import 'package:firka/helpers/settings.dart'; import 'package:firka/ui/widget/firka_icon.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_svg/svg.dart'; import 'package:majesticons_flutter/majesticons_flutter.dart'; import 'package:intl/intl.dart'; @@ -744,20 +745,28 @@ Future showHomeworkBottomSheet( Padding( padding: const EdgeInsets.all(4), child: Container( - width: double.infinity, - decoration: BoxDecoration( - color: appStyle.colors.card, - borderRadius: - BorderRadius.all(Radius.circular(16))), - child: Padding( - padding: const EdgeInsets.all(12), - child: Text( - homework.description, - style: appStyle.fonts.B_16R.apply( - color: appStyle.colors.textPrimary), - textAlign: TextAlign.start, + width: double.infinity, + decoration: BoxDecoration( + color: appStyle.colors.card, + borderRadius: const BorderRadius.all(Radius.circular(16)), + ), + child: Padding( + padding: const EdgeInsets.all(12), + child: Html( + data: homework.description, + style: { + "*": Style( + color: appStyle.colors.textPrimary, + fontSize: FontSize(16), + fontFamily: appStyle.fonts.B_16R.fontFamily, + fontWeight: FontWeight.w900, + margin: Margins.zero, + padding: HtmlPaddings.zero, + textAlign: TextAlign.start, + ), + }, + ), ), - ), ), ), FutureBuilder( diff --git a/firka/pubspec.yaml b/firka/pubspec.yaml index 5ce7cdb..5d13a97 100644 --- a/firka/pubspec.yaml +++ b/firka/pubspec.yaml @@ -48,6 +48,7 @@ dependencies: flutter_dotenv: ^5.2.1 xml: ^6.6.1 confetti: ^0.8.0 + flutter_html: ^3.0.0 dev_dependencies: flutter_test: