mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: run dart fix --apply
This commit is contained in:
@ -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)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -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,
|
||||
);
|
||||
}),
|
||||
|
Reference in New Issue
Block a user