Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulletpoint size admustment #142

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion lib/rich_text_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,16 @@ class BlockText extends StatelessWidget {
final EdgeInsets padding;
final EdgeInsets margin;
final Decoration decoration;
final TextStyle leadingCharStyle;
final bool shrinkToFit;

BlockText({
@required this.child,
@required this.shrinkToFit,
this.padding,
this.margin,
this.leadingChar = '',
this.leadingCharStyle,
this.decoration,
});

Expand All @@ -101,7 +104,13 @@ class BlockText extends StatelessWidget {
padding: this.padding,
margin: this.margin,
decoration: this.decoration,
child: child,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
leadingChar.isNotEmpty ? Text(leadingChar, style: leadingCharStyle,) : Container(),
Expanded(child: child),
],
),
);
}
}
Expand Down Expand Up @@ -864,6 +873,8 @@ class HtmlRichTextParser extends StatelessWidget {
],
),
),
leadingCharStyle: nextContext.childStyle,
leadingChar: '$leadingChar ',
);
parseContext.rootWidgetList.add(blockText);
nextContext.parentElement = blockText.child.text;
Expand Down