-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: flutter_markdownflutter/packages flutter_markdownflutter/packages flutter_markdownpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
Description
Use case
When rendering Markdown, it's common practice (as GitHub does) to change the style of nested ordered list.
- first
- second
- first
- first
- second
- first
- second
- first
raw:
1. first
2. second
1. first
1. first
2. second
1. first
1. second
However, flutter_markdown does not support it, so different styles cannot be applied at each level of nesting.
Proposal
If the bulletBuilder property is passed the nesting level as a parameter, it should be possible to customize the widget on the application side.
Example:
bulletBuilder: (int index, BulletStyle style, int nestLevel) => switch (style) {
BulletStyle.unorderedList => const Text('・'),
BulletStyle.orderedList => Text('${index + 1}-$nestLevel.'),
}I followed the process from the Markdown widget, and since the nesting level is already managed internally.
So I think it can be implemented and gonna create some Pull request.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: flutter_markdownflutter/packages flutter_markdownflutter/packages flutter_markdownpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team