Open ryutosh opened 3 weeks ago
Hi there!
To prevent this issue, you can use conditional visibility to hide the widget, ensuring it doesn't get built when unnecessary. Additionally, setting a default value in the section you shared can help with null safety, which is crucial to avoid red screen errors.
@Alezanello Thanks for your response.
To prevent this issue, you can use conditional visibility to hide the widget, ensuring it doesn't get built when unnecessary.
Yes, I know. But it is so unproductive and I am avoiding it with my custom function, not FF's.
Additionally, setting a default value in the section you shared can help with null safety, which is crucial to avoid red screen errors.
No, this default value affects when the response of DateTimeFormat was null, not filed was null. And I already set empty string (invisible in capture).
This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.
Hello,
I apologize for the late response. Does this issue still persist, or was it fixed in the latest FlutterFlow updates?
Can we access your project?
Current Behavior
When trying to "Date Time Format" Option on datetime field and it was null, gets runtime error.
However FlutterFlow Util's code accepts null as in bellow(1), but generated code(2) forces null.
String dateTimeFormat(String format, DateTime? dateTime, {String? locale}) { if (dateTime == null) { return ''; } ... }
Text(dateTimeFormat("yMMMd",equipmentEquipmentsRecord.firstUseDate!, locale: FFLocalizations.of(context).languageCode,)
Expected Behavior
Returns "" when it was null as in FlutterFlow utils.
Steps to Reproduce
Reproducible from Blank
Bug Report Code (Required)
ITEehfKB35ZJpbwG1c7qcsJWiQMxJ1gjbJ0vhMIaUUoYB5TyPLMXbuvTP1JbQu2ZTG5cC078+T0JwvDMieLqG/YFNS2EQ5RO1s19Ez3LXn6gRLa3BZG0Z0ZDL+dTGnLD0Ka7iCUlFMZuWk0tig/GSw==
Visual documentation
Widget
Error
Environment
Additional Information
No response