Skip to content

Commit

Permalink
Run dartfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
tneotia committed May 10, 2021
1 parent ba17b06 commit 2cb13df
Show file tree
Hide file tree
Showing 3 changed files with 196 additions and 105 deletions.
87 changes: 60 additions & 27 deletions lib/src/widgets/toolbar_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,13 @@ class ToolbarWidgetState extends State<ToolbarWidget> {
itemHeight: widget.htmlToolbarOptions.dropdownItemHeight,
focusColor: widget.htmlToolbarOptions.dropdownFocusColor,
dropdownColor: widget.htmlToolbarOptions.dropdownBackgroundColor,
menuDirection: widget.htmlToolbarOptions.dropdownMenuDirection ??
(widget.htmlToolbarOptions.toolbarPosition == ToolbarPosition.belowEditor ? DropdownMenuDirection.up : DropdownMenuDirection.down),
menuDirection: widget.htmlToolbarOptions.dropdownMenuDirection ??
(widget.htmlToolbarOptions.toolbarPosition ==
ToolbarPosition.belowEditor
? DropdownMenuDirection.up
: DropdownMenuDirection.down),
menuMaxHeight: widget.htmlToolbarOptions.dropdownMenuMaxHeight ??
MediaQuery.of(context).size.height / 3,
MediaQuery.of(context).size.height / 3,
style: widget.htmlToolbarOptions.textStyle,
items: [
CustomDropdownMenuItem(
Expand Down Expand Up @@ -505,10 +508,15 @@ class ToolbarWidgetState extends State<ToolbarWidget> {
focusColor: widget.htmlToolbarOptions.dropdownFocusColor,
dropdownColor:
widget.htmlToolbarOptions.dropdownBackgroundColor,
menuDirection: widget.htmlToolbarOptions.dropdownMenuDirection ??
(widget.htmlToolbarOptions.toolbarPosition == ToolbarPosition.belowEditor ? DropdownMenuDirection.up : DropdownMenuDirection.down),
menuMaxHeight: widget.htmlToolbarOptions.dropdownMenuMaxHeight ??
MediaQuery.of(context).size.height / 3,
menuDirection:
widget.htmlToolbarOptions.dropdownMenuDirection ??
(widget.htmlToolbarOptions.toolbarPosition ==
ToolbarPosition.belowEditor
? DropdownMenuDirection.up
: DropdownMenuDirection.down),
menuMaxHeight:
widget.htmlToolbarOptions.dropdownMenuMaxHeight ??
MediaQuery.of(context).size.height / 3,
style: widget.htmlToolbarOptions.textStyle,
items: [
CustomDropdownMenuItem(
Expand Down Expand Up @@ -582,10 +590,15 @@ class ToolbarWidgetState extends State<ToolbarWidget> {
focusColor: widget.htmlToolbarOptions.dropdownFocusColor,
dropdownColor:
widget.htmlToolbarOptions.dropdownBackgroundColor,
menuDirection: widget.htmlToolbarOptions.dropdownMenuDirection ??
(widget.htmlToolbarOptions.toolbarPosition == ToolbarPosition.belowEditor ? DropdownMenuDirection.up : DropdownMenuDirection.down),
menuMaxHeight: widget.htmlToolbarOptions.dropdownMenuMaxHeight ??
MediaQuery.of(context).size.height / 3,
menuDirection:
widget.htmlToolbarOptions.dropdownMenuDirection ??
(widget.htmlToolbarOptions.toolbarPosition ==
ToolbarPosition.belowEditor
? DropdownMenuDirection.up
: DropdownMenuDirection.down),
menuMaxHeight:
widget.htmlToolbarOptions.dropdownMenuMaxHeight ??
MediaQuery.of(context).size.height / 3,
style: widget.htmlToolbarOptions.textStyle,
items: [
CustomDropdownMenuItem(
Expand Down Expand Up @@ -707,10 +720,15 @@ class ToolbarWidgetState extends State<ToolbarWidget> {
focusColor: widget.htmlToolbarOptions.dropdownFocusColor,
dropdownColor:
widget.htmlToolbarOptions.dropdownBackgroundColor,
menuDirection: widget.htmlToolbarOptions.dropdownMenuDirection ??
(widget.htmlToolbarOptions.toolbarPosition == ToolbarPosition.belowEditor ? DropdownMenuDirection.up : DropdownMenuDirection.down),
menuMaxHeight: widget.htmlToolbarOptions.dropdownMenuMaxHeight ??
MediaQuery.of(context).size.height / 3,
menuDirection:
widget.htmlToolbarOptions.dropdownMenuDirection ??
(widget.htmlToolbarOptions.toolbarPosition ==
ToolbarPosition.belowEditor
? DropdownMenuDirection.up
: DropdownMenuDirection.down),
menuMaxHeight:
widget.htmlToolbarOptions.dropdownMenuMaxHeight ??
MediaQuery.of(context).size.height / 3,
style: widget.htmlToolbarOptions.textStyle,
items: [
CustomDropdownMenuItem(
Expand Down Expand Up @@ -1133,10 +1151,15 @@ class ToolbarWidgetState extends State<ToolbarWidget> {
focusColor: widget.htmlToolbarOptions.dropdownFocusColor,
dropdownColor:
widget.htmlToolbarOptions.dropdownBackgroundColor,
menuDirection: widget.htmlToolbarOptions.dropdownMenuDirection ??
(widget.htmlToolbarOptions.toolbarPosition == ToolbarPosition.belowEditor ? DropdownMenuDirection.up : DropdownMenuDirection.down),
menuMaxHeight: widget.htmlToolbarOptions.dropdownMenuMaxHeight ??
MediaQuery.of(context).size.height / 3,
menuDirection:
widget.htmlToolbarOptions.dropdownMenuDirection ??
(widget.htmlToolbarOptions.toolbarPosition ==
ToolbarPosition.belowEditor
? DropdownMenuDirection.up
: DropdownMenuDirection.down),
menuMaxHeight:
widget.htmlToolbarOptions.dropdownMenuMaxHeight ??
MediaQuery.of(context).size.height / 3,
style: widget.htmlToolbarOptions.textStyle,
items: [
CustomDropdownMenuItem(
Expand Down Expand Up @@ -1350,10 +1373,15 @@ class ToolbarWidgetState extends State<ToolbarWidget> {
focusColor: widget.htmlToolbarOptions.dropdownFocusColor,
dropdownColor:
widget.htmlToolbarOptions.dropdownBackgroundColor,
menuDirection: widget.htmlToolbarOptions.dropdownMenuDirection ??
(widget.htmlToolbarOptions.toolbarPosition == ToolbarPosition.belowEditor ? DropdownMenuDirection.up : DropdownMenuDirection.down),
menuMaxHeight: widget.htmlToolbarOptions.dropdownMenuMaxHeight ??
MediaQuery.of(context).size.height / 3,
menuDirection:
widget.htmlToolbarOptions.dropdownMenuDirection ??
(widget.htmlToolbarOptions.toolbarPosition ==
ToolbarPosition.belowEditor
? DropdownMenuDirection.up
: DropdownMenuDirection.down),
menuMaxHeight:
widget.htmlToolbarOptions.dropdownMenuMaxHeight ??
MediaQuery.of(context).size.height / 3,
style: widget.htmlToolbarOptions.textStyle,
items: [
CustomDropdownMenuItem(
Expand Down Expand Up @@ -1501,10 +1529,15 @@ class ToolbarWidgetState extends State<ToolbarWidget> {
focusColor: widget.htmlToolbarOptions.dropdownFocusColor,
dropdownColor:
widget.htmlToolbarOptions.dropdownBackgroundColor,
menuDirection: widget.htmlToolbarOptions.dropdownMenuDirection ??
(widget.htmlToolbarOptions.toolbarPosition == ToolbarPosition.belowEditor ? DropdownMenuDirection.up : DropdownMenuDirection.down),
menuMaxHeight: widget.htmlToolbarOptions.dropdownMenuMaxHeight ??
MediaQuery.of(context).size.height / 3,
menuDirection:
widget.htmlToolbarOptions.dropdownMenuDirection ??
(widget.htmlToolbarOptions.toolbarPosition ==
ToolbarPosition.belowEditor
? DropdownMenuDirection.up
: DropdownMenuDirection.down),
menuMaxHeight:
widget.htmlToolbarOptions.dropdownMenuMaxHeight ??
MediaQuery.of(context).size.height / 3,
style: widget.htmlToolbarOptions.textStyle,
items: [
CustomDropdownMenuItem(
Expand Down
1 change: 1 addition & 0 deletions lib/utils/options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ class HtmlToolbarOptions {
final double dropdownItemHeight;
final Color? dropdownFocusColor;
final Color? dropdownBackgroundColor;

/// Set the menu opening direction for the dropdown. Only useful when using
/// [ToolbarPosition.custom] since the toolbar otherwise automatically
/// determines the correct direction.
Expand Down
Loading

0 comments on commit 2cb13df

Please sign in to comment.