Open emaborsa opened 7 months ago
For test purpuses I added a customRender
as followings:
customRender: {
"td": (context, parsedChild) {
return Container(
child: Text("OK"),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.black,
width: 1,
style: BorderStyle.solid))));
}
},
The output:
Where do the spaces come from?
If I add a customRender
for tr
, it is completely ignored.
It's coming from the p tags. Seems like a bug (regression).
I tried to find a workaround, removing the styles:
customRender: {
"td": (context, parsedChild) {
if (parsedChild is ContainerSpan) {
return ContainerSpan(
newContext: context,
style: Style(),
shrinkWrap: parsedChild.shrinkWrap,
children: parsedChild.children);
}
return parsedChild;
},
"p": (context, parsedChild) {
if (parsedChild is ContainerSpan) {
return ContainerSpan(
newContext: context,
style: Style(backgroundColor: Colors.orange),
shrinkWrap: parsedChild.shrinkWrap,
children: parsedChild.children);
}
return parsedChild;
},
"span": (context, parsedChild) {
if (parsedChild is ContainerSpan) {
return ContainerSpan(
newContext: context,
style: Style(backgroundColor: Colors.yellow),
shrinkWrap: parsedChild.shrinkWrap,
children: parsedChild.children);
}
return parsedChild;
}
},
Don't understand where the spaces come from:
Flutter doctor
Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.7.10, on Microsoft Windows [Version 10.0.19044.3448], locale de-DE) [X] Windows Version (Unable to confirm if installed Windows version is 10 or greater) Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.7.4) [√] Android Studio (version 2022.1) [√] VS Code, 64-bit edition (version 1.82.2) [√] Connected device (5 available) [√] HTTP Host Availability
! Doctor found issues in 1 category.
_flutterhtml version 2.2.1
Problem: Tables are rendered with padding/margin?
Expected output
HTML sample