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.

fix: set cell style nullable (#3984)

Yijing Huanga7364e1f4a16
diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cell_builder.dart b/frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cell_builder.dart
index f302a561fa..b681297b6c 100755
--- a/frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cell_builder.dart
+++ b/frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cell_builder.dart
@@ -130,16 +130,16 @@ GridCellWidget _getMobileCardCellWidget(
) {
switch (cellContext.fieldType) {
case FieldType.RichText:
- style as GridTextCellStyle;
+ style as GridTextCellStyle?;
return MobileTextCell(
cellControllerBuilder: cellControllerBuilder,
- hintText: style.placeholder,
+ hintText: style?.placeholder,
);
case FieldType.Number:
- style as GridNumberCellStyle;
+ style as GridNumberCellStyle?;
return MobileNumberCell(
cellControllerBuilder: cellControllerBuilder,
- hintText: style.placeholder,
+ hintText: style?.placeholder,
);
case FieldType.LastEditedTime:
case FieldType.CreatedTime:
@@ -153,17 +153,17 @@ GridCellWidget _getMobileCardCellWidget(
key: key,
);
case FieldType.DateTime:
- style as DateCellStyle;
+ style as DateCellStyle?;
return MobileDateCell(
cellControllerBuilder: cellControllerBuilder,
- hintText: style.placeholder,
+ hintText: style?.placeholder,
key: key,
);
case FieldType.URL:
- style as GridURLCellStyle;
+ style as GridURLCellStyle?;
return MobileURLCell(
cellControllerBuilder: cellControllerBuilder,
- hintText: style.placeholder,
+ hintText: style?.placeholder,
key: key,
);
// TODO(yijing): implement the following mobile select option cell