chore: run dart fix --apply

This commit is contained in:
appflowy
2022-08-31 09:19:31 +08:00
parent 94a440f773
commit a2d8fe9e80
43 changed files with 77 additions and 75 deletions

View File

@ -40,11 +40,11 @@ class DocumentBanner extends StatelessWidget {
downColor: theme.main1,
outlineColor: Colors.white,
borderRadius: Corners.s8Border,
onPressed: onRestore,
child: FlowyText.medium(
LocaleKeys.deletePagePrompt_restore.tr(),
color: Colors.white,
fontSize: 14),
onPressed: onRestore),
fontSize: 14)),
const HSpace(20),
BaseStyledButton(
minWidth: 220,
@ -55,11 +55,11 @@ class DocumentBanner extends StatelessWidget {
downColor: theme.main1,
outlineColor: Colors.white,
borderRadius: Corners.s8Border,
onPressed: onDelete,
child: FlowyText.medium(
LocaleKeys.deletePagePrompt_deletePermanent.tr(),
color: Colors.white,
fontSize: 14),
onPressed: onDelete),
fontSize: 14)),
],
),
),

View File

@ -35,15 +35,15 @@ class _FlowyHeaderStyleButtonState extends State<FlowyHeaderStyleButton> {
@override
Widget build(BuildContext context) {
final _valueToText = <Attribute, String>{
final valueToText = <Attribute, String>{
Attribute.h1: 'H1',
Attribute.h2: 'H2',
Attribute.h3: 'H3',
};
final _valueAttribute = <Attribute>[Attribute.h1, Attribute.h2, Attribute.h3];
final _valueString = <String>['H1', 'H2', 'H3'];
final _attributeImageName = <String>['editor/H1', 'editor/H2', 'editor/H3'];
final valueAttribute = <Attribute>[Attribute.h1, Attribute.h2, Attribute.h3];
final valueString = <String>['H1', 'H2', 'H3'];
final attributeImageName = <String>['editor/H1', 'editor/H2', 'editor/H3'];
return Row(
mainAxisSize: MainAxisSize.min,
@ -52,18 +52,18 @@ class _FlowyHeaderStyleButtonState extends State<FlowyHeaderStyleButton> {
// _valueToText[_value] == _valueString[index] ? svg('editor/H1', color: Colors.white) : svg('editor/H1');
final headerTitle = "${LocaleKeys.toolbar_header.tr()} ${index + 1}";
final _isToggled = _valueToText[_value] == _valueString[index];
final isToggled = valueToText[_value] == valueString[index];
return ToolbarIconButton(
onPressed: () {
if (_isToggled) {
if (isToggled) {
widget.controller.formatSelection(Attribute.header);
} else {
widget.controller.formatSelection(_valueAttribute[index]);
widget.controller.formatSelection(valueAttribute[index]);
}
},
width: widget.iconSize * kIconButtonFactor,
iconName: _attributeImageName[index],
isToggled: _isToggled,
iconName: attributeImageName[index],
isToggled: isToggled,
tooltipText: headerTitle,
);
}),