fix: set cell style nullable (#3984)

This commit is contained in:
Yijing Huang 2023-11-21 19:49:01 -07:00 committed by GitHub
parent 16467e9c13
commit a7364e1f4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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