AwsMarkdownFloatingMenu constructor
const
AwsMarkdownFloatingMenu({
- Key? key,
- required bool useIncludedTextField,
- TextEditingController? controller,
- FocusNode? focusNode,
- bool collapsable = true,
- bool alignCollapseButtonEnd = false,
- bool flipCollapseButtonIcon = false,
- Color backgroundColor = const Color(0xFFEEEEEE),
- Color dropdownTextColor = Colors.blue,
- Color iconColor = const Color(0xFF303030),
- double iconSize = 24.0,
- BorderRadius borderRadius = const BorderRadius.all(Radius.circular(6.0)),
- double width = 60.0,
- double height = 40.0,
- double spacing = 4.0,
- double runSpacing = 4.0,
- WrapAlignment alignment = WrapAlignment.end,
- String boldCharacter = '**',
- String italicCharacter = '*',
- String codeCharacter = '```',
- String bulletedListCharacter = '-',
- String horizontalRuleCharacter = '---',
- bool hideHeading = false,
- bool hideBold = false,
- bool hideItalic = false,
- bool hideStrikethrough = false,
- bool hideLink = false,
- bool hideImage = false,
- bool hideCode = true,
- bool hideBulletedList = false,
- bool hideNumberedList = false,
- bool hideCheckbox = true,
- bool hideQuote = false,
- bool hideHorizontalRule = false,
- bool showTooltips = true,
- String headingTooltip = 'Heading',
- String boldTooltip = 'Bold',
- String italicTooltip = 'Italic',
- String strikethroughTooltip = 'Strikethrough',
- String linkTooltip = 'Link',
- String imageTooltip = 'Image',
- String codeTooltip = 'Code',
- String bulletedListTooltip = 'Bulleted list',
- String numberedListTooltip = 'Numbered list',
- String checkboxTooltip = 'Checkbox',
- String quoteTooltip = 'Quote',
- String horizontalRuleTooltip = 'Horizontal rule',
Creates a AwsMarkdownFloatingMenu widget.
The following field is necessary: useIncludedTextField (bool)
If you set useIncludedTextField to true
, you are ready to use the Widget with its included TextField.
If you set useIncludedTextField to false
, you need a TextField widget outside of
the AwsMarkdownFloatingMenu which has the same controller and focusNode set as the AwsMarkdownFloatingMenu (see below).
Remember: In this case, you have to set the controller and focusNode fields in your AwsMarkdownFloatingMenu. Hover over each field for more details on implementing your own TextField correctly.
Implementation
const AwsMarkdownFloatingMenu({
super.key,
required this.useIncludedTextField,
this.controller,
this.focusNode,
this.collapsable = true,
this.alignCollapseButtonEnd = false,
this.flipCollapseButtonIcon = false,
this.backgroundColor = const Color(0xFFEEEEEE),
this.dropdownTextColor = Colors.blue,
this.iconColor = const Color(0xFF303030),
this.iconSize = 24.0,
this.borderRadius = const BorderRadius.all(Radius.circular(6.0)),
this.width = 60.0,
this.height = 40.0,
this.spacing = 4.0,
this.runSpacing = 4.0,
this.alignment = WrapAlignment.end,
this.boldCharacter = '**',
this.italicCharacter = '*',
this.codeCharacter = '```',
this.bulletedListCharacter = '-',
this.horizontalRuleCharacter = '---',
this.hideHeading = false,
this.hideBold = false,
this.hideItalic = false,
this.hideStrikethrough = false,
this.hideLink = false,
this.hideImage = false,
this.hideCode = true,
this.hideBulletedList = false,
this.hideNumberedList = false,
this.hideCheckbox = true,
this.hideQuote = false,
this.hideHorizontalRule = false,
this.showTooltips = true,
this.headingTooltip = 'Heading',
this.boldTooltip = 'Bold',
this.italicTooltip = 'Italic',
this.strikethroughTooltip = 'Strikethrough',
this.linkTooltip = 'Link',
this.imageTooltip = 'Image',
this.codeTooltip = 'Code',
this.bulletedListTooltip = 'Bulleted list',
this.numberedListTooltip = 'Numbered list',
this.checkboxTooltip = 'Checkbox',
this.quoteTooltip = 'Quote',
this.horizontalRuleTooltip = 'Horizontal rule',
});