]> git.proxmox.com Git - flutter/pve_flutter_frontend.git/commit
fix a few null problems and warnings
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 21 Apr 2023 11:26:58 +0000 (13:26 +0200)
committerDominik Csapak <d.csapak@proxmox.com>
Fri, 21 Apr 2023 11:51:56 +0000 (13:51 +0200)
commitdd552b9355feadee19e08777341c43972d7b03a7
tree80dfae52b73d790ae9cffeaacacf42428c0322c0
parent5f9cc4f915da23fbda3d0ebee79358e44a58047d
fix a few null problems and warnings

memused/cpu/loadavg don't have to be there if the rrd data does not
go all the way into the past, so instead of using ! to ignore the null
chekc, use a sensible default

if we use '??' to default to a value, there is no need
to access the last property with '.?' since if it's null it falls back
anyway. (this was only a warning from linting)

also if a value cannot be null (because of its type) we don't have
to do an explicit null check (also a warning from linting)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
lib/widgets/pve_node_overview.dart