format code

pull/463/head
li3317 3 years ago
parent 733c9bd1b0
commit 2db1cc931b
  1. 17
      lib/src/widgets/toolbar/select_alignment_button.dart

@ -50,10 +50,14 @@ class _SelectAlignmentButtonState extends State<SelectAlignmentButton> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final _valueToText = <Attribute, String>{ final _valueToText = <Attribute, String>{
if (widget.showLeftAlignment!) Attribute.leftAlignment: Attribute.leftAlignment.value!, if (widget.showLeftAlignment!)
if (widget.showCenterAlignment!) Attribute.centerAlignment: Attribute.centerAlignment.value!, Attribute.leftAlignment: Attribute.leftAlignment.value!,
if (widget.showRightAlignment!) Attribute.rightAlignment: Attribute.rightAlignment.value!, if (widget.showCenterAlignment!)
if (widget.showJustifyAlignment!) Attribute.justifyAlignment: Attribute.justifyAlignment.value!, Attribute.centerAlignment: Attribute.centerAlignment.value!,
if (widget.showRightAlignment!)
Attribute.rightAlignment: Attribute.rightAlignment.value!,
if (widget.showJustifyAlignment!)
Attribute.justifyAlignment: Attribute.justifyAlignment.value!,
}; };
final _valueAttribute = <Attribute>[ final _valueAttribute = <Attribute>[
@ -71,7 +75,10 @@ class _SelectAlignmentButtonState extends State<SelectAlignmentButton> {
final theme = Theme.of(context); final theme = Theme.of(context);
final buttonCount = ((widget.showLeftAlignment!) ? 1 : 0) + ((widget.showCenterAlignment!) ? 1 : 0) + ((widget.showRightAlignment!) ? 1 : 0) + ((widget.showJustifyAlignment!) ? 1 : 0); final buttonCount = ((widget.showLeftAlignment!) ? 1 : 0) +
((widget.showCenterAlignment!) ? 1 : 0) +
((widget.showRightAlignment!) ? 1 : 0) +
((widget.showJustifyAlignment!) ? 1 : 0);
return Row( return Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

Loading…
Cancel
Save