refactor: Simplify conditional rendering logic using null aware operators (#1049)

This commit is contained in:
GT610
2026-02-08 22:18:56 +08:00
committed by GitHub
parent 89c1d66181
commit f9425948ca
3 changed files with 4 additions and 4 deletions

View File

@@ -162,7 +162,7 @@ class _SshDiscoveryPageState extends ConsumerState<SshDiscoveryPage> {
layoutBuilder: (currentChild, previousChildren) {
return Stack(
alignment: Alignment.centerRight,
children: <Widget>[...previousChildren, if (currentChild != null) currentChild],
children: <Widget>[...previousChildren, ?currentChild],
);
},
child: selectedResults.isNotEmpty