mirror of
https://github.com/Iconica-Development/flutter_timeline.git
synced 2025-05-19 02:23:46 +02:00
feat: render html
This commit is contained in:
parent
6329ce4d61
commit
a1ceee391a
2 changed files with 23 additions and 3 deletions
|
@ -7,6 +7,7 @@ import 'dart:typed_data';
|
|||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_html/flutter_html.dart';
|
||||
import 'package:flutter_image_picker/flutter_image_picker.dart';
|
||||
import 'package:flutter_timeline_interface/flutter_timeline_interface.dart';
|
||||
import 'package:flutter_timeline_view/src/config/timeline_options.dart';
|
||||
|
@ -273,9 +274,27 @@ class _TimelinePostScreenState extends State<TimelinePostScreen> {
|
|||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
post.content,
|
||||
style: theme.textTheme.bodyMedium,
|
||||
Html(
|
||||
data: post.content,
|
||||
style: {
|
||||
'body': Style(
|
||||
padding: HtmlPaddings.zero,
|
||||
margin: Margins.zero,
|
||||
),
|
||||
'#': Style(
|
||||
maxLines: 3,
|
||||
textOverflow: TextOverflow.ellipsis,
|
||||
),
|
||||
'H1': Style(
|
||||
margin: Margins.all(0),
|
||||
),
|
||||
'H2': Style(
|
||||
margin: Margins.all(0),
|
||||
),
|
||||
'H3': Style(
|
||||
margin: Margins.all(0),
|
||||
),
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
|
|
|
@ -17,6 +17,7 @@ dependencies:
|
|||
intl: any
|
||||
cached_network_image: ^3.2.2
|
||||
dotted_border: ^2.1.0
|
||||
flutter_html: ^3.0.0-beta.2
|
||||
|
||||
flutter_timeline_interface:
|
||||
git:
|
||||
|
|
Loading…
Reference in a new issue