This commit is contained in:
lollipopkit
2023-12-20 11:34:18 +08:00
parent eec13678a1
commit 6924290626
20 changed files with 104 additions and 105 deletions

View File

@@ -21,13 +21,13 @@ class OmitStartText extends StatelessWidget {
int len = 0;
for (; !exceeded && len < text.length; len++) {
// Build the textspan
var span = TextSpan(
final span = TextSpan(
text: 'A' * 7 + text.substring(text.length - len),
style: style ?? Theme.of(context).textTheme.bodyMedium,
);
// Use a textpainter to determine if it will exceed max lines
var tp = TextPainter(
final tp = TextPainter(
maxLines: maxLines ?? 1,
textDirection: TextDirection.ltr,
text: span,

View File

@@ -205,7 +205,7 @@ Future<void> _gotoSSH(
extraArgs.addAll(["-i", path]);
}
List<String> sshCommand = ["ssh", "${spi.user}@${spi.ip}"] + extraArgs;
final sshCommand = ["ssh", "${spi.user}@${spi.ip}"] + extraArgs;
final system = Platform.operatingSystem;
switch (system) {
case "windows":

View File

@@ -28,7 +28,7 @@ class StoreSwitch extends StatelessWidget {
return Switch(
value: value,
onChanged: (value) async {
if (validator != null && validator?.call(value) != true) return;
if (validator?.call(value) == false) return;
await callback?.call(value);
prop.put(value);
},