mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
opt.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
const Set<MaterialState> interactiveStates = <MaterialState>{
|
||||
const _interactiveStates = <MaterialState>{
|
||||
MaterialState.pressed,
|
||||
MaterialState.hovered,
|
||||
MaterialState.focused,
|
||||
@@ -18,7 +18,7 @@ extension ColorX on Color {
|
||||
|
||||
MaterialStateProperty<Color?> get materialStateColor {
|
||||
return MaterialStateProperty.resolveWith((states) {
|
||||
if (states.any(interactiveStates.contains)) {
|
||||
if (states.any(_interactiveStates.contains)) {
|
||||
return this;
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -11,8 +11,12 @@ typedef PwdRequestFunc = Future<String> Function();
|
||||
final pwdRequestWithUserReg = RegExp(r'\[sudo\] password for (.+):');
|
||||
|
||||
extension SSHClientX on SSHClient {
|
||||
Future<int?> exec(String cmd,
|
||||
{OnStd? onStderr, OnStd? onStdout, OnStdin? stdin}) async {
|
||||
Future<int?> exec(
|
||||
String cmd, {
|
||||
OnStd? onStderr,
|
||||
OnStd? onStdout,
|
||||
OnStdin? stdin,
|
||||
}) async {
|
||||
final session = await execute(cmd);
|
||||
|
||||
final stdoutDone = Completer<void>();
|
||||
|
||||
@@ -10,8 +10,11 @@ extension StringX on String {
|
||||
return Uri.parse(this);
|
||||
}
|
||||
|
||||
Widget omitStartStr(
|
||||
{TextStyle? style, TextOverflow? overflow, int? maxLines}) {
|
||||
Widget omitStartStr({
|
||||
TextStyle? style,
|
||||
TextOverflow? overflow,
|
||||
int? maxLines,
|
||||
}) {
|
||||
return LayoutBuilder(builder: (context, size) {
|
||||
bool exceeded = false;
|
||||
int len = 0;
|
||||
|
||||
Reference in New Issue
Block a user