mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 23:34:24 +01:00
Change SFTP to single column
This commit is contained in:
@@ -3,43 +3,12 @@ import 'package:toolbox/data/model/server/server_private_info.dart';
|
||||
import 'package:toolbox/data/model/sftp/absolute_path.dart';
|
||||
|
||||
class SFTPSideViewStatus {
|
||||
bool leftSelected = false;
|
||||
bool rightSelected = false;
|
||||
ServerPrivateInfo? leftSpi;
|
||||
ServerPrivateInfo? rightSpi;
|
||||
List<SftpName>? leftFiles;
|
||||
List<SftpName>? rightFiles;
|
||||
AbsolutePath? leftPath;
|
||||
AbsolutePath? rightPath;
|
||||
SftpClient? leftClient;
|
||||
SftpClient? rightClient;
|
||||
bool isBusyLeft = false;
|
||||
bool isBusyRight = false;
|
||||
bool selected = false;
|
||||
ServerPrivateInfo? spi;
|
||||
List<SftpName>? files;
|
||||
AbsolutePath? path;
|
||||
SftpClient? client;
|
||||
bool isBusy = false;
|
||||
|
||||
SFTPSideViewStatus();
|
||||
|
||||
ServerPrivateInfo? spi(bool left) => left ? leftSpi : rightSpi;
|
||||
void setSpi(bool left, ServerPrivateInfo nSpi) =>
|
||||
left ? leftSpi = nSpi : rightSpi = nSpi;
|
||||
|
||||
/// Whether the Left/Right Destination is selected.
|
||||
bool selected(bool left) => left ? leftSelected : rightSelected;
|
||||
void setSelect(bool left, bool nSelect) =>
|
||||
left ? leftSelected = nSelect : rightSelected = nSelect;
|
||||
|
||||
List<SftpName>? files(bool left) => left ? leftFiles : rightFiles;
|
||||
void setFiles(bool left, List<SftpName>? nFiles) =>
|
||||
left ? leftFiles = nFiles : rightFiles = nFiles;
|
||||
|
||||
AbsolutePath? path(bool left) => left ? leftPath : rightPath;
|
||||
void setPath(bool left, AbsolutePath? nPath) =>
|
||||
left ? leftPath = nPath : rightPath = nPath;
|
||||
|
||||
SftpClient? client(bool left) => left ? leftClient : rightClient;
|
||||
void setClient(bool left, SftpClient? nClient) =>
|
||||
left ? leftClient = nClient : rightClient = nClient;
|
||||
|
||||
bool isBusy(bool left) => left ? isBusyLeft : isBusyRight;
|
||||
void setBusy(bool left, bool nBusy) =>
|
||||
left ? isBusyLeft = nBusy : isBusyRight = nBusy;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user