Merge pull request #18 from Iconica-Development/hotfix/null-profile-data

fix null pointer profile data
This commit is contained in:
joonsv 2022-12-07 10:24:10 +01:00 committed by GitHub
commit 0d57960ed5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -139,6 +139,7 @@ class _ProfileWrapperState extends State<ProfileWrapper> {
}
widgets.addAll(widget.extraWidgets ?? {});
widgets.addAll(defaultItems);
if (widget.user.profileData != null) {
widgets.addAll(ItemList(
Map.fromEntries(widget.user.profileData!.toMap().entries),
widget.user.profileData!.mapWidget(
@ -161,6 +162,7 @@ class _ProfileWrapperState extends State<ProfileWrapper> {
itemBuilderOptions: widget.itemBuilderOptions,
formKey: _formKey,
).getItemList());
}
var items = Wrap(
alignment: widget.wrapViewOptions?.wrapAlignment ?? WrapAlignment.start,