joekman990/flutterflow-issues

test image

Opened this issue · 0 comments

Has your issue been reported?

  • I have searched the existing issues and confirm it has not been reported.
  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

I have created a custom code widget, that has a String? property. On page, I tie this property to a String? Page State. When i change this state in code, the widget crashes (even tough I check for nulls, it gives a null check error). I have made experiments and if i reference the property, it crashes.

The code below causes the crash for null value:```
String getGroup(String? groupType, ClientStruct client) {
if (groupType != null) {
return groupType;
} else {
return "null";
}
}

Current widget definition:
class ClientGroupList extends StatefulWidget {
const ClientGroupList({
super.key,
this.width,
this.height,
this.clients,
this.onItemClick,
this.groupType,
});

final double? width;
final double? height;
final List? clients;
final Future Function(ClientStruct client)? onItemClick;
final String? groupType;

@OverRide
State createState() => _ClientGroupListState();
}```

Expected Behavior

not crash if null checked

Steps to Reproduce

create custom widget with property
create page state
attch widget proporty to state
Change page state with action

Reproducible from Blank

  • The steps to reproduce above start from a blank project.

Bug Report Code (Required)

IT4glcn15YpNpbxK1bqBKe9VqGIvKUh9bZc0r9pEGEshfJvmPJkhduDBTBFLYteLfVVUemCKimYy/86MjeLxJvA5EzmcGr5AyoRXQRbNWnqtaYTWDpGBOX9BBdlQIFOB4bWK3QokPvBvcnw46176e/CNG3qCf9qOYwx5e6fDbOY=

Context

Avoiding using custom widgets

Visual documentation

image

image

image

image

Additional Info

No response

Environment

- FlutterFlow version: FlutterFlow v4.1.54+
- Platform: Chrome
- Browser name and version: Chrome Versão 125.0.6422.142 (Versão oficial) 64 bits
- Operating system and version affected: Windows