Skip to content

Commit a2d8fe9

Browse files
committed
chore: run dart fix --apply
1 parent 94a440f commit a2d8fe9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+77
-75
lines changed

frontend/app_flowy/lib/plugins/board/application/board_bloc.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class BoardBloc extends Bloc<BoardEvent, BoardState> {
2323
final BoardDataController _gridDataController;
2424
late final AFBoardDataController boardController;
2525
final MoveRowFFIService _rowService;
26-
LinkedHashMap<String, GroupController> groupControllers = LinkedHashMap.new();
26+
LinkedHashMap<String, GroupController> groupControllers = LinkedHashMap();
2727

2828
GridFieldCache get fieldCache => _gridDataController.fieldCache;
2929
String get gridId => _gridDataController.gridId;

frontend/app_flowy/lib/plugins/board/application/board_data_controller.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ class BoardDataController {
5252
BoardDataController({required ViewPB view})
5353
: gridId = view.id,
5454
_listener = BoardListener(view.id),
55-
_blocks = LinkedHashMap.new(),
55+
// ignore: prefer_collection_literals
56+
_blocks = LinkedHashMap(),
5657
_gridFFIService = GridFFIService(gridId: view.id),
5758
fieldCache = GridFieldCache(gridId: view.id);
5859

frontend/app_flowy/lib/plugins/board/application/card/board_date_cell_bloc.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class BoardDateCellState with _$BoardDateCellState {
7979
String _dateStrFromCellData(DateCellDataPB? cellData) {
8080
String dateStr = "";
8181
if (cellData != null) {
82-
dateStr = cellData.date + " " + cellData.time;
82+
dateStr = "${cellData.date} ${cellData.time}";
8383
}
8484
return dateStr;
8585
}

frontend/app_flowy/lib/plugins/board/presentation/card/board_select_option_cell.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class _BoardSelectOptionCellState extends State<BoardSelectOptionCell> {
6565
alignment: AlignmentDirectional.center,
6666
fit: StackFit.expand,
6767
children: [
68-
Wrap(children: children, spacing: 4, runSpacing: 2),
68+
Wrap(spacing: 4, runSpacing: 2, children: children),
6969
_SelectOptionDialog(
7070
controller: widget.cellControllerBuilder.build(),
7171
),

frontend/app_flowy/lib/plugins/board/presentation/card/card_container.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class BoardCardContainer extends StatelessWidget {
2626
final accessories = accessoryBuilder!(context);
2727
if (accessories.isNotEmpty) {
2828
container = _CardEnterRegion(
29-
child: container,
3029
accessories: accessories,
30+
child: container,
3131
);
3232
}
3333
}
@@ -78,9 +78,9 @@ class CardAccessoryContainer extends StatelessWidget {
7878
),
7979
);
8080
return GestureDetector(
81-
child: hover,
8281
behavior: HitTestBehavior.opaque,
8382
onTap: () => accessory.onTap(context),
83+
child: hover,
8484
);
8585
}).toList();
8686

frontend/app_flowy/lib/plugins/doc/presentation/banner.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ class DocumentBanner extends StatelessWidget {
4040
downColor: theme.main1,
4141
outlineColor: Colors.white,
4242
borderRadius: Corners.s8Border,
43+
onPressed: onRestore,
4344
child: FlowyText.medium(
4445
LocaleKeys.deletePagePrompt_restore.tr(),
4546
color: Colors.white,
46-
fontSize: 14),
47-
onPressed: onRestore),
47+
fontSize: 14)),
4848
const HSpace(20),
4949
BaseStyledButton(
5050
minWidth: 220,
@@ -55,11 +55,11 @@ class DocumentBanner extends StatelessWidget {
5555
downColor: theme.main1,
5656
outlineColor: Colors.white,
5757
borderRadius: Corners.s8Border,
58+
onPressed: onDelete,
5859
child: FlowyText.medium(
5960
LocaleKeys.deletePagePrompt_deletePermanent.tr(),
6061
color: Colors.white,
61-
fontSize: 14),
62-
onPressed: onDelete),
62+
fontSize: 14)),
6363
],
6464
),
6565
),

frontend/app_flowy/lib/plugins/doc/presentation/toolbar/header_button.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ class _FlowyHeaderStyleButtonState extends State<FlowyHeaderStyleButton> {
3535

3636
@override
3737
Widget build(BuildContext context) {
38-
final _valueToText = <Attribute, String>{
38+
final valueToText = <Attribute, String>{
3939
Attribute.h1: 'H1',
4040
Attribute.h2: 'H2',
4141
Attribute.h3: 'H3',
4242
};
4343

44-
final _valueAttribute = <Attribute>[Attribute.h1, Attribute.h2, Attribute.h3];
45-
final _valueString = <String>['H1', 'H2', 'H3'];
46-
final _attributeImageName = <String>['editor/H1', 'editor/H2', 'editor/H3'];
44+
final valueAttribute = <Attribute>[Attribute.h1, Attribute.h2, Attribute.h3];
45+
final valueString = <String>['H1', 'H2', 'H3'];
46+
final attributeImageName = <String>['editor/H1', 'editor/H2', 'editor/H3'];
4747

4848
return Row(
4949
mainAxisSize: MainAxisSize.min,
@@ -52,18 +52,18 @@ class _FlowyHeaderStyleButtonState extends State<FlowyHeaderStyleButton> {
5252
// _valueToText[_value] == _valueString[index] ? svg('editor/H1', color: Colors.white) : svg('editor/H1');
5353

5454
final headerTitle = "${LocaleKeys.toolbar_header.tr()} ${index + 1}";
55-
final _isToggled = _valueToText[_value] == _valueString[index];
55+
final isToggled = valueToText[_value] == valueString[index];
5656
return ToolbarIconButton(
5757
onPressed: () {
58-
if (_isToggled) {
58+
if (isToggled) {
5959
widget.controller.formatSelection(Attribute.header);
6060
} else {
61-
widget.controller.formatSelection(_valueAttribute[index]);
61+
widget.controller.formatSelection(valueAttribute[index]);
6262
}
6363
},
6464
width: widget.iconSize * kIconButtonFactor,
65-
iconName: _attributeImageName[index],
66-
isToggled: _isToggled,
65+
iconName: attributeImageName[index],
66+
isToggled: isToggled,
6767
tooltipText: headerTitle,
6868
);
6969
}),

frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_service.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ class GridCellIdentifier with _$GridCellIdentifier {
7171
FieldType get fieldType => field.fieldType;
7272

7373
ValueKey key() {
74-
return ValueKey(rowId + fieldId + "${field.fieldType}");
74+
return ValueKey("$rowId$fieldId${field.fieldType}");
7575
}
7676
}

frontend/app_flowy/lib/plugins/grid/application/cell/date_cal_bloc.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@ class DateCalBloc extends Bloc<DateCalEvent, DateCalState> {
119119
}
120120

121121
String timeFormatPrompt(FlowyError error) {
122-
String msg = LocaleKeys.grid_field_invalidTimeFormat.tr() + ". ";
122+
String msg = "${LocaleKeys.grid_field_invalidTimeFormat.tr()}. ";
123123
switch (state.dateTypeOptionPB.timeFormat) {
124124
case TimeFormat.TwelveHour:
125-
msg = msg + "e.g. 01: 00 AM";
125+
msg = "${msg}e.g. 01: 00 AM";
126126
break;
127127
case TimeFormat.TwentyFourHour:
128-
msg = msg + "e.g. 13: 00";
128+
msg = "${msg}e.g. 13: 00";
129129
break;
130130
default:
131131
break;

frontend/app_flowy/lib/plugins/grid/application/cell/date_cell_bloc.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class DateCellState with _$DateCellState {
7979
String _dateStrFromCellData(DateCellDataPB? cellData) {
8080
String dateStr = "";
8181
if (cellData != null) {
82-
dateStr = cellData.date + " " + cellData.time;
82+
dateStr = "${cellData.date} ${cellData.time}";
8383
}
8484
return dateStr;
8585
}

0 commit comments

Comments
 (0)