From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] applied: [PATCH pve_flutter_frontend] fix: ui: null check operator used on null value error on resource tab
Date: Wed, 21 May 2025 14:43:59 +0200 [thread overview]
Message-ID: <4fbf0d7c-3c6f-44c1-9889-5bdda44fc417@proxmox.com> (raw)
In-Reply-To: <20250520150418.166880-1-s.shaji@proxmox.com>
On 5/20/25 17:04, Shan Shaji wrote:
> The issue occurred because the null assertion operator (!) was used on
> the `template`` variable, which was potentially null. When the
> `PveGuestIcon` widget started rendering, it first checked the if
> condition inside the build method. If the `template` variable was
> null at that point, Flutter threw an error because the null
> assertion operator (!) was used, asserting that the variable
> was not null.
>
> To fix this, the bang operator (!) and the nullable operator (?)
> is removed. Additionally, in the `PveGuestListTile`, a default
> value of `false` is assigned when the `template` value is null.
>
> Summary of the changes:
> - Removed the bang operator (!) from the `template` variable
> in `PveGuestIcon`.
> - Removed the nullable operator (?).
> - Assigned a default value of false to `template` in `PveGuestListTile`
> when it's null.
>
> Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
> ---
> lib/pages/main_layout_slim.dart | 2 +-
> lib/widgets/pve_guest_icon_widget.dart | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
>
applied, thanks!
I fixed up the commit message with a small explanation
how one could run into this
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2025-05-21 12:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 15:04 [pve-devel] " Shan Shaji
2025-05-21 12:43 ` Dominik Csapak [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4fbf0d7c-3c6f-44c1-9889-5bdda44fc417@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal