Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: run dart fix --apply

appflowya2d8fe9e80c1
diff --git a/frontend/app_flowy/lib/plugins/board/application/board_bloc.dart b/frontend/app_flowy/lib/plugins/board/application/board_bloc.dart
index 53038c8d42..a71480c710 100644
--- a/frontend/app_flowy/lib/plugins/board/application/board_bloc.dart
+++ b/frontend/app_flowy/lib/plugins/board/application/board_bloc.dart
@@ -23,7 +23,7 @@ class BoardBloc extends Bloc<BoardEvent, BoardState> {
final BoardDataController _gridDataController;
late final AFBoardDataController boardController;
final MoveRowFFIService _rowService;
- LinkedHashMap<String, GroupController> groupControllers = LinkedHashMap.new();
+ LinkedHashMap<String, GroupController> groupControllers = LinkedHashMap();
GridFieldCache get fieldCache => _gridDataController.fieldCache;
String get gridId => _gridDataController.gridId;
diff --git a/frontend/app_flowy/lib/plugins/board/application/board_data_controller.dart b/frontend/app_flowy/lib/plugins/board/application/board_data_controller.dart
index 79f53093f1..2f9bdc24e0 100644
--- a/frontend/app_flowy/lib/plugins/board/application/board_data_controller.dart
+++ b/frontend/app_flowy/lib/plugins/board/application/board_data_controller.dart
@@ -52,7 +52,8 @@ class BoardDataController {
BoardDataController({required ViewPB view})
: gridId = view.id,
_listener = BoardListener(view.id),
- _blocks = LinkedHashMap.new(),
+ // ignore: prefer_collection_literals
+ _blocks = LinkedHashMap(),
_gridFFIService = GridFFIService(gridId: view.id),
fieldCache = GridFieldCache(gridId: view.id);
diff --git a/frontend/app_flowy/lib/plugins/board/application/card/board_date_cell_bloc.dart b/frontend/app_flowy/lib/plugins/board/application/card/board_date_cell_bloc.dart
index 76267ededb..b1110f45cc 100644
--- a/frontend/app_flowy/lib/plugins/board/application/card/board_date_cell_bloc.dart
+++ b/frontend/app_flowy/lib/plugins/board/application/card/board_date_cell_bloc.dart
@@ -79,7 +79,7 @@ class BoardDateCellState with _$BoardDateCellState {
String _dateStrFromCellData(DateCellDataPB? cellData) {
String dateStr = "";
if (cellData != null) {
- dateStr = cellData.date + " " + cellData.time;
+ dateStr = "${cellData.date} ${cellData.time}";
}
return dateStr;
}
diff --git a/frontend/app_flowy/lib/plugins/board/presentation/card/board_select_option_cell.dart b/frontend/app_flowy/lib/plugins/board/presentation/card/board_select_option_cell.dart
index 173f569f07..fb1cc15de6 100644
--- a/frontend/app_flowy/lib/plugins/board/presentation/card/board_select_option_cell.dart
+++ b/frontend/app_flowy/lib/plugins/board/presentation/card/board_select_option_cell.dart
@@ -65,7 +65,7 @@ class _BoardSelectOptionCellState extends State<BoardSelectOptionCell> {
alignment: AlignmentDirectional.center,
fit: StackFit.expand,
children: [
- Wrap(children: children, spacing: 4, runSpacing: 2),
+ Wrap(spacing: 4, runSpacing: 2, children: children),
_SelectOptionDialog(
controller: widget.cellControllerBuilder.build(),
),
diff --git a/frontend/app_flowy/lib/plugins/board/presentation/card/card_container.dart b/frontend/app_flowy/lib/plugins/board/presentation/card/card_container.dart
index e3660d68f3..d28e6712c9 100644
--- a/frontend/app_flowy/lib/plugins/board/presentation/card/card_container.dart
+++ b/frontend/app_flowy/lib/plugins/board/presentation/card/card_container.dart
@@ -26,8 +26,8 @@ class BoardCardContainer extends StatelessWidget {
final accessories = accessoryBuilder!(context);
if (accessories.isNotEmpty) {
container = _CardEnterRegion(
- child: container,
accessories: accessories,
+ child: container,
);
}
}
@@ -78,9 +78,9 @@ class CardAccessoryContainer extends StatelessWidget {
),
);
return GestureDetector(
- child: hover,
behavior: HitTestBehavior.opaque,
onTap: () => accessory.onTap(context),
+ child: hover,
);
}).toList();
diff --git a/frontend/app_flowy/lib/plugins/doc/presentation/banner.dart b/frontend/app_flowy/lib/plugins/doc/presentation/banner.dart
index bd4b651da8..66c1f6dfba 100644
--- a/frontend/app_flowy/lib/plugins/doc/presentation/banner.dart
+++ b/frontend/app_flowy/lib/plugins/doc/presentation/banner.dart
@@ -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)),
],
),
),
diff --git a/frontend/app_flowy/lib/plugins/doc/presentation/toolbar/header_button.dart b/frontend/app_flowy/lib/plugins/doc/presentation/toolbar/header_button.dart
index 427c5cf559..2da700df47 100644
--- a/frontend/app_flowy/lib/plugins/doc/presentation/toolbar/header_button.dart
+++ b/frontend/app_flowy/lib/plugins/doc/presentation/toolbar/header_button.dart
@@ -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,
);
}),
diff --git a/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_service.dart b/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_service.dart
index bb750b4b89..48e82cc906 100644
--- a/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_service.dart
+++ b/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/cell_service.dart
@@ -71,6 +71,6 @@ class GridCellIdentifier with _$GridCellIdentifier {
FieldType get fieldType => field.fieldType;
ValueKey key() {
- return ValueKey(rowId + fieldId + "${field.fieldType}");
+ return ValueKey("$rowId$fieldId${field.fieldType}");
}
}
diff --git a/frontend/app_flowy/lib/plugins/grid/application/cell/date_cal_bloc.dart b/frontend/app_flowy/lib/plugins/grid/application/cell/date_cal_bloc.dart
index c0584a084b..a7124b7a3d 100644
--- a/frontend/app_flowy/lib/plugins/grid/application/cell/date_cal_bloc.dart
+++ b/frontend/app_flowy/lib/plugins/grid/application/cell/date_cal_bloc.dart
@@ -119,13 +119,13 @@ class DateCalBloc extends Bloc<DateCalEvent, DateCalState> {
}
String timeFormatPrompt(FlowyError error) {
- String msg = LocaleKeys.grid_field_invalidTimeFormat.tr() + ". ";
+ String msg = "${LocaleKeys.grid_field_invalidTimeFormat.tr()}. ";
switch (state.dateTypeOptionPB.timeFormat) {
case TimeFormat.TwelveHour:
- msg = msg + "e.g. 01: 00 AM";
+ msg = "${msg}e.g. 01: 00 AM";
break;
case TimeFormat.TwentyFourHour:
- msg = msg + "e.g. 13: 00";
+ msg = "${msg}e.g. 13: 00";
break;
default:
break;
diff --git a/frontend/app_flowy/lib/plugins/grid/application/cell/date_cell_bloc.dart b/frontend/app_flowy/lib/plugins/grid/application/cell/date_cell_bloc.dart
index 4150093275..4d453eca25 100644
--- a/frontend/app_flowy/lib/plugins/grid/application/cell/date_cell_bloc.dart
+++ b/frontend/app_flowy/lib/plugins/grid/application/cell/date_cell_bloc.dart
@@ -79,7 +79,7 @@ class DateCellState with _$DateCellState {
String _dateStrFromCellData(DateCellDataPB? cellData) {
String dateStr = "";
if (cellData != null) {
- dateStr = cellData.date + " " + cellData.time;
+ dateStr = "${cellData.date} ${cellData.time}";
}
return dateStr;
}
diff --git a/frontend/app_flowy/lib/plugins/grid/application/grid_data_controller.dart b/frontend/app_flowy/lib/plugins/grid/application/grid_data_controller.dart
index f11db25167..55733b9b7b 100644
--- a/frontend/app_flowy/lib/plugins/grid/application/grid_data_controller.dart
+++ b/frontend/app_flowy/lib/plugins/grid/application/grid_data_controller.dart
@@ -46,7 +46,8 @@ class GridDataController {
GridDataController({required ViewPB view})
: gridId = view.id,
- _blocks = LinkedHashMap.new(),
+ // ignore: prefer_collection_literals
+ _blocks = LinkedHashMap(),
_gridFFIService = GridFFIService(gridId: view.id),
fieldCache = GridFieldCache(gridId: view.id);
diff --git a/frontend/app_flowy/lib/plugins/grid/application/row/row_cache.dart b/frontend/app_flowy/lib/plugins/grid/application/row/row_cache.dart
index d6cd387e74..618d73cbc1 100644
--- a/frontend/app_flowy/lib/plugins/grid/application/row/row_cache.dart
+++ b/frontend/app_flowy/lib/plugins/grid/application/row/row_cache.dart
@@ -210,7 +210,8 @@ class GridRowCache {
}
GridCellMap _makeGridCells(String rowId, RowPB? row) {
- var cellDataMap = GridCellMap.new();
+ // ignore: prefer_collection_literals
+ var cellDataMap = GridCellMap();
for (final field in _fieldNotifier.fields) {
if (field.visibility) {
cellDataMap[field.id] = GridCellIdentifier(
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/cell_accessory.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/cell_accessory.dart
index 9b3f281130..8a88316473 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/cell_accessory.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/cell_accessory.dart
@@ -190,12 +190,12 @@ class CellAccessoryContainer extends StatelessWidget {
),
);
return GestureDetector(
- child: hover,
behavior: HitTestBehavior.opaque,
onTap: () => accessory.onTap(),
+ child: hover,
);
}).toList();
- return Wrap(children: children, spacing: 6);
+ return Wrap(spacing: 6, children: children);
}
}
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/cell_container.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/cell_container.dart
index ed09ec3f36..eea58775dd 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/cell_container.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/cell_container.dart
@@ -44,8 +44,8 @@ class CellContainer extends StatelessWidget {
if (accessories.isNotEmpty) {
container = _GridCellEnterRegion(
- child: container,
accessories: accessories,
+ child: container,
);
}
}
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/date_cell/date_editor.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/date_cell/date_editor.dart
index f6ddf42fba..d1289b93f2 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/date_cell/date_editor.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/date_cell/date_editor.dart
@@ -48,8 +48,8 @@ class DateCellEditor with FlowyOverlayDelegate {
FlowyOverlay.of(context).insertWithAnchor(
widget: OverlayContainer(
- child: calendar,
constraints: BoxConstraints.loose(const Size(320, 500)),
+ child: calendar,
),
identifier: DateCellEditor.identifier(),
anchorContext: context,
@@ -304,9 +304,7 @@ class _DateTypeOptionButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = context.watch<AppTheme>();
- final title = LocaleKeys.grid_field_dateFormat.tr() +
- " &" +
- LocaleKeys.grid_field_timeFormat.tr();
+ final title = "${LocaleKeys.grid_field_dateFormat.tr()} &${LocaleKeys.grid_field_timeFormat.tr()}";
return BlocSelector<DateCalBloc, DateCalState, DateTypeOptionPB>(
selector: (state) => state.dateTypeOptionPB,
builder: (context, dateTypeOptionPB) {
@@ -349,8 +347,8 @@ class _CalDateTimeSetting extends StatefulWidget {
hide(context);
FlowyOverlay.of(context).insertWithAnchor(
widget: OverlayContainer(
- child: this,
constraints: BoxConstraints.loose(const Size(140, 100)),
+ child: this,
),
identifier: _CalDateTimeSetting.identifier(),
anchorContext: context,
@@ -415,8 +413,8 @@ class _CalDateTimeSettingState extends State<_CalDateTimeSetting> {
overlayIdentifier = child.toString();
FlowyOverlay.of(context).insertWithAnchor(
widget: OverlayContainer(
- child: child,
constraints: BoxConstraints.loose(const Size(460, 440)),
+ child: child,
),
identifier: overlayIdentifier!,
anchorContext: context,
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_cell.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_cell.dart
index a8d3993a2f..c771586e70 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_cell.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_cell.dart
@@ -163,14 +163,14 @@ class SelectOptionWrap extends StatelessWidget {
child = Align(
alignment: Alignment.centerLeft,
child: Wrap(
+ spacing: 4,
+ runSpacing: 2,
children: selectOptions
.map((option) => SelectOptionTag.fromOption(
context: context,
option: option,
))
.toList(),
- spacing: 4,
- runSpacing: 2,
),
);
}
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_editor.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_editor.dart
index c07eef5617..ef0dab83c9 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_editor.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_editor.dart
@@ -72,8 +72,8 @@ class SelectOptionCellEditor extends StatelessWidget with FlowyOverlayDelegate {
//
FlowyOverlay.of(context).insertWithAnchor(
widget: OverlayContainer(
- child: SizedBox(width: _editorPannelWidth, child: editor),
constraints: BoxConstraints.loose(const Size(_editorPannelWidth, 300)),
+ child: SizedBox(width: _editorPannelWidth, child: editor),
),
identifier: SelectOptionCellEditor.identifier(),
anchorContext: context,
@@ -289,8 +289,8 @@ class _SelectOptionCell extends StatelessWidget {
FlowyOverlay.of(context).remove(overlayIdentifier);
FlowyOverlay.of(context).insertWithAnchor(
widget: OverlayContainer(
- child: pannel,
constraints: BoxConstraints.loose(const Size(200, 300)),
+ child: pannel,
),
identifier: overlayIdentifier,
anchorContext: context,
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/text_field.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/text_field.dart
index 5482a403cc..022d411f2b 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/text_field.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/text_field.dart
@@ -108,7 +108,7 @@ class SelectOptionTextField extends StatelessWidget {
child: SingleChildScrollView(
controller: sc,
scrollDirection: Axis.horizontal,
- child: Wrap(children: children, spacing: 4),
+ child: Wrap(spacing: 4, children: children),
),
);
}
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/url_cell/cell_editor.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/url_cell/cell_editor.dart
index e68ac720a3..b9e0f1ef48 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/url_cell/cell_editor.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/url_cell/cell_editor.dart
@@ -30,11 +30,11 @@ class URLCellEditor extends StatefulWidget with FlowyOverlayDelegate {
//
FlowyOverlay.of(context).insertWithAnchor(
widget: OverlayContainer(
+ constraints: BoxConstraints.loose(const Size(300, 160)),
child: SizedBox(
width: 200,
child: Padding(padding: const EdgeInsets.all(6), child: editor),
),
- constraints: BoxConstraints.loose(const Size(300, 160)),
),
identifier: URLCellEditor.identifier(),
anchorContext: context,
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_cell_action_sheet.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_cell_action_sheet.dart
index cd884cd557..9ea8b56b77 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_cell_action_sheet.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_cell_action_sheet.dart
@@ -24,8 +24,8 @@ class GridFieldCellActionSheet extends StatelessWidget
void show(BuildContext overlayContext) {
FlowyOverlay.of(overlayContext).insertWithAnchor(
widget: OverlayContainer(
- child: this,
constraints: BoxConstraints.loose(const Size(240, 200)),
+ child: this,
),
identifier: GridFieldCellActionSheet.identifier(),
anchorContext: overlayContext,
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_editor.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_editor.dart
index efa70bb81a..3f497d3304 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_editor.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_editor.dart
@@ -56,8 +56,8 @@ class FieldEditor extends StatelessWidget with FlowyOverlayDelegate {
FlowyOverlay.of(context).remove(identifier());
FlowyOverlay.of(context).insertWithAnchor(
widget: OverlayContainer(
- child: this,
constraints: BoxConstraints.loose(const Size(280, 400)),
+ child: this,
),
identifier: identifier(),
anchorContext: context,
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_type_option_editor.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_type_option_editor.dart
index 20440235cb..d9e5eb4f38 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_type_option_editor.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_type_option_editor.dart
@@ -110,8 +110,8 @@ class _FieldTypeOptionEditorState extends State<FieldTypeOptionEditor> {
currentOverlayIdentifier = identifier;
FlowyOverlay.of(context).insertWithAnchor(
widget: OverlayContainer(
- child: child,
constraints: BoxConstraints.loose(const Size(460, 440)),
+ child: child,
),
identifier: identifier,
anchorContext: context,
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/grid_row.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/grid_row.dart
index d560f03fc0..55ec7b9832 100755
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/grid_row.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/grid_row.dart
@@ -190,7 +190,6 @@ class RowContent extends StatelessWidget {
return CellContainer(
width: cellId.field.width.toDouble(),
- child: child,
rowStateNotifier:
Provider.of<RegionStateNotifier>(context, listen: false),
accessoryBuilder: (buildContext) {
@@ -208,6 +207,7 @@ class RowContent extends StatelessWidget {
}
return accessories;
},
+ child: child,
);
},
).toList();
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/row_action_sheet.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/row_action_sheet.dart
index b4390d098f..8c828ec627 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/row_action_sheet.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/row_action_sheet.dart
@@ -59,8 +59,8 @@ class GridRowActionSheet extends StatelessWidget {
}) {
FlowyOverlay.of(overlayContext).insertWithAnchor(
widget: OverlayContainer(
- child: this,
constraints: BoxConstraints.loose(const Size(140, 200)),
+ child: this,
),
identifier: GridRowActionSheet.identifier(),
anchorContext: overlayContext,
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/row_detail.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/row_detail.dart
index d1ea79b6d1..7d07e9fa3f 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/row_detail.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/row/row_detail.dart
@@ -38,8 +38,8 @@ class RowDetailPage extends StatefulWidget with FlowyOverlayDelegate {
final size = windowSize * 0.5;
FlowyOverlay.of(context).insertWithRect(
widget: OverlayContainer(
- child: this,
constraints: BoxConstraints.tight(size),
+ child: this,
),
identifier: RowDetailPage.identifier(),
anchorPosition: Offset(-size.width / 2.0, -size.height / 2.0),
@@ -156,9 +156,9 @@ class _RowDetailCell extends StatelessWidget {
behavior: HitTestBehavior.translucent,
onTap: () => cell.beginFocus.notify(),
child: AccessoryHover(
- child: cell,
contentPadding:
const EdgeInsets.symmetric(horizontal: 10, vertical: 12),
+ child: cell,
),
);
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/toolbar/grid_property.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/toolbar/grid_property.dart
index 02230e5139..08ba3dcd08 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/toolbar/grid_property.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/toolbar/grid_property.dart
@@ -30,8 +30,8 @@ class GridPropertyList extends StatelessWidget with FlowyOverlayDelegate {
void show(BuildContext context) {
FlowyOverlay.of(context).insertWithAnchor(
widget: OverlayContainer(
- child: this,
constraints: BoxConstraints.loose(const Size(260, 400)),
+ child: this,
),
identifier: identifier(),
anchorContext: context,
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/toolbar/grid_setting.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/toolbar/grid_setting.dart
index f555b6266a..289d84141f 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/toolbar/grid_setting.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/toolbar/grid_setting.dart
@@ -53,8 +53,8 @@ class GridSettingList extends StatelessWidget {
FlowyOverlay.of(context).insertWithAnchor(
widget: OverlayContainer(
- child: list,
constraints: BoxConstraints.loose(const Size(140, 400)),
+ child: list,
),
identifier: list.identifier(),
anchorContext: context,
diff --git a/frontend/app_flowy/lib/plugins/trash/trash.dart b/frontend/app_flowy/lib/plugins/trash/trash.dart
index 0d17091581..c1622d5b20 100644
--- a/frontend/app_flowy/lib/plugins/trash/trash.dart
+++ b/frontend/app_flowy/lib/plugins/trash/trash.dart
@@ -91,12 +91,12 @@ class _TrashPageState extends State<TrashPage> {
builder: (context, state) {
return SizedBox.expand(
child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
children: [
_renderTopBar(context, theme, state),
const VSpace(32),
_renderTrashList(context, state),
],
- mainAxisAlignment: MainAxisAlignment.start,
).padding(horizontal: horizontalPadding, vertical: 48),
);
},
diff --git a/frontend/app_flowy/lib/startup/tasks/app_widget.dart b/frontend/app_flowy/lib/startup/tasks/app_widget.dart
index 6dae04a1c0..fede2e0fdb 100644
--- a/frontend/app_flowy/lib/startup/tasks/app_widget.dart
+++ b/frontend/app_flowy/lib/startup/tasks/app_widget.dart
@@ -20,8 +20,8 @@ class InitAppWidgetTask extends LaunchTask {
final setting = await UserSettingsService().getAppearanceSettings();
final settingModel = AppearanceSettingModel(setting);
final app = ApplicationWidget(
- child: widget,
settingModel: settingModel,
+ child: widget,
);
BlocOverrides.runZoned(
() {
diff --git a/frontend/app_flowy/lib/user/presentation/sign_in_screen.dart b/frontend/app_flowy/lib/user/presentation/sign_in_screen.dart
index ee3600e782..6f17404474 100644
--- a/frontend/app_flowy/lib/user/presentation/sign_in_screen.dart
+++ b/frontend/app_flowy/lib/user/presentation/sign_in_screen.dart
@@ -94,6 +94,7 @@ class SignUpPrompt extends StatelessWidget {
Widget build(BuildContext context) {
final theme = context.watch<AppTheme>();
return Row(
+ mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(LocaleKeys.signIn_dontHaveAnAccount.tr(), style: TextStyle(color: theme.shader3, fontSize: 12)),
TextButton(
@@ -107,7 +108,6 @@ class SignUpPrompt extends StatelessWidget {
),
),
],
- mainAxisAlignment: MainAxisAlignment.center,
);
}
}
diff --git a/frontend/app_flowy/lib/user/presentation/sign_up_screen.dart b/frontend/app_flowy/lib/user/presentation/sign_up_screen.dart
index d0cb7f8b90..75834f3836 100644
--- a/frontend/app_flowy/lib/user/presentation/sign_up_screen.dart
+++ b/frontend/app_flowy/lib/user/presentation/sign_up_screen.dart
@@ -86,6 +86,7 @@ class SignUpPrompt extends StatelessWidget {
Widget build(BuildContext context) {
final theme = context.watch<AppTheme>();
return Row(
+ mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
LocaleKeys.signUp_alreadyHaveAnAccount.tr(),
@@ -97,7 +98,6 @@ class SignUpPrompt extends StatelessWidget {
child: Text(LocaleKeys.signIn_buttonText.tr(), style: TextStyle(color: theme.main1)),
),
],
- mainAxisAlignment: MainAxisAlignment.center,
);
}
}
diff --git a/frontend/app_flowy/lib/workspace/presentation/home/hotkeys.dart b/frontend/app_flowy/lib/workspace/presentation/home/hotkeys.dart
index 32c2bae7fe..0ac9cbc704 100644
--- a/frontend/app_flowy/lib/workspace/presentation/home/hotkeys.dart
+++ b/frontend/app_flowy/lib/workspace/presentation/home/hotkeys.dart
@@ -13,14 +13,14 @@ class HomeHotKeys extends StatelessWidget {
@override
Widget build(BuildContext context) {
- HotKey _hotKey = HotKey(
+ HotKey hotKey = HotKey(
KeyCode.backslash,
modifiers: [Platform.isMacOS ? KeyModifier.meta : KeyModifier.control],
// Set hotkey scope (default is HotKeyScope.system)
scope: HotKeyScope.inapp, // Set as inapp-wide hotkey.
);
hotKeyManager.register(
- _hotKey,
+ hotKey,
keyDownHandler: (hotKey) {
context.read<HomeBloc>().add(const HomeEvent.collapseMenu());
getIt<HomeStackManager>().collapsedNotifier.value =
diff --git a/frontend/app_flowy/lib/workspace/presentation/home/menu/menu.dart b/frontend/app_flowy/lib/workspace/presentation/home/menu/menu.dart
index f9704a695f..1796640d00 100644
--- a/frontend/app_flowy/lib/workspace/presentation/home/menu/menu.dart
+++ b/frontend/app_flowy/lib/workspace/presentation/home/menu/menu.dart
@@ -222,7 +222,7 @@ class MenuTopBar extends StatelessWidget {
Tooltip(
richMessage: TextSpan(children: [
TextSpan(
- text: LocaleKeys.sideBar_closeSidebar.tr() + "\n"),
+ text: "${LocaleKeys.sideBar_closeSidebar.tr()}\n"),
TextSpan(
text: Platform.isMacOS ? "⌘+\\" : "Ctrl+\\",
style: const TextStyle(color: Colors.white60),
diff --git a/frontend/app_flowy/lib/workspace/presentation/home/menu/menu_user.dart b/frontend/app_flowy/lib/workspace/presentation/home/menu/menu_user.dart
index 3d9d76fe29..399bbd1f89 100644
--- a/frontend/app_flowy/lib/workspace/presentation/home/menu/menu_user.dart
+++ b/frontend/app_flowy/lib/workspace/presentation/home/menu/menu_user.dart
@@ -24,6 +24,7 @@ class MenuUser extends StatelessWidget {
getIt<MenuUserBloc>(param1: user)..add(const MenuUserEvent.initial()),
child: BlocBuilder<MenuUserBloc, MenuUserState>(
builder: (context, state) => Row(
+ crossAxisAlignment: CrossAxisAlignment.center,
children: [
_renderAvatar(context),
const HSpace(10),
@@ -34,7 +35,6 @@ class MenuUser extends StatelessWidget {
//we get the below block back
//_renderDropButton(context),
],
- crossAxisAlignment: CrossAxisAlignment.center,
),
),
);
diff --git a/frontend/app_flowy/lib/workspace/presentation/home/navigation.dart b/frontend/app_flowy/lib/workspace/presentation/home/navigation.dart
index 019a567932..bfdb708013 100644
--- a/frontend/app_flowy/lib/workspace/presentation/home/navigation.dart
+++ b/frontend/app_flowy/lib/workspace/presentation/home/navigation.dart
@@ -101,7 +101,7 @@ class FlowyNavigation extends StatelessWidget {
turns: const AlwaysStoppedAnimation(180 / 360),
child: Tooltip(
richMessage: TextSpan(children: [
- TextSpan(text: LocaleKeys.sideBar_openSidebar.tr() + "\n"),
+ TextSpan(text: "${LocaleKeys.sideBar_openSidebar.tr()}\n"),
TextSpan(
text: Platform.isMacOS ? "⌘+\\" : "Ctrl+\\",
style: const TextStyle(color: Colors.white60),
diff --git a/frontend/app_flowy/lib/workspace/presentation/home/toast.dart b/frontend/app_flowy/lib/workspace/presentation/home/toast.dart
index 28241c0ec4..d3473adaa9 100644
--- a/frontend/app_flowy/lib/workspace/presentation/home/toast.dart
+++ b/frontend/app_flowy/lib/workspace/presentation/home/toast.dart
@@ -10,14 +10,14 @@ class FlowyMessageToast extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
- child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
- child: FlowyText.medium(message, color: Colors.white),
- ),
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(4)),
color: Colors.black,
),
+ child: Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
+ child: FlowyText.medium(message, color: Colors.white),
+ ),
);
}
}
diff --git a/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_language_view.dart b/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_language_view.dart
index e95e6e83ab..bb1b419da0 100644
--- a/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_language_view.dart
+++ b/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_language_view.dart
@@ -84,8 +84,8 @@ class _LanguageSelectorDropdownState extends State<LanguageSelectorDropdown> {
});
},
icon: const Visibility(
- child: (Icon(Icons.arrow_downward)),
visible: false,
+ child: (Icon(Icons.arrow_downward)),
),
borderRadius: BorderRadius.circular(8),
items: EasyLocalization.of(context)!.supportedLocales.map((locale) {
diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/edit_panel/panel_animation.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/edit_panel/panel_animation.dart
index 082cb5dabf..e88c6b09b6 100644
--- a/frontend/app_flowy/lib/workspace/presentation/widgets/edit_panel/panel_animation.dart
+++ b/frontend/app_flowy/lib/workspace/presentation/widgets/edit_panel/panel_animation.dart
@@ -79,9 +79,9 @@ extension AnimatedPanelExtensions on Widget {
return AnimatedPanel(
closedX: closePos.dx,
closedY: closePos.dy,
- child: this,
isClosed: isClosed ?? false,
duration: duration ?? .35,
- curve: curve);
+ curve: curve,
+ child: this);
}
}
diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/default_emoji_picker_view.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/default_emoji_picker_view.dart
index afdfa5e6eb..d6b605332f 100644
--- a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/default_emoji_picker_view.dart
+++ b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/default_emoji_picker_view.dart
@@ -199,8 +199,8 @@ class _DefaultEmojiPickerViewState extends State<DefaultEmojiPickerView> with Ti
if (widget.config.buttonMode == ButtonMode.MATERIAL) {
return TextButton(
onPressed: onPressed,
- child: child,
style: ButtonStyle(padding: MaterialStateProperty.all(EdgeInsets.zero)),
+ child: child,
);
}
return CupertinoButton(padding: EdgeInsets.zero, onPressed: onPressed, child: child);
diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/float_bubble/question_bubble.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/float_bubble/question_bubble.dart
index 6cc150489c..dbcafe2e44 100644
--- a/frontend/app_flowy/lib/workspace/presentation/widgets/float_bubble/question_bubble.dart
+++ b/frontend/app_flowy/lib/workspace/presentation/widgets/float_bubble/question_bubble.dart
@@ -87,7 +87,7 @@ class _DebugToast {
return deviceInfo.then((info) {
var debugText = "";
info.toMap().forEach((key, value) {
- debugText = debugText + "$key: $value\n";
+ debugText = "$debugText$key: $value\n";
});
return debugText;
});
diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/pop_up_window.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/pop_up_window.dart
index 1803257672..4f30248ed2 100644
--- a/frontend/app_flowy/lib/workspace/presentation/widgets/pop_up_window.dart
+++ b/frontend/app_flowy/lib/workspace/presentation/widgets/pop_up_window.dart
@@ -10,8 +10,8 @@ class FlowyPoppuWindow extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Material(
- child: child,
type: MaterialType.transparency,
+ child: child,
);
}
diff --git a/frontend/app_flowy/pubspec.lock b/frontend/app_flowy/pubspec.lock
index 199a41baa3..1279bec74b 100644
--- a/frontend/app_flowy/pubspec.lock
+++ b/frontend/app_flowy/pubspec.lock
@@ -7,14 +7,14 @@ packages:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
- version: "44.0.0"
+ version: "46.0.0"
analyzer:
dependency: "direct overridden"
description:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
- version: "4.4.0"
+ version: "4.6.0"
animations:
dependency: transitive
description:
@@ -182,7 +182,7 @@ packages:
name: connectivity_plus
url: "https://pub.dartlang.org"
source: hosted
- version: "2.2.0"
+ version: "2.3.6+1"
connectivity_plus_linux:
dependency: transitive
description:
@@ -196,7 +196,7 @@ packages:
name: connectivity_plus_macos
url: "https://pub.dartlang.org"
source: hosted
- version: "1.2.2"
+ version: "1.2.4"
connectivity_plus_platform_interface:
dependency: transitive
description:
@@ -210,14 +210,14 @@ packages:
name: connectivity_plus_web
url: "https://pub.dartlang.org"
source: hosted
- version: "1.2.0"
+ version: "1.2.3"
connectivity_plus_windows:
dependency: transitive
description:
name: connectivity_plus_windows
url: "https://pub.dartlang.org"
source: hosted
- version: "1.2.0"
+ version: "1.2.2"
convert:
dependency: transitive
description:
diff --git a/frontend/app_flowy/pubspec.yaml b/frontend/app_flowy/pubspec.yaml
index c81b96e156..7447ae999d 100644
--- a/frontend/app_flowy/pubspec.yaml
+++ b/frontend/app_flowy/pubspec.yaml
@@ -81,6 +81,7 @@ dependencies:
reorderables: ^0.5.0
linked_scroll_controller: ^0.2.0
hotkey_manager: ^0.1.7
+ fixnum: ^1.0.1
dev_dependencies:
flutter_lints: ^2.0.1