@@ -2,7 +2,6 @@ import 'package:collection/collection.dart';
2
2
import 'package:flutter/gestures.dart' ;
3
3
import 'package:flutter/material.dart' ;
4
4
import 'package:flutter_html/flutter_html.dart' ;
5
- import 'package:flutter_html/html_parser.dart' ;
6
5
import 'package:flutter_html/src/utils.dart' ;
7
6
8
7
typedef CustomRenderMatcher = bool Function (RenderContext context);
@@ -133,7 +132,7 @@ CustomRender listElementRender({
133
132
children: [
134
133
(style? .listStylePosition ?? context.tree.style.listStylePosition) == ListStylePosition .OUTSIDE ?
135
134
Padding (
136
- padding: style? .padding ?? context.tree.style.padding
135
+ padding: style? .padding? .nonNegative ?? context.tree.style.padding? .nonNegative
137
136
?? EdgeInsets .only (left: (style? .direction ?? context.tree.style.direction) != TextDirection .rtl ? 10.0 : 0.0 ,
138
137
right: (style? .direction ?? context.tree.style.direction) == TextDirection .rtl ? 10.0 : 0.0 ),
139
138
child: Text (
@@ -142,7 +141,7 @@ CustomRender listElementRender({
142
141
style: style? .generateTextStyle () ?? context.style.generateTextStyle ()
143
142
),
144
143
) : Container (height: 0 , width: 0 ),
145
- Text ("\t " , textAlign: TextAlign .right),
144
+ Text ("\t " , textAlign: TextAlign .right, style : TextStyle (fontWeight : FontWeight .w400) ),
146
145
Expanded (
147
146
child: Padding (
148
147
padding: (style? .listStylePosition ?? context.tree.style.listStylePosition) == ListStylePosition .INSIDE ?
@@ -176,7 +175,7 @@ CustomRender replacedElementRender({PlaceholderAlignment? alignment, TextBaselin
176
175
177
176
CustomRender textContentElementRender ({String ? text}) =>
178
177
CustomRender .inlineSpan (inlineSpan: (context, buildChildren) =>
179
- TextSpan (text: text ?? (context.tree as TextContentElement ).text));
178
+ TextSpan (text: ( text ?? (context.tree as TextContentElement ).text). transformed (context.tree.style.textTransform) ));
180
179
181
180
CustomRender interactableElementRender ({List <InlineSpan >? children}) =>
182
181
CustomRender .inlineSpan (inlineSpan: (context, buildChildren) => TextSpan (
@@ -238,9 +237,11 @@ final Map<CustomRenderMatcher, CustomRender> defaultRenders = {
238
237
};
239
238
240
239
List <InlineSpan > _getListElementChildren (ListStylePosition ? position, Function () buildChildren) {
241
- InlineSpan tabSpan = WidgetSpan (child: Text ("\t " , textAlign: TextAlign .right));
242
240
List <InlineSpan > children = buildChildren.call ();
243
241
if (position == ListStylePosition .INSIDE ) {
242
+ final tabSpan = WidgetSpan (
243
+ child: Text ("\t " , textAlign: TextAlign .right, style: TextStyle (fontWeight: FontWeight .w400)),
244
+ );
244
245
children.insert (0 , tabSpan);
245
246
}
246
247
return children;
0 commit comments