Skip to content

Commit 6f09ffa

Browse files
committed
Slight change to render API and README
1 parent 89f4a0b commit 6f09ffa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,8 @@ Widget html = Html(
330330
tableMatcher(): CustomRender.widget(widget: (context, child) {
331331
return SingleChildScrollView(
332332
scrollDirection: Axis.horizontal,
333-
child: (context.tree as TableLayoutElement).toWidget(context),
333+
// this calls the table CustomRender to render a table as normal (it uses a widget so we know widget is not null)
334+
child: tableRender.call().widget!.call(context, buildChildren),
334335
);
335336
}),
336337
},

lib/custom_render.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ class SelectableCustomRender extends CustomRender {
104104

105105
CustomRender blockElementRender({
106106
Style? style,
107-
Widget? child,
108-
List<InlineSpan>? children,}) =>
107+
List<InlineSpan>? children}) =>
109108
CustomRender.inlineSpan(inlineSpan: (context, buildChildren) {
110109
if (context.parser.selectable) {
111110
return TextSpan(

0 commit comments

Comments
 (0)