mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
fix & opt.
This commit is contained in:
16
lib/data/model/sftp/download_item.dart
Normal file
16
lib/data/model/sftp/download_item.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import '../server/server_private_info.dart';
|
||||
|
||||
class DownloadItem {
|
||||
DownloadItem(this.spi, this.remotePath, this.localPath);
|
||||
|
||||
final ServerPrivateInfo spi;
|
||||
final String remotePath;
|
||||
final String localPath;
|
||||
}
|
||||
|
||||
class DownloadItemEvent {
|
||||
DownloadItemEvent(this.item, this.privateKey);
|
||||
|
||||
final DownloadItem item;
|
||||
final String? privateKey;
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
import 'package:toolbox/data/model/sftp/download_worker.dart';
|
||||
|
||||
import 'download_item.dart';
|
||||
|
||||
class SftpDownloadStatus {
|
||||
final int id;
|
||||
final DownloadItem item;
|
||||
|
||||
@@ -4,16 +4,9 @@ import 'dart:isolate';
|
||||
|
||||
import 'package:dartssh2/dartssh2.dart';
|
||||
import 'package:easy_isolate/easy_isolate.dart';
|
||||
import 'package:toolbox/data/model/server/server_private_info.dart';
|
||||
import 'package:toolbox/data/model/sftp/download_status.dart';
|
||||
|
||||
class DownloadItem {
|
||||
DownloadItem(this.spi, this.remotePath, this.localPath);
|
||||
|
||||
final ServerPrivateInfo spi;
|
||||
final String remotePath;
|
||||
final String localPath;
|
||||
}
|
||||
import 'download_item.dart';
|
||||
import 'download_status.dart';
|
||||
|
||||
class SftpDownloadWorker {
|
||||
SftpDownloadWorker(
|
||||
@@ -101,10 +94,3 @@ class SftpDownloadWorker {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class DownloadItemEvent {
|
||||
DownloadItemEvent(this.item, this.privateKey);
|
||||
|
||||
final DownloadItem item;
|
||||
final String? privateKey;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:toolbox/core/provider_base.dart';
|
||||
import 'package:toolbox/data/model/sftp/download_status.dart';
|
||||
import 'package:toolbox/data/model/sftp/download_worker.dart';
|
||||
|
||||
import '../model/sftp/download_item.dart';
|
||||
import '../model/sftp/download_status.dart';
|
||||
|
||||
class SftpDownloadProvider extends ProviderBase {
|
||||
final List<SftpDownloadStatus> _status = [];
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 187;
|
||||
static const int build = 189;
|
||||
static const String engine =
|
||||
"Flutter 3.7.0 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision b06b8b2710 (4 days ago) • 2023-01-23 16:55:55 -0800\nEngine • revision b24591ed32\nTools • Dart 2.19.0 • DevTools 2.20.1\n";
|
||||
static const String buildAt = "2023-01-28 13:54:17.985459";
|
||||
static const int modifications = 13;
|
||||
static const String buildAt = "2023-01-28 14:28:14.979200";
|
||||
static const int modifications = 2;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
const roundRectCardPadding = EdgeInsets.symmetric(horizontal: 17);
|
||||
const roundRectCardPadding = EdgeInsets.symmetric(horizontal: 17, vertical: 13);
|
||||
|
||||
@@ -6,7 +6,7 @@ class SettingStore extends PersistentStore {
|
||||
property('primaryColor', defaultValue: Colors.deepPurpleAccent.value);
|
||||
|
||||
StoreProperty<int> get serverStatusUpdateInterval =>
|
||||
property('serverStatusUpdateInterval', defaultValue: 5);
|
||||
property('serverStatusUpdateInterval', defaultValue: 3);
|
||||
|
||||
/// Lanch page idx
|
||||
StoreProperty<int> get launchPage => property('launchPage', defaultValue: 0);
|
||||
|
||||
Reference in New Issue
Block a user