mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
opt.: replace first with firstOrNull
This commit is contained in:
@@ -135,8 +135,8 @@ void _onTapMoreBtns(
|
||||
name: (e) => e.name,
|
||||
);
|
||||
if (snippets == null || snippets.isEmpty) return;
|
||||
final snippet = snippets.first;
|
||||
|
||||
final snippet = snippets.firstOrNull;
|
||||
if (snippet == null) return;
|
||||
AppRoute.ssh(spi: spi, initCmd: snippet.fmtWith(spi)).checkGo(
|
||||
context: context,
|
||||
check: () => _checkClient(context, spi.id),
|
||||
|
||||
Reference in New Issue
Block a user