mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-24 01:13:40 +08:00
65 lines
1.8 KiB
Dart
65 lines
1.8 KiB
Dart
|
// This file is automatically generated, so please do not edit it.
|
||
|
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.23.
|
||
|
|
||
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||
|
|
||
|
import 'frb_generated.dart';
|
||
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||
|
import 'package:freezed_annotation/freezed_annotation.dart' hide protected;
|
||
|
part 'downloader.freezed.dart';
|
||
|
|
||
|
class DownloadCallbackData {
|
||
|
final String id;
|
||
|
final int total;
|
||
|
final int progress;
|
||
|
final int speed;
|
||
|
final MyDownloaderStatus status;
|
||
|
|
||
|
const DownloadCallbackData({
|
||
|
required this.id,
|
||
|
required this.total,
|
||
|
required this.progress,
|
||
|
required this.speed,
|
||
|
required this.status,
|
||
|
});
|
||
|
|
||
|
@override
|
||
|
int get hashCode =>
|
||
|
id.hashCode ^
|
||
|
total.hashCode ^
|
||
|
progress.hashCode ^
|
||
|
speed.hashCode ^
|
||
|
status.hashCode;
|
||
|
|
||
|
@override
|
||
|
bool operator ==(Object other) =>
|
||
|
identical(this, other) ||
|
||
|
other is DownloadCallbackData &&
|
||
|
runtimeType == other.runtimeType &&
|
||
|
id == other.id &&
|
||
|
total == other.total &&
|
||
|
progress == other.progress &&
|
||
|
speed == other.speed &&
|
||
|
status == other.status;
|
||
|
}
|
||
|
|
||
|
@freezed
|
||
|
sealed class MyDownloaderStatus with _$MyDownloaderStatus {
|
||
|
const factory MyDownloaderStatus.noStart() = MyDownloaderStatus_NoStart;
|
||
|
const factory MyDownloaderStatus.running() = MyDownloaderStatus_Running;
|
||
|
const factory MyDownloaderStatus.pending(
|
||
|
MyNetworkItemPendingType field0,
|
||
|
) = MyDownloaderStatus_Pending;
|
||
|
const factory MyDownloaderStatus.error(
|
||
|
String field0,
|
||
|
) = MyDownloaderStatus_Error;
|
||
|
const factory MyDownloaderStatus.finished() = MyDownloaderStatus_Finished;
|
||
|
}
|
||
|
|
||
|
enum MyNetworkItemPendingType {
|
||
|
queueUp,
|
||
|
starting,
|
||
|
stopping,
|
||
|
initializing,
|
||
|
}
|