ci: enable format test

This commit is contained in:
Tien Do Nam
2024-02-25 16:59:14 +01:00
parent bcd7dede07
commit 99534ce7b2
27 changed files with 504 additions and 1098 deletions
+18 -15
View File
@@ -10,21 +10,24 @@ env:
FLUTTER_VERSION: "3.13.9"
jobs:
# format:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v4
# - uses: subosito/flutter-action@v2
# with:
# flutter-version: ${{ env.FLUTTER_VERSION }}
# channel: "stable"
# - name: Dependencies
# working-directory: app
# run: flutter pub get
# - name: Check format
# working-directory: app
# run: dart format --line-length 150 --set-exit-if-changed lib test
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: "stable"
- name: Dependencies
working-directory: app
run: flutter pub get
- name: Remove gen directory
working-directory: app
run: rm -rf lib/gen
- name: Check format
working-directory: app
run: dart format --line-length 150 --set-exit-if-changed lib test
test:
runs-on: ubuntu-latest
+3 -6
View File
@@ -19,12 +19,10 @@ class $AssetsImgGen {
AssetGenImage get logo256 => const AssetGenImage('assets/img/logo-256.png');
/// File path: assets/img/logo-32-black.png
AssetGenImage get logo32Black =>
const AssetGenImage('assets/img/logo-32-black.png');
AssetGenImage get logo32Black => const AssetGenImage('assets/img/logo-32-black.png');
/// File path: assets/img/logo-32-white.png
AssetGenImage get logo32White =>
const AssetGenImage('assets/img/logo-32-white.png');
AssetGenImage get logo32White => const AssetGenImage('assets/img/logo-32-white.png');
/// File path: assets/img/logo-32.png
AssetGenImage get logo32 => const AssetGenImage('assets/img/logo-32.png');
@@ -36,8 +34,7 @@ class $AssetsImgGen {
String get logo => 'assets/img/logo.ico';
/// List of all assets
List<dynamic> get values =>
[logo128, logo256, logo32Black, logo32White, logo32, logo512, logo];
List<dynamic> get values => [logo128, logo256, logo32Black, logo32White, logo32, logo512, logo];
}
class $AssetsWebGen {
+14 -40
View File
@@ -24,13 +24,11 @@ class CrossFileMapper extends ClassMapperBase<CrossFile> {
static String _$name(CrossFile v) => v.name;
static const Field<CrossFile, String> _f$name = Field('name', _$name);
static FileType _$fileType(CrossFile v) => v.fileType;
static const Field<CrossFile, FileType> _f$fileType =
Field('fileType', _$fileType);
static const Field<CrossFile, FileType> _f$fileType = Field('fileType', _$fileType);
static int _$size(CrossFile v) => v.size;
static const Field<CrossFile, int> _f$size = Field('size', _$size);
static Uint8List? _$thumbnail(CrossFile v) => v.thumbnail;
static const Field<CrossFile, Uint8List> _f$thumbnail =
Field('thumbnail', _$thumbnail);
static const Field<CrossFile, Uint8List> _f$thumbnail = Field('thumbnail', _$thumbnail);
static AssetEntity? _$asset(CrossFile v) => v.asset;
static const Field<CrossFile, AssetEntity> _f$asset = Field('asset', _$asset);
static String? _$path(CrossFile v) => v.path;
@@ -74,29 +72,22 @@ class CrossFileMapper extends ClassMapperBase<CrossFile> {
mixin CrossFileMappable {
String serialize() {
return CrossFileMapper.ensureInitialized()
.encodeJson<CrossFile>(this as CrossFile);
return CrossFileMapper.ensureInitialized().encodeJson<CrossFile>(this as CrossFile);
}
Map<String, dynamic> toJson() {
return CrossFileMapper.ensureInitialized()
.encodeMap<CrossFile>(this as CrossFile);
return CrossFileMapper.ensureInitialized().encodeMap<CrossFile>(this as CrossFile);
}
CrossFileCopyWith<CrossFile, CrossFile, CrossFile> get copyWith =>
_CrossFileCopyWithImpl(this as CrossFile, $identity, $identity);
CrossFileCopyWith<CrossFile, CrossFile, CrossFile> get copyWith => _CrossFileCopyWithImpl(this as CrossFile, $identity, $identity);
@override
String toString() {
return CrossFileMapper.ensureInitialized()
.stringifyValue(this as CrossFile);
return CrossFileMapper.ensureInitialized().stringifyValue(this as CrossFile);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
CrossFileMapper.ensureInitialized()
.isValueEqual(this as CrossFile, other));
return identical(this, other) || (runtimeType == other.runtimeType && CrossFileMapper.ensureInitialized().isValueEqual(this as CrossFile, other));
}
@override
@@ -106,38 +97,23 @@ mixin CrossFileMappable {
}
extension CrossFileValueCopy<$R, $Out> on ObjectCopyWith<$R, CrossFile, $Out> {
CrossFileCopyWith<$R, CrossFile, $Out> get $asCrossFile =>
$base.as((v, t, t2) => _CrossFileCopyWithImpl(v, t, t2));
CrossFileCopyWith<$R, CrossFile, $Out> get $asCrossFile => $base.as((v, t, t2) => _CrossFileCopyWithImpl(v, t, t2));
}
abstract class CrossFileCopyWith<$R, $In extends CrossFile, $Out>
implements ClassCopyWith<$R, $In, $Out> {
abstract class CrossFileCopyWith<$R, $In extends CrossFile, $Out> implements ClassCopyWith<$R, $In, $Out> {
ListCopyWith<$R, int, ObjectCopyWith<$R, int, int>>? get bytes;
$R call(
{String? name,
FileType? fileType,
int? size,
Uint8List? thumbnail,
AssetEntity? asset,
String? path,
List<int>? bytes});
$R call({String? name, FileType? fileType, int? size, Uint8List? thumbnail, AssetEntity? asset, String? path, List<int>? bytes});
CrossFileCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _CrossFileCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, CrossFile, $Out>
implements CrossFileCopyWith<$R, CrossFile, $Out> {
class _CrossFileCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, CrossFile, $Out> implements CrossFileCopyWith<$R, CrossFile, $Out> {
_CrossFileCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<CrossFile> $mapper =
CrossFileMapper.ensureInitialized();
late final ClassMapperBase<CrossFile> $mapper = CrossFileMapper.ensureInitialized();
@override
ListCopyWith<$R, int, ObjectCopyWith<$R, int, int>>? get bytes =>
$value.bytes != null
? ListCopyWith($value.bytes!,
(v, t) => ObjectCopyWith(v, $identity, t), (v) => call(bytes: v))
: null;
$value.bytes != null ? ListCopyWith($value.bytes!, (v, t) => ObjectCopyWith(v, $identity, t), (v) => call(bytes: v)) : null;
@override
$R call(
{String? name,
@@ -167,7 +143,5 @@ class _CrossFileCopyWithImpl<$R, $Out>
bytes: data.get(#bytes, or: $value.bytes));
@override
CrossFileCopyWith<$R2, CrossFile, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_CrossFileCopyWithImpl($value, $cast, t);
CrossFileCopyWith<$R2, CrossFile, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _CrossFileCopyWithImpl($value, $cast, t);
}
+13 -31
View File
@@ -21,8 +21,7 @@ class LogEntryMapper extends ClassMapperBase<LogEntry> {
final String id = 'LogEntry';
static DateTime _$timestamp(LogEntry v) => v.timestamp;
static const Field<LogEntry, DateTime> _f$timestamp =
Field('timestamp', _$timestamp);
static const Field<LogEntry, DateTime> _f$timestamp = Field('timestamp', _$timestamp);
static String _$log(LogEntry v) => v.log;
static const Field<LogEntry, String> _f$log = Field('log', _$log);
@@ -50,17 +49,14 @@ class LogEntryMapper extends ClassMapperBase<LogEntry> {
mixin LogEntryMappable {
String serialize() {
return LogEntryMapper.ensureInitialized()
.encodeJson<LogEntry>(this as LogEntry);
return LogEntryMapper.ensureInitialized().encodeJson<LogEntry>(this as LogEntry);
}
Map<String, dynamic> toJson() {
return LogEntryMapper.ensureInitialized()
.encodeMap<LogEntry>(this as LogEntry);
return LogEntryMapper.ensureInitialized().encodeMap<LogEntry>(this as LogEntry);
}
LogEntryCopyWith<LogEntry, LogEntry, LogEntry> get copyWith =>
_LogEntryCopyWithImpl(this as LogEntry, $identity, $identity);
LogEntryCopyWith<LogEntry, LogEntry, LogEntry> get copyWith => _LogEntryCopyWithImpl(this as LogEntry, $identity, $identity);
@override
String toString() {
return LogEntryMapper.ensureInitialized().stringifyValue(this as LogEntry);
@@ -68,10 +64,7 @@ mixin LogEntryMappable {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
LogEntryMapper.ensureInitialized()
.isValueEqual(this as LogEntry, other));
return identical(this, other) || (runtimeType == other.runtimeType && LogEntryMapper.ensureInitialized().isValueEqual(this as LogEntry, other));
}
@override
@@ -81,36 +74,25 @@ mixin LogEntryMappable {
}
extension LogEntryValueCopy<$R, $Out> on ObjectCopyWith<$R, LogEntry, $Out> {
LogEntryCopyWith<$R, LogEntry, $Out> get $asLogEntry =>
$base.as((v, t, t2) => _LogEntryCopyWithImpl(v, t, t2));
LogEntryCopyWith<$R, LogEntry, $Out> get $asLogEntry => $base.as((v, t, t2) => _LogEntryCopyWithImpl(v, t, t2));
}
abstract class LogEntryCopyWith<$R, $In extends LogEntry, $Out>
implements ClassCopyWith<$R, $In, $Out> {
abstract class LogEntryCopyWith<$R, $In extends LogEntry, $Out> implements ClassCopyWith<$R, $In, $Out> {
$R call({DateTime? timestamp, String? log});
LogEntryCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _LogEntryCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, LogEntry, $Out>
implements LogEntryCopyWith<$R, LogEntry, $Out> {
class _LogEntryCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, LogEntry, $Out> implements LogEntryCopyWith<$R, LogEntry, $Out> {
_LogEntryCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<LogEntry> $mapper =
LogEntryMapper.ensureInitialized();
late final ClassMapperBase<LogEntry> $mapper = LogEntryMapper.ensureInitialized();
@override
$R call({DateTime? timestamp, String? log}) => $apply(FieldCopyWithData({
if (timestamp != null) #timestamp: timestamp,
if (log != null) #log: log
}));
$R call({DateTime? timestamp, String? log}) =>
$apply(FieldCopyWithData({if (timestamp != null) #timestamp: timestamp, if (log != null) #log: log}));
@override
LogEntry $make(CopyWithData data) => LogEntry(
timestamp: data.get(#timestamp, or: $value.timestamp),
log: data.get(#log, or: $value.log));
LogEntry $make(CopyWithData data) => LogEntry(timestamp: data.get(#timestamp, or: $value.timestamp), log: data.get(#log, or: $value.log));
@override
LogEntryCopyWith<$R2, LogEntry, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_LogEntryCopyWithImpl($value, $cast, t);
LogEntryCopyWith<$R2, LogEntry, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _LogEntryCopyWithImpl($value, $cast, t);
}
@@ -23,8 +23,7 @@ class FavoriteDeviceMapper extends ClassMapperBase<FavoriteDevice> {
static String _$id(FavoriteDevice v) => v.id;
static const Field<FavoriteDevice, String> _f$id = Field('id', _$id);
static String _$fingerprint(FavoriteDevice v) => v.fingerprint;
static const Field<FavoriteDevice, String> _f$fingerprint =
Field('fingerprint', _$fingerprint);
static const Field<FavoriteDevice, String> _f$fingerprint = Field('fingerprint', _$fingerprint);
static String _$ip(FavoriteDevice v) => v.ip;
static const Field<FavoriteDevice, String> _f$ip = Field('ip', _$ip);
static int _$port(FavoriteDevice v) => v.port;
@@ -32,8 +31,7 @@ class FavoriteDeviceMapper extends ClassMapperBase<FavoriteDevice> {
static String _$alias(FavoriteDevice v) => v.alias;
static const Field<FavoriteDevice, String> _f$alias = Field('alias', _$alias);
static bool _$customAlias(FavoriteDevice v) => v.customAlias;
static const Field<FavoriteDevice, bool> _f$customAlias =
Field('customAlias', _$customAlias, opt: true, def: false);
static const Field<FavoriteDevice, bool> _f$customAlias = Field('customAlias', _$customAlias, opt: true, def: false);
@override
final Map<Symbol, Field<FavoriteDevice, dynamic>> fields = const {
@@ -69,75 +67,49 @@ class FavoriteDeviceMapper extends ClassMapperBase<FavoriteDevice> {
mixin FavoriteDeviceMappable {
String serialize() {
return FavoriteDeviceMapper.ensureInitialized()
.encodeJson<FavoriteDevice>(this as FavoriteDevice);
return FavoriteDeviceMapper.ensureInitialized().encodeJson<FavoriteDevice>(this as FavoriteDevice);
}
Map<String, dynamic> toJson() {
return FavoriteDeviceMapper.ensureInitialized()
.encodeMap<FavoriteDevice>(this as FavoriteDevice);
return FavoriteDeviceMapper.ensureInitialized().encodeMap<FavoriteDevice>(this as FavoriteDevice);
}
FavoriteDeviceCopyWith<FavoriteDevice, FavoriteDevice, FavoriteDevice>
get copyWith => _FavoriteDeviceCopyWithImpl(
this as FavoriteDevice, $identity, $identity);
FavoriteDeviceCopyWith<FavoriteDevice, FavoriteDevice, FavoriteDevice> get copyWith =>
_FavoriteDeviceCopyWithImpl(this as FavoriteDevice, $identity, $identity);
@override
String toString() {
return FavoriteDeviceMapper.ensureInitialized()
.stringifyValue(this as FavoriteDevice);
return FavoriteDeviceMapper.ensureInitialized().stringifyValue(this as FavoriteDevice);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
FavoriteDeviceMapper.ensureInitialized()
.isValueEqual(this as FavoriteDevice, other));
(runtimeType == other.runtimeType && FavoriteDeviceMapper.ensureInitialized().isValueEqual(this as FavoriteDevice, other));
}
@override
int get hashCode {
return FavoriteDeviceMapper.ensureInitialized()
.hashValue(this as FavoriteDevice);
return FavoriteDeviceMapper.ensureInitialized().hashValue(this as FavoriteDevice);
}
}
extension FavoriteDeviceValueCopy<$R, $Out>
on ObjectCopyWith<$R, FavoriteDevice, $Out> {
FavoriteDeviceCopyWith<$R, FavoriteDevice, $Out> get $asFavoriteDevice =>
$base.as((v, t, t2) => _FavoriteDeviceCopyWithImpl(v, t, t2));
extension FavoriteDeviceValueCopy<$R, $Out> on ObjectCopyWith<$R, FavoriteDevice, $Out> {
FavoriteDeviceCopyWith<$R, FavoriteDevice, $Out> get $asFavoriteDevice => $base.as((v, t, t2) => _FavoriteDeviceCopyWithImpl(v, t, t2));
}
abstract class FavoriteDeviceCopyWith<$R, $In extends FavoriteDevice, $Out>
implements ClassCopyWith<$R, $In, $Out> {
$R call(
{String? id,
String? fingerprint,
String? ip,
int? port,
String? alias,
bool? customAlias});
FavoriteDeviceCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t);
abstract class FavoriteDeviceCopyWith<$R, $In extends FavoriteDevice, $Out> implements ClassCopyWith<$R, $In, $Out> {
$R call({String? id, String? fingerprint, String? ip, int? port, String? alias, bool? customAlias});
FavoriteDeviceCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _FavoriteDeviceCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, FavoriteDevice, $Out>
class _FavoriteDeviceCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, FavoriteDevice, $Out>
implements FavoriteDeviceCopyWith<$R, FavoriteDevice, $Out> {
_FavoriteDeviceCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<FavoriteDevice> $mapper =
FavoriteDeviceMapper.ensureInitialized();
late final ClassMapperBase<FavoriteDevice> $mapper = FavoriteDeviceMapper.ensureInitialized();
@override
$R call(
{String? id,
String? fingerprint,
String? ip,
int? port,
String? alias,
bool? customAlias}) =>
$apply(FieldCopyWithData({
$R call({String? id, String? fingerprint, String? ip, int? port, String? alias, bool? customAlias}) => $apply(FieldCopyWithData({
if (id != null) #id: id,
if (fingerprint != null) #fingerprint: fingerprint,
if (ip != null) #ip: ip,
@@ -155,7 +127,5 @@ class _FavoriteDeviceCopyWithImpl<$R, $Out>
customAlias: data.get(#customAlias, or: $value.customAlias));
@override
FavoriteDeviceCopyWith<$R2, FavoriteDevice, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_FavoriteDeviceCopyWithImpl($value, $cast, t);
FavoriteDeviceCopyWith<$R2, FavoriteDevice, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _FavoriteDeviceCopyWithImpl($value, $cast, t);
}
@@ -24,26 +24,19 @@ class ReceiveHistoryEntryMapper extends ClassMapperBase<ReceiveHistoryEntry> {
static String _$id(ReceiveHistoryEntry v) => v.id;
static const Field<ReceiveHistoryEntry, String> _f$id = Field('id', _$id);
static String _$fileName(ReceiveHistoryEntry v) => v.fileName;
static const Field<ReceiveHistoryEntry, String> _f$fileName =
Field('fileName', _$fileName);
static const Field<ReceiveHistoryEntry, String> _f$fileName = Field('fileName', _$fileName);
static FileType _$fileType(ReceiveHistoryEntry v) => v.fileType;
static const Field<ReceiveHistoryEntry, FileType> _f$fileType =
Field('fileType', _$fileType);
static const Field<ReceiveHistoryEntry, FileType> _f$fileType = Field('fileType', _$fileType);
static String? _$path(ReceiveHistoryEntry v) => v.path;
static const Field<ReceiveHistoryEntry, String> _f$path =
Field('path', _$path);
static const Field<ReceiveHistoryEntry, String> _f$path = Field('path', _$path);
static bool _$savedToGallery(ReceiveHistoryEntry v) => v.savedToGallery;
static const Field<ReceiveHistoryEntry, bool> _f$savedToGallery =
Field('savedToGallery', _$savedToGallery);
static const Field<ReceiveHistoryEntry, bool> _f$savedToGallery = Field('savedToGallery', _$savedToGallery);
static int _$fileSize(ReceiveHistoryEntry v) => v.fileSize;
static const Field<ReceiveHistoryEntry, int> _f$fileSize =
Field('fileSize', _$fileSize);
static const Field<ReceiveHistoryEntry, int> _f$fileSize = Field('fileSize', _$fileSize);
static String _$senderAlias(ReceiveHistoryEntry v) => v.senderAlias;
static const Field<ReceiveHistoryEntry, String> _f$senderAlias =
Field('senderAlias', _$senderAlias);
static const Field<ReceiveHistoryEntry, String> _f$senderAlias = Field('senderAlias', _$senderAlias);
static DateTime _$timestamp(ReceiveHistoryEntry v) => v.timestamp;
static const Field<ReceiveHistoryEntry, DateTime> _f$timestamp =
Field('timestamp', _$timestamp);
static const Field<ReceiveHistoryEntry, DateTime> _f$timestamp = Field('timestamp', _$timestamp);
@override
final Map<Symbol, Field<ReceiveHistoryEntry, dynamic>> fields = const {
@@ -83,49 +76,38 @@ class ReceiveHistoryEntryMapper extends ClassMapperBase<ReceiveHistoryEntry> {
mixin ReceiveHistoryEntryMappable {
String serialize() {
return ReceiveHistoryEntryMapper.ensureInitialized()
.encodeJson<ReceiveHistoryEntry>(this as ReceiveHistoryEntry);
return ReceiveHistoryEntryMapper.ensureInitialized().encodeJson<ReceiveHistoryEntry>(this as ReceiveHistoryEntry);
}
Map<String, dynamic> toJson() {
return ReceiveHistoryEntryMapper.ensureInitialized()
.encodeMap<ReceiveHistoryEntry>(this as ReceiveHistoryEntry);
return ReceiveHistoryEntryMapper.ensureInitialized().encodeMap<ReceiveHistoryEntry>(this as ReceiveHistoryEntry);
}
ReceiveHistoryEntryCopyWith<ReceiveHistoryEntry, ReceiveHistoryEntry,
ReceiveHistoryEntry>
get copyWith => _ReceiveHistoryEntryCopyWithImpl(
this as ReceiveHistoryEntry, $identity, $identity);
ReceiveHistoryEntryCopyWith<ReceiveHistoryEntry, ReceiveHistoryEntry, ReceiveHistoryEntry> get copyWith =>
_ReceiveHistoryEntryCopyWithImpl(this as ReceiveHistoryEntry, $identity, $identity);
@override
String toString() {
return ReceiveHistoryEntryMapper.ensureInitialized()
.stringifyValue(this as ReceiveHistoryEntry);
return ReceiveHistoryEntryMapper.ensureInitialized().stringifyValue(this as ReceiveHistoryEntry);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
ReceiveHistoryEntryMapper.ensureInitialized()
.isValueEqual(this as ReceiveHistoryEntry, other));
(runtimeType == other.runtimeType && ReceiveHistoryEntryMapper.ensureInitialized().isValueEqual(this as ReceiveHistoryEntry, other));
}
@override
int get hashCode {
return ReceiveHistoryEntryMapper.ensureInitialized()
.hashValue(this as ReceiveHistoryEntry);
return ReceiveHistoryEntryMapper.ensureInitialized().hashValue(this as ReceiveHistoryEntry);
}
}
extension ReceiveHistoryEntryValueCopy<$R, $Out>
on ObjectCopyWith<$R, ReceiveHistoryEntry, $Out> {
ReceiveHistoryEntryCopyWith<$R, ReceiveHistoryEntry, $Out>
get $asReceiveHistoryEntry =>
$base.as((v, t, t2) => _ReceiveHistoryEntryCopyWithImpl(v, t, t2));
extension ReceiveHistoryEntryValueCopy<$R, $Out> on ObjectCopyWith<$R, ReceiveHistoryEntry, $Out> {
ReceiveHistoryEntryCopyWith<$R, ReceiveHistoryEntry, $Out> get $asReceiveHistoryEntry =>
$base.as((v, t, t2) => _ReceiveHistoryEntryCopyWithImpl(v, t, t2));
}
abstract class ReceiveHistoryEntryCopyWith<$R, $In extends ReceiveHistoryEntry,
$Out> implements ClassCopyWith<$R, $In, $Out> {
abstract class ReceiveHistoryEntryCopyWith<$R, $In extends ReceiveHistoryEntry, $Out> implements ClassCopyWith<$R, $In, $Out> {
$R call(
{String? id,
String? fileName,
@@ -135,18 +117,15 @@ abstract class ReceiveHistoryEntryCopyWith<$R, $In extends ReceiveHistoryEntry,
int? fileSize,
String? senderAlias,
DateTime? timestamp});
ReceiveHistoryEntryCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t);
ReceiveHistoryEntryCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _ReceiveHistoryEntryCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, ReceiveHistoryEntry, $Out>
class _ReceiveHistoryEntryCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, ReceiveHistoryEntry, $Out>
implements ReceiveHistoryEntryCopyWith<$R, ReceiveHistoryEntry, $Out> {
_ReceiveHistoryEntryCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<ReceiveHistoryEntry> $mapper =
ReceiveHistoryEntryMapper.ensureInitialized();
late final ClassMapperBase<ReceiveHistoryEntry> $mapper = ReceiveHistoryEntryMapper.ensureInitialized();
@override
$R call(
{String? id,
@@ -179,7 +158,6 @@ class _ReceiveHistoryEntryCopyWithImpl<$R, $Out>
timestamp: data.get(#timestamp, or: $value.timestamp));
@override
ReceiveHistoryEntryCopyWith<$R2, ReceiveHistoryEntry, $Out2>
$chain<$R2, $Out2>(Then<$Out2, $R2> t) =>
_ReceiveHistoryEntryCopyWithImpl($value, $cast, t);
ReceiveHistoryEntryCopyWith<$R2, ReceiveHistoryEntry, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) =>
_ReceiveHistoryEntryCopyWithImpl($value, $cast, t);
}
@@ -21,16 +21,12 @@ class NearbyDevicesStateMapper extends ClassMapperBase<NearbyDevicesState> {
@override
final String id = 'NearbyDevicesState';
static bool _$runningFavoriteScan(NearbyDevicesState v) =>
v.runningFavoriteScan;
static const Field<NearbyDevicesState, bool> _f$runningFavoriteScan =
Field('runningFavoriteScan', _$runningFavoriteScan);
static bool _$runningFavoriteScan(NearbyDevicesState v) => v.runningFavoriteScan;
static const Field<NearbyDevicesState, bool> _f$runningFavoriteScan = Field('runningFavoriteScan', _$runningFavoriteScan);
static Set<String> _$runningIps(NearbyDevicesState v) => v.runningIps;
static const Field<NearbyDevicesState, Set<String>> _f$runningIps =
Field('runningIps', _$runningIps);
static const Field<NearbyDevicesState, Set<String>> _f$runningIps = Field('runningIps', _$runningIps);
static Map<String, Device> _$devices(NearbyDevicesState v) => v.devices;
static const Field<NearbyDevicesState, Map<String, Device>> _f$devices =
Field('devices', _$devices);
static const Field<NearbyDevicesState, Map<String, Device>> _f$devices = Field('devices', _$devices);
@override
final Map<Symbol, Field<NearbyDevicesState, dynamic>> fields = const {
@@ -41,9 +37,7 @@ class NearbyDevicesStateMapper extends ClassMapperBase<NearbyDevicesState> {
static NearbyDevicesState _instantiate(DecodingData data) {
return NearbyDevicesState(
runningFavoriteScan: data.dec(_f$runningFavoriteScan),
runningIps: data.dec(_f$runningIps),
devices: data.dec(_f$devices));
runningFavoriteScan: data.dec(_f$runningFavoriteScan), runningIps: data.dec(_f$runningIps), devices: data.dec(_f$devices));
}
@override
@@ -60,91 +54,65 @@ class NearbyDevicesStateMapper extends ClassMapperBase<NearbyDevicesState> {
mixin NearbyDevicesStateMappable {
String serialize() {
return NearbyDevicesStateMapper.ensureInitialized()
.encodeJson<NearbyDevicesState>(this as NearbyDevicesState);
return NearbyDevicesStateMapper.ensureInitialized().encodeJson<NearbyDevicesState>(this as NearbyDevicesState);
}
Map<String, dynamic> toJson() {
return NearbyDevicesStateMapper.ensureInitialized()
.encodeMap<NearbyDevicesState>(this as NearbyDevicesState);
return NearbyDevicesStateMapper.ensureInitialized().encodeMap<NearbyDevicesState>(this as NearbyDevicesState);
}
NearbyDevicesStateCopyWith<NearbyDevicesState, NearbyDevicesState,
NearbyDevicesState>
get copyWith => _NearbyDevicesStateCopyWithImpl(
this as NearbyDevicesState, $identity, $identity);
NearbyDevicesStateCopyWith<NearbyDevicesState, NearbyDevicesState, NearbyDevicesState> get copyWith =>
_NearbyDevicesStateCopyWithImpl(this as NearbyDevicesState, $identity, $identity);
@override
String toString() {
return NearbyDevicesStateMapper.ensureInitialized()
.stringifyValue(this as NearbyDevicesState);
return NearbyDevicesStateMapper.ensureInitialized().stringifyValue(this as NearbyDevicesState);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
NearbyDevicesStateMapper.ensureInitialized()
.isValueEqual(this as NearbyDevicesState, other));
(runtimeType == other.runtimeType && NearbyDevicesStateMapper.ensureInitialized().isValueEqual(this as NearbyDevicesState, other));
}
@override
int get hashCode {
return NearbyDevicesStateMapper.ensureInitialized()
.hashValue(this as NearbyDevicesState);
return NearbyDevicesStateMapper.ensureInitialized().hashValue(this as NearbyDevicesState);
}
}
extension NearbyDevicesStateValueCopy<$R, $Out>
on ObjectCopyWith<$R, NearbyDevicesState, $Out> {
NearbyDevicesStateCopyWith<$R, NearbyDevicesState, $Out>
get $asNearbyDevicesState =>
$base.as((v, t, t2) => _NearbyDevicesStateCopyWithImpl(v, t, t2));
extension NearbyDevicesStateValueCopy<$R, $Out> on ObjectCopyWith<$R, NearbyDevicesState, $Out> {
NearbyDevicesStateCopyWith<$R, NearbyDevicesState, $Out> get $asNearbyDevicesState =>
$base.as((v, t, t2) => _NearbyDevicesStateCopyWithImpl(v, t, t2));
}
abstract class NearbyDevicesStateCopyWith<$R, $In extends NearbyDevicesState,
$Out> implements ClassCopyWith<$R, $In, $Out> {
MapCopyWith<$R, String, Device, DeviceCopyWith<$R, Device, Device>>
get devices;
$R call(
{bool? runningFavoriteScan,
Set<String>? runningIps,
Map<String, Device>? devices});
NearbyDevicesStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t);
abstract class NearbyDevicesStateCopyWith<$R, $In extends NearbyDevicesState, $Out> implements ClassCopyWith<$R, $In, $Out> {
MapCopyWith<$R, String, Device, DeviceCopyWith<$R, Device, Device>> get devices;
$R call({bool? runningFavoriteScan, Set<String>? runningIps, Map<String, Device>? devices});
NearbyDevicesStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _NearbyDevicesStateCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, NearbyDevicesState, $Out>
class _NearbyDevicesStateCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, NearbyDevicesState, $Out>
implements NearbyDevicesStateCopyWith<$R, NearbyDevicesState, $Out> {
_NearbyDevicesStateCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<NearbyDevicesState> $mapper =
NearbyDevicesStateMapper.ensureInitialized();
late final ClassMapperBase<NearbyDevicesState> $mapper = NearbyDevicesStateMapper.ensureInitialized();
@override
MapCopyWith<$R, String, Device, DeviceCopyWith<$R, Device, Device>>
get devices => MapCopyWith($value.devices, (v, t) => v.copyWith.$chain(t),
(v) => call(devices: v));
MapCopyWith<$R, String, Device, DeviceCopyWith<$R, Device, Device>> get devices =>
MapCopyWith($value.devices, (v, t) => v.copyWith.$chain(t), (v) => call(devices: v));
@override
$R call(
{bool? runningFavoriteScan,
Set<String>? runningIps,
Map<String, Device>? devices}) =>
$apply(FieldCopyWithData({
if (runningFavoriteScan != null)
#runningFavoriteScan: runningFavoriteScan,
$R call({bool? runningFavoriteScan, Set<String>? runningIps, Map<String, Device>? devices}) => $apply(FieldCopyWithData({
if (runningFavoriteScan != null) #runningFavoriteScan: runningFavoriteScan,
if (runningIps != null) #runningIps: runningIps,
if (devices != null) #devices: devices
}));
@override
NearbyDevicesState $make(CopyWithData data) => NearbyDevicesState(
runningFavoriteScan:
data.get(#runningFavoriteScan, or: $value.runningFavoriteScan),
runningFavoriteScan: data.get(#runningFavoriteScan, or: $value.runningFavoriteScan),
runningIps: data.get(#runningIps, or: $value.runningIps),
devices: data.get(#devices, or: $value.devices));
@override
NearbyDevicesStateCopyWith<$R2, NearbyDevicesState, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
NearbyDevicesStateCopyWith<$R2, NearbyDevicesState, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) =>
_NearbyDevicesStateCopyWithImpl($value, $cast, t);
}
+18 -40
View File
@@ -21,11 +21,9 @@ class NetworkStateMapper extends ClassMapperBase<NetworkState> {
final String id = 'NetworkState';
static List<String> _$localIps(NetworkState v) => v.localIps;
static const Field<NetworkState, List<String>> _f$localIps =
Field('localIps', _$localIps);
static const Field<NetworkState, List<String>> _f$localIps = Field('localIps', _$localIps);
static bool _$initialized(NetworkState v) => v.initialized;
static const Field<NetworkState, bool> _f$initialized =
Field('initialized', _$initialized);
static const Field<NetworkState, bool> _f$initialized = Field('initialized', _$initialized);
@override
final Map<Symbol, Field<NetworkState, dynamic>> fields = const {
@@ -34,8 +32,7 @@ class NetworkStateMapper extends ClassMapperBase<NetworkState> {
};
static NetworkState _instantiate(DecodingData data) {
return NetworkState(
localIps: data.dec(_f$localIps), initialized: data.dec(_f$initialized));
return NetworkState(localIps: data.dec(_f$localIps), initialized: data.dec(_f$initialized));
}
@override
@@ -52,76 +49,57 @@ class NetworkStateMapper extends ClassMapperBase<NetworkState> {
mixin NetworkStateMappable {
String serialize() {
return NetworkStateMapper.ensureInitialized()
.encodeJson<NetworkState>(this as NetworkState);
return NetworkStateMapper.ensureInitialized().encodeJson<NetworkState>(this as NetworkState);
}
Map<String, dynamic> toJson() {
return NetworkStateMapper.ensureInitialized()
.encodeMap<NetworkState>(this as NetworkState);
return NetworkStateMapper.ensureInitialized().encodeMap<NetworkState>(this as NetworkState);
}
NetworkStateCopyWith<NetworkState, NetworkState, NetworkState> get copyWith =>
_NetworkStateCopyWithImpl(this as NetworkState, $identity, $identity);
@override
String toString() {
return NetworkStateMapper.ensureInitialized()
.stringifyValue(this as NetworkState);
return NetworkStateMapper.ensureInitialized().stringifyValue(this as NetworkState);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
NetworkStateMapper.ensureInitialized()
.isValueEqual(this as NetworkState, other));
(runtimeType == other.runtimeType && NetworkStateMapper.ensureInitialized().isValueEqual(this as NetworkState, other));
}
@override
int get hashCode {
return NetworkStateMapper.ensureInitialized()
.hashValue(this as NetworkState);
return NetworkStateMapper.ensureInitialized().hashValue(this as NetworkState);
}
}
extension NetworkStateValueCopy<$R, $Out>
on ObjectCopyWith<$R, NetworkState, $Out> {
NetworkStateCopyWith<$R, NetworkState, $Out> get $asNetworkState =>
$base.as((v, t, t2) => _NetworkStateCopyWithImpl(v, t, t2));
extension NetworkStateValueCopy<$R, $Out> on ObjectCopyWith<$R, NetworkState, $Out> {
NetworkStateCopyWith<$R, NetworkState, $Out> get $asNetworkState => $base.as((v, t, t2) => _NetworkStateCopyWithImpl(v, t, t2));
}
abstract class NetworkStateCopyWith<$R, $In extends NetworkState, $Out>
implements ClassCopyWith<$R, $In, $Out> {
abstract class NetworkStateCopyWith<$R, $In extends NetworkState, $Out> implements ClassCopyWith<$R, $In, $Out> {
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>> get localIps;
$R call({List<String>? localIps, bool? initialized});
NetworkStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _NetworkStateCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, NetworkState, $Out>
implements NetworkStateCopyWith<$R, NetworkState, $Out> {
class _NetworkStateCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, NetworkState, $Out> implements NetworkStateCopyWith<$R, NetworkState, $Out> {
_NetworkStateCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<NetworkState> $mapper =
NetworkStateMapper.ensureInitialized();
late final ClassMapperBase<NetworkState> $mapper = NetworkStateMapper.ensureInitialized();
@override
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>> get localIps =>
ListCopyWith($value.localIps, (v, t) => ObjectCopyWith(v, $identity, t),
(v) => call(localIps: v));
ListCopyWith($value.localIps, (v, t) => ObjectCopyWith(v, $identity, t), (v) => call(localIps: v));
@override
$R call({List<String>? localIps, bool? initialized}) =>
$apply(FieldCopyWithData({
if (localIps != null) #localIps: localIps,
if (initialized != null) #initialized: initialized
}));
$apply(FieldCopyWithData({if (localIps != null) #localIps: localIps, if (initialized != null) #initialized: initialized}));
@override
NetworkState $make(CopyWithData data) => NetworkState(
localIps: data.get(#localIps, or: $value.localIps),
initialized: data.get(#initialized, or: $value.initialized));
NetworkState $make(CopyWithData data) =>
NetworkState(localIps: data.get(#localIps, or: $value.localIps), initialized: data.get(#initialized, or: $value.initialized));
@override
NetworkStateCopyWith<$R2, NetworkState, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_NetworkStateCopyWithImpl($value, $cast, t);
NetworkStateCopyWith<$R2, NetworkState, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _NetworkStateCopyWithImpl($value, $cast, t);
}
+23 -55
View File
@@ -21,14 +21,11 @@ class PurchaseStateMapper extends ClassMapperBase<PurchaseState> {
final String id = 'PurchaseState';
static Map<PurchaseItem, String> _$prices(PurchaseState v) => v.prices;
static const Field<PurchaseState, Map<PurchaseItem, String>> _f$prices =
Field('prices', _$prices);
static const Field<PurchaseState, Map<PurchaseItem, String>> _f$prices = Field('prices', _$prices);
static Set<PurchaseItem> _$purchases(PurchaseState v) => v.purchases;
static const Field<PurchaseState, Set<PurchaseItem>> _f$purchases =
Field('purchases', _$purchases);
static const Field<PurchaseState, Set<PurchaseItem>> _f$purchases = Field('purchases', _$purchases);
static bool _$pending(PurchaseState v) => v.pending;
static const Field<PurchaseState, bool> _f$pending =
Field('pending', _$pending);
static const Field<PurchaseState, bool> _f$pending = Field('pending', _$pending);
@override
final Map<Symbol, Field<PurchaseState, dynamic>> fields = const {
@@ -38,10 +35,7 @@ class PurchaseStateMapper extends ClassMapperBase<PurchaseState> {
};
static PurchaseState _instantiate(DecodingData data) {
return PurchaseState(
prices: data.dec(_f$prices),
purchases: data.dec(_f$purchases),
pending: data.dec(_f$pending));
return PurchaseState(prices: data.dec(_f$prices), purchases: data.dec(_f$purchases), pending: data.dec(_f$pending));
}
@override
@@ -58,78 +52,54 @@ class PurchaseStateMapper extends ClassMapperBase<PurchaseState> {
mixin PurchaseStateMappable {
String serialize() {
return PurchaseStateMapper.ensureInitialized()
.encodeJson<PurchaseState>(this as PurchaseState);
return PurchaseStateMapper.ensureInitialized().encodeJson<PurchaseState>(this as PurchaseState);
}
Map<String, dynamic> toJson() {
return PurchaseStateMapper.ensureInitialized()
.encodeMap<PurchaseState>(this as PurchaseState);
return PurchaseStateMapper.ensureInitialized().encodeMap<PurchaseState>(this as PurchaseState);
}
PurchaseStateCopyWith<PurchaseState, PurchaseState, PurchaseState>
get copyWith => _PurchaseStateCopyWithImpl(
this as PurchaseState, $identity, $identity);
PurchaseStateCopyWith<PurchaseState, PurchaseState, PurchaseState> get copyWith =>
_PurchaseStateCopyWithImpl(this as PurchaseState, $identity, $identity);
@override
String toString() {
return PurchaseStateMapper.ensureInitialized()
.stringifyValue(this as PurchaseState);
return PurchaseStateMapper.ensureInitialized().stringifyValue(this as PurchaseState);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
PurchaseStateMapper.ensureInitialized()
.isValueEqual(this as PurchaseState, other));
(runtimeType == other.runtimeType && PurchaseStateMapper.ensureInitialized().isValueEqual(this as PurchaseState, other));
}
@override
int get hashCode {
return PurchaseStateMapper.ensureInitialized()
.hashValue(this as PurchaseState);
return PurchaseStateMapper.ensureInitialized().hashValue(this as PurchaseState);
}
}
extension PurchaseStateValueCopy<$R, $Out>
on ObjectCopyWith<$R, PurchaseState, $Out> {
PurchaseStateCopyWith<$R, PurchaseState, $Out> get $asPurchaseState =>
$base.as((v, t, t2) => _PurchaseStateCopyWithImpl(v, t, t2));
extension PurchaseStateValueCopy<$R, $Out> on ObjectCopyWith<$R, PurchaseState, $Out> {
PurchaseStateCopyWith<$R, PurchaseState, $Out> get $asPurchaseState => $base.as((v, t, t2) => _PurchaseStateCopyWithImpl(v, t, t2));
}
abstract class PurchaseStateCopyWith<$R, $In extends PurchaseState, $Out>
implements ClassCopyWith<$R, $In, $Out> {
MapCopyWith<$R, PurchaseItem, String, ObjectCopyWith<$R, String, String>>
get prices;
$R call(
{Map<PurchaseItem, String>? prices,
Set<PurchaseItem>? purchases,
bool? pending});
abstract class PurchaseStateCopyWith<$R, $In extends PurchaseState, $Out> implements ClassCopyWith<$R, $In, $Out> {
MapCopyWith<$R, PurchaseItem, String, ObjectCopyWith<$R, String, String>> get prices;
$R call({Map<PurchaseItem, String>? prices, Set<PurchaseItem>? purchases, bool? pending});
PurchaseStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _PurchaseStateCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, PurchaseState, $Out>
class _PurchaseStateCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, PurchaseState, $Out>
implements PurchaseStateCopyWith<$R, PurchaseState, $Out> {
_PurchaseStateCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<PurchaseState> $mapper =
PurchaseStateMapper.ensureInitialized();
late final ClassMapperBase<PurchaseState> $mapper = PurchaseStateMapper.ensureInitialized();
@override
MapCopyWith<$R, PurchaseItem, String, ObjectCopyWith<$R, String, String>>
get prices => MapCopyWith($value.prices,
(v, t) => ObjectCopyWith(v, $identity, t), (v) => call(prices: v));
MapCopyWith<$R, PurchaseItem, String, ObjectCopyWith<$R, String, String>> get prices =>
MapCopyWith($value.prices, (v, t) => ObjectCopyWith(v, $identity, t), (v) => call(prices: v));
@override
$R call(
{Map<PurchaseItem, String>? prices,
Set<PurchaseItem>? purchases,
bool? pending}) =>
$apply(FieldCopyWithData({
if (prices != null) #prices: prices,
if (purchases != null) #purchases: purchases,
if (pending != null) #pending: pending
}));
$R call({Map<PurchaseItem, String>? prices, Set<PurchaseItem>? purchases, bool? pending}) => $apply(
FieldCopyWithData({if (prices != null) #prices: prices, if (purchases != null) #purchases: purchases, if (pending != null) #pending: pending}));
@override
PurchaseState $make(CopyWithData data) => PurchaseState(
prices: data.get(#prices, or: $value.prices),
@@ -137,7 +107,5 @@ class _PurchaseStateCopyWithImpl<$R, $Out>
pending: data.get(#pending, or: $value.pending));
@override
PurchaseStateCopyWith<$R2, PurchaseState, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_PurchaseStateCopyWithImpl($value, $cast, t);
PurchaseStateCopyWith<$R2, PurchaseState, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _PurchaseStateCopyWithImpl($value, $cast, t);
}
@@ -23,35 +23,25 @@ class SendSessionStateMapper extends ClassMapperBase<SendSessionState> {
final String id = 'SendSessionState';
static String _$sessionId(SendSessionState v) => v.sessionId;
static const Field<SendSessionState, String> _f$sessionId =
Field('sessionId', _$sessionId);
static const Field<SendSessionState, String> _f$sessionId = Field('sessionId', _$sessionId);
static String? _$remoteSessionId(SendSessionState v) => v.remoteSessionId;
static const Field<SendSessionState, String> _f$remoteSessionId =
Field('remoteSessionId', _$remoteSessionId);
static const Field<SendSessionState, String> _f$remoteSessionId = Field('remoteSessionId', _$remoteSessionId);
static bool _$background(SendSessionState v) => v.background;
static const Field<SendSessionState, bool> _f$background =
Field('background', _$background);
static const Field<SendSessionState, bool> _f$background = Field('background', _$background);
static SessionStatus _$status(SendSessionState v) => v.status;
static const Field<SendSessionState, SessionStatus> _f$status =
Field('status', _$status);
static const Field<SendSessionState, SessionStatus> _f$status = Field('status', _$status);
static Device _$target(SendSessionState v) => v.target;
static const Field<SendSessionState, Device> _f$target =
Field('target', _$target);
static const Field<SendSessionState, Device> _f$target = Field('target', _$target);
static Map<String, SendingFile> _$files(SendSessionState v) => v.files;
static const Field<SendSessionState, Map<String, SendingFile>> _f$files =
Field('files', _$files);
static const Field<SendSessionState, Map<String, SendingFile>> _f$files = Field('files', _$files);
static int? _$startTime(SendSessionState v) => v.startTime;
static const Field<SendSessionState, int> _f$startTime =
Field('startTime', _$startTime);
static const Field<SendSessionState, int> _f$startTime = Field('startTime', _$startTime);
static int? _$endTime(SendSessionState v) => v.endTime;
static const Field<SendSessionState, int> _f$endTime =
Field('endTime', _$endTime);
static const Field<SendSessionState, int> _f$endTime = Field('endTime', _$endTime);
static CancelToken? _$cancelToken(SendSessionState v) => v.cancelToken;
static const Field<SendSessionState, CancelToken> _f$cancelToken =
Field('cancelToken', _$cancelToken);
static const Field<SendSessionState, CancelToken> _f$cancelToken = Field('cancelToken', _$cancelToken);
static String? _$errorMessage(SendSessionState v) => v.errorMessage;
static const Field<SendSessionState, String> _f$errorMessage =
Field('errorMessage', _$errorMessage);
static const Field<SendSessionState, String> _f$errorMessage = Field('errorMessage', _$errorMessage);
@override
final Map<Symbol, Field<SendSessionState, dynamic>> fields = const {
@@ -95,51 +85,39 @@ class SendSessionStateMapper extends ClassMapperBase<SendSessionState> {
mixin SendSessionStateMappable {
String serialize() {
return SendSessionStateMapper.ensureInitialized()
.encodeJson<SendSessionState>(this as SendSessionState);
return SendSessionStateMapper.ensureInitialized().encodeJson<SendSessionState>(this as SendSessionState);
}
Map<String, dynamic> toJson() {
return SendSessionStateMapper.ensureInitialized()
.encodeMap<SendSessionState>(this as SendSessionState);
return SendSessionStateMapper.ensureInitialized().encodeMap<SendSessionState>(this as SendSessionState);
}
SendSessionStateCopyWith<SendSessionState, SendSessionState, SendSessionState>
get copyWith => _SendSessionStateCopyWithImpl(
this as SendSessionState, $identity, $identity);
SendSessionStateCopyWith<SendSessionState, SendSessionState, SendSessionState> get copyWith =>
_SendSessionStateCopyWithImpl(this as SendSessionState, $identity, $identity);
@override
String toString() {
return SendSessionStateMapper.ensureInitialized()
.stringifyValue(this as SendSessionState);
return SendSessionStateMapper.ensureInitialized().stringifyValue(this as SendSessionState);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
SendSessionStateMapper.ensureInitialized()
.isValueEqual(this as SendSessionState, other));
(runtimeType == other.runtimeType && SendSessionStateMapper.ensureInitialized().isValueEqual(this as SendSessionState, other));
}
@override
int get hashCode {
return SendSessionStateMapper.ensureInitialized()
.hashValue(this as SendSessionState);
return SendSessionStateMapper.ensureInitialized().hashValue(this as SendSessionState);
}
}
extension SendSessionStateValueCopy<$R, $Out>
on ObjectCopyWith<$R, SendSessionState, $Out> {
SendSessionStateCopyWith<$R, SendSessionState, $Out>
get $asSendSessionState =>
$base.as((v, t, t2) => _SendSessionStateCopyWithImpl(v, t, t2));
extension SendSessionStateValueCopy<$R, $Out> on ObjectCopyWith<$R, SendSessionState, $Out> {
SendSessionStateCopyWith<$R, SendSessionState, $Out> get $asSendSessionState => $base.as((v, t, t2) => _SendSessionStateCopyWithImpl(v, t, t2));
}
abstract class SendSessionStateCopyWith<$R, $In extends SendSessionState, $Out>
implements ClassCopyWith<$R, $In, $Out> {
abstract class SendSessionStateCopyWith<$R, $In extends SendSessionState, $Out> implements ClassCopyWith<$R, $In, $Out> {
DeviceCopyWith<$R, Device, Device> get target;
MapCopyWith<$R, String, SendingFile,
SendingFileCopyWith<$R, SendingFile, SendingFile>> get files;
MapCopyWith<$R, String, SendingFile, SendingFileCopyWith<$R, SendingFile, SendingFile>> get files;
$R call(
{String? sessionId,
String? remoteSessionId,
@@ -151,26 +129,20 @@ abstract class SendSessionStateCopyWith<$R, $In extends SendSessionState, $Out>
int? endTime,
CancelToken? cancelToken,
String? errorMessage});
SendSessionStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t);
SendSessionStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _SendSessionStateCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, SendSessionState, $Out>
class _SendSessionStateCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, SendSessionState, $Out>
implements SendSessionStateCopyWith<$R, SendSessionState, $Out> {
_SendSessionStateCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<SendSessionState> $mapper =
SendSessionStateMapper.ensureInitialized();
late final ClassMapperBase<SendSessionState> $mapper = SendSessionStateMapper.ensureInitialized();
@override
DeviceCopyWith<$R, Device, Device> get target =>
$value.target.copyWith.$chain((v) => call(target: v));
DeviceCopyWith<$R, Device, Device> get target => $value.target.copyWith.$chain((v) => call(target: v));
@override
MapCopyWith<$R, String, SendingFile,
SendingFileCopyWith<$R, SendingFile, SendingFile>>
get files => MapCopyWith(
$value.files, (v, t) => v.copyWith.$chain(t), (v) => call(files: v));
MapCopyWith<$R, String, SendingFile, SendingFileCopyWith<$R, SendingFile, SendingFile>> get files =>
MapCopyWith($value.files, (v, t) => v.copyWith.$chain(t), (v) => call(files: v));
@override
$R call(
{String? sessionId,
@@ -209,7 +181,5 @@ class _SendSessionStateCopyWithImpl<$R, $Out>
errorMessage: data.get(#errorMessage, or: $value.errorMessage));
@override
SendSessionStateCopyWith<$R2, SendSessionState, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_SendSessionStateCopyWithImpl($value, $cast, t);
SendSessionStateCopyWith<$R2, SendSessionState, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _SendSessionStateCopyWithImpl($value, $cast, t);
}
@@ -23,23 +23,19 @@ class SendingFileMapper extends ClassMapperBase<SendingFile> {
static FileDto _$file(SendingFile v) => v.file;
static const Field<SendingFile, FileDto> _f$file = Field('file', _$file);
static FileStatus _$status(SendingFile v) => v.status;
static const Field<SendingFile, FileStatus> _f$status =
Field('status', _$status);
static const Field<SendingFile, FileStatus> _f$status = Field('status', _$status);
static String? _$token(SendingFile v) => v.token;
static const Field<SendingFile, String> _f$token = Field('token', _$token);
static Uint8List? _$thumbnail(SendingFile v) => v.thumbnail;
static const Field<SendingFile, Uint8List> _f$thumbnail =
Field('thumbnail', _$thumbnail);
static const Field<SendingFile, Uint8List> _f$thumbnail = Field('thumbnail', _$thumbnail);
static AssetEntity? _$asset(SendingFile v) => v.asset;
static const Field<SendingFile, AssetEntity> _f$asset =
Field('asset', _$asset);
static const Field<SendingFile, AssetEntity> _f$asset = Field('asset', _$asset);
static String? _$path(SendingFile v) => v.path;
static const Field<SendingFile, String> _f$path = Field('path', _$path);
static List<int>? _$bytes(SendingFile v) => v.bytes;
static const Field<SendingFile, List<int>> _f$bytes = Field('bytes', _$bytes);
static String? _$errorMessage(SendingFile v) => v.errorMessage;
static const Field<SendingFile, String> _f$errorMessage =
Field('errorMessage', _$errorMessage);
static const Field<SendingFile, String> _f$errorMessage = Field('errorMessage', _$errorMessage);
@override
final Map<Symbol, Field<SendingFile, dynamic>> fields = const {
@@ -79,29 +75,23 @@ class SendingFileMapper extends ClassMapperBase<SendingFile> {
mixin SendingFileMappable {
String serialize() {
return SendingFileMapper.ensureInitialized()
.encodeJson<SendingFile>(this as SendingFile);
return SendingFileMapper.ensureInitialized().encodeJson<SendingFile>(this as SendingFile);
}
Map<String, dynamic> toJson() {
return SendingFileMapper.ensureInitialized()
.encodeMap<SendingFile>(this as SendingFile);
return SendingFileMapper.ensureInitialized().encodeMap<SendingFile>(this as SendingFile);
}
SendingFileCopyWith<SendingFile, SendingFile, SendingFile> get copyWith =>
_SendingFileCopyWithImpl(this as SendingFile, $identity, $identity);
SendingFileCopyWith<SendingFile, SendingFile, SendingFile> get copyWith => _SendingFileCopyWithImpl(this as SendingFile, $identity, $identity);
@override
String toString() {
return SendingFileMapper.ensureInitialized()
.stringifyValue(this as SendingFile);
return SendingFileMapper.ensureInitialized().stringifyValue(this as SendingFile);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
SendingFileMapper.ensureInitialized()
.isValueEqual(this as SendingFile, other));
(runtimeType == other.runtimeType && SendingFileMapper.ensureInitialized().isValueEqual(this as SendingFile, other));
}
@override
@@ -110,14 +100,11 @@ mixin SendingFileMappable {
}
}
extension SendingFileValueCopy<$R, $Out>
on ObjectCopyWith<$R, SendingFile, $Out> {
SendingFileCopyWith<$R, SendingFile, $Out> get $asSendingFile =>
$base.as((v, t, t2) => _SendingFileCopyWithImpl(v, t, t2));
extension SendingFileValueCopy<$R, $Out> on ObjectCopyWith<$R, SendingFile, $Out> {
SendingFileCopyWith<$R, SendingFile, $Out> get $asSendingFile => $base.as((v, t, t2) => _SendingFileCopyWithImpl(v, t, t2));
}
abstract class SendingFileCopyWith<$R, $In extends SendingFile, $Out>
implements ClassCopyWith<$R, $In, $Out> {
abstract class SendingFileCopyWith<$R, $In extends SendingFile, $Out> implements ClassCopyWith<$R, $In, $Out> {
ListCopyWith<$R, int, ObjectCopyWith<$R, int, int>>? get bytes;
$R call(
{FileDto? file,
@@ -131,20 +118,14 @@ abstract class SendingFileCopyWith<$R, $In extends SendingFile, $Out>
SendingFileCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _SendingFileCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, SendingFile, $Out>
implements SendingFileCopyWith<$R, SendingFile, $Out> {
class _SendingFileCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, SendingFile, $Out> implements SendingFileCopyWith<$R, SendingFile, $Out> {
_SendingFileCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<SendingFile> $mapper =
SendingFileMapper.ensureInitialized();
late final ClassMapperBase<SendingFile> $mapper = SendingFileMapper.ensureInitialized();
@override
ListCopyWith<$R, int, ObjectCopyWith<$R, int, int>>? get bytes =>
$value.bytes != null
? ListCopyWith($value.bytes!,
(v, t) => ObjectCopyWith(v, $identity, t), (v) => call(bytes: v))
: null;
$value.bytes != null ? ListCopyWith($value.bytes!, (v, t) => ObjectCopyWith(v, $identity, t), (v) => call(bytes: v)) : null;
@override
$R call(
{FileDto? file,
@@ -177,7 +158,5 @@ class _SendingFileCopyWithImpl<$R, $Out>
errorMessage: data.get(#errorMessage, or: $value.errorMessage));
@override
SendingFileCopyWith<$R2, SendingFile, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_SendingFileCopyWithImpl($value, $cast, t);
SendingFileCopyWith<$R2, SendingFile, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _SendingFileCopyWithImpl($value, $cast, t);
}
@@ -23,8 +23,7 @@ class WebSendFileMapper extends ClassMapperBase<WebSendFile> {
static FileDto _$file(WebSendFile v) => v.file;
static const Field<WebSendFile, FileDto> _f$file = Field('file', _$file);
static AssetEntity? _$asset(WebSendFile v) => v.asset;
static const Field<WebSendFile, AssetEntity> _f$asset =
Field('asset', _$asset);
static const Field<WebSendFile, AssetEntity> _f$asset = Field('asset', _$asset);
static String? _$path(WebSendFile v) => v.path;
static const Field<WebSendFile, String> _f$path = Field('path', _$path);
static List<int>? _$bytes(WebSendFile v) => v.bytes;
@@ -39,11 +38,7 @@ class WebSendFileMapper extends ClassMapperBase<WebSendFile> {
};
static WebSendFile _instantiate(DecodingData data) {
return WebSendFile(
file: data.dec(_f$file),
asset: data.dec(_f$asset),
path: data.dec(_f$path),
bytes: data.dec(_f$bytes));
return WebSendFile(file: data.dec(_f$file), asset: data.dec(_f$asset), path: data.dec(_f$path), bytes: data.dec(_f$bytes));
}
@override
@@ -60,29 +55,23 @@ class WebSendFileMapper extends ClassMapperBase<WebSendFile> {
mixin WebSendFileMappable {
String serialize() {
return WebSendFileMapper.ensureInitialized()
.encodeJson<WebSendFile>(this as WebSendFile);
return WebSendFileMapper.ensureInitialized().encodeJson<WebSendFile>(this as WebSendFile);
}
Map<String, dynamic> toJson() {
return WebSendFileMapper.ensureInitialized()
.encodeMap<WebSendFile>(this as WebSendFile);
return WebSendFileMapper.ensureInitialized().encodeMap<WebSendFile>(this as WebSendFile);
}
WebSendFileCopyWith<WebSendFile, WebSendFile, WebSendFile> get copyWith =>
_WebSendFileCopyWithImpl(this as WebSendFile, $identity, $identity);
WebSendFileCopyWith<WebSendFile, WebSendFile, WebSendFile> get copyWith => _WebSendFileCopyWithImpl(this as WebSendFile, $identity, $identity);
@override
String toString() {
return WebSendFileMapper.ensureInitialized()
.stringifyValue(this as WebSendFile);
return WebSendFileMapper.ensureInitialized().stringifyValue(this as WebSendFile);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
WebSendFileMapper.ensureInitialized()
.isValueEqual(this as WebSendFile, other));
(runtimeType == other.runtimeType && WebSendFileMapper.ensureInitialized().isValueEqual(this as WebSendFile, other));
}
@override
@@ -91,45 +80,27 @@ mixin WebSendFileMappable {
}
}
extension WebSendFileValueCopy<$R, $Out>
on ObjectCopyWith<$R, WebSendFile, $Out> {
WebSendFileCopyWith<$R, WebSendFile, $Out> get $asWebSendFile =>
$base.as((v, t, t2) => _WebSendFileCopyWithImpl(v, t, t2));
extension WebSendFileValueCopy<$R, $Out> on ObjectCopyWith<$R, WebSendFile, $Out> {
WebSendFileCopyWith<$R, WebSendFile, $Out> get $asWebSendFile => $base.as((v, t, t2) => _WebSendFileCopyWithImpl(v, t, t2));
}
abstract class WebSendFileCopyWith<$R, $In extends WebSendFile, $Out>
implements ClassCopyWith<$R, $In, $Out> {
abstract class WebSendFileCopyWith<$R, $In extends WebSendFile, $Out> implements ClassCopyWith<$R, $In, $Out> {
ListCopyWith<$R, int, ObjectCopyWith<$R, int, int>>? get bytes;
$R call({FileDto? file, AssetEntity? asset, String? path, List<int>? bytes});
WebSendFileCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _WebSendFileCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, WebSendFile, $Out>
implements WebSendFileCopyWith<$R, WebSendFile, $Out> {
class _WebSendFileCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, WebSendFile, $Out> implements WebSendFileCopyWith<$R, WebSendFile, $Out> {
_WebSendFileCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<WebSendFile> $mapper =
WebSendFileMapper.ensureInitialized();
late final ClassMapperBase<WebSendFile> $mapper = WebSendFileMapper.ensureInitialized();
@override
ListCopyWith<$R, int, ObjectCopyWith<$R, int, int>>? get bytes =>
$value.bytes != null
? ListCopyWith($value.bytes!,
(v, t) => ObjectCopyWith(v, $identity, t), (v) => call(bytes: v))
: null;
$value.bytes != null ? ListCopyWith($value.bytes!, (v, t) => ObjectCopyWith(v, $identity, t), (v) => call(bytes: v)) : null;
@override
$R call(
{FileDto? file,
Object? asset = $none,
Object? path = $none,
Object? bytes = $none}) =>
$apply(FieldCopyWithData({
if (file != null) #file: file,
if (asset != $none) #asset: asset,
if (path != $none) #path: path,
if (bytes != $none) #bytes: bytes
}));
$R call({FileDto? file, Object? asset = $none, Object? path = $none, Object? bytes = $none}) => $apply(FieldCopyWithData(
{if (file != null) #file: file, if (asset != $none) #asset: asset, if (path != $none) #path: path, if (bytes != $none) #bytes: bytes}));
@override
WebSendFile $make(CopyWithData data) => WebSendFile(
file: data.get(#file, or: $value.file),
@@ -138,7 +109,5 @@ class _WebSendFileCopyWithImpl<$R, $Out>
bytes: data.get(#bytes, or: $value.bytes));
@override
WebSendFileCopyWith<$R2, WebSendFile, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_WebSendFileCopyWithImpl($value, $cast, t);
WebSendFileCopyWith<$R2, WebSendFile, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _WebSendFileCopyWithImpl($value, $cast, t);
}
@@ -21,17 +21,13 @@ class WebSendSessionMapper extends ClassMapperBase<WebSendSession> {
final String id = 'WebSendSession';
static String _$sessionId(WebSendSession v) => v.sessionId;
static const Field<WebSendSession, String> _f$sessionId =
Field('sessionId', _$sessionId);
static StreamController<bool>? _$responseHandler(WebSendSession v) =>
v.responseHandler;
static const Field<WebSendSession, StreamController<bool>>
_f$responseHandler = Field('responseHandler', _$responseHandler);
static const Field<WebSendSession, String> _f$sessionId = Field('sessionId', _$sessionId);
static StreamController<bool>? _$responseHandler(WebSendSession v) => v.responseHandler;
static const Field<WebSendSession, StreamController<bool>> _f$responseHandler = Field('responseHandler', _$responseHandler);
static String _$ip(WebSendSession v) => v.ip;
static const Field<WebSendSession, String> _f$ip = Field('ip', _$ip);
static String _$deviceInfo(WebSendSession v) => v.deviceInfo;
static const Field<WebSendSession, String> _f$deviceInfo =
Field('deviceInfo', _$deviceInfo);
static const Field<WebSendSession, String> _f$deviceInfo = Field('deviceInfo', _$deviceInfo);
@override
final Map<Symbol, Field<WebSendSession, dynamic>> fields = const {
@@ -43,10 +39,7 @@ class WebSendSessionMapper extends ClassMapperBase<WebSendSession> {
static WebSendSession _instantiate(DecodingData data) {
return WebSendSession(
sessionId: data.dec(_f$sessionId),
responseHandler: data.dec(_f$responseHandler),
ip: data.dec(_f$ip),
deviceInfo: data.dec(_f$deviceInfo));
sessionId: data.dec(_f$sessionId), responseHandler: data.dec(_f$responseHandler), ip: data.dec(_f$ip), deviceInfo: data.dec(_f$deviceInfo));
}
@override
@@ -63,71 +56,49 @@ class WebSendSessionMapper extends ClassMapperBase<WebSendSession> {
mixin WebSendSessionMappable {
String serialize() {
return WebSendSessionMapper.ensureInitialized()
.encodeJson<WebSendSession>(this as WebSendSession);
return WebSendSessionMapper.ensureInitialized().encodeJson<WebSendSession>(this as WebSendSession);
}
Map<String, dynamic> toJson() {
return WebSendSessionMapper.ensureInitialized()
.encodeMap<WebSendSession>(this as WebSendSession);
return WebSendSessionMapper.ensureInitialized().encodeMap<WebSendSession>(this as WebSendSession);
}
WebSendSessionCopyWith<WebSendSession, WebSendSession, WebSendSession>
get copyWith => _WebSendSessionCopyWithImpl(
this as WebSendSession, $identity, $identity);
WebSendSessionCopyWith<WebSendSession, WebSendSession, WebSendSession> get copyWith =>
_WebSendSessionCopyWithImpl(this as WebSendSession, $identity, $identity);
@override
String toString() {
return WebSendSessionMapper.ensureInitialized()
.stringifyValue(this as WebSendSession);
return WebSendSessionMapper.ensureInitialized().stringifyValue(this as WebSendSession);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
WebSendSessionMapper.ensureInitialized()
.isValueEqual(this as WebSendSession, other));
(runtimeType == other.runtimeType && WebSendSessionMapper.ensureInitialized().isValueEqual(this as WebSendSession, other));
}
@override
int get hashCode {
return WebSendSessionMapper.ensureInitialized()
.hashValue(this as WebSendSession);
return WebSendSessionMapper.ensureInitialized().hashValue(this as WebSendSession);
}
}
extension WebSendSessionValueCopy<$R, $Out>
on ObjectCopyWith<$R, WebSendSession, $Out> {
WebSendSessionCopyWith<$R, WebSendSession, $Out> get $asWebSendSession =>
$base.as((v, t, t2) => _WebSendSessionCopyWithImpl(v, t, t2));
extension WebSendSessionValueCopy<$R, $Out> on ObjectCopyWith<$R, WebSendSession, $Out> {
WebSendSessionCopyWith<$R, WebSendSession, $Out> get $asWebSendSession => $base.as((v, t, t2) => _WebSendSessionCopyWithImpl(v, t, t2));
}
abstract class WebSendSessionCopyWith<$R, $In extends WebSendSession, $Out>
implements ClassCopyWith<$R, $In, $Out> {
$R call(
{String? sessionId,
StreamController<bool>? responseHandler,
String? ip,
String? deviceInfo});
WebSendSessionCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t);
abstract class WebSendSessionCopyWith<$R, $In extends WebSendSession, $Out> implements ClassCopyWith<$R, $In, $Out> {
$R call({String? sessionId, StreamController<bool>? responseHandler, String? ip, String? deviceInfo});
WebSendSessionCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _WebSendSessionCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, WebSendSession, $Out>
class _WebSendSessionCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, WebSendSession, $Out>
implements WebSendSessionCopyWith<$R, WebSendSession, $Out> {
_WebSendSessionCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<WebSendSession> $mapper =
WebSendSessionMapper.ensureInitialized();
late final ClassMapperBase<WebSendSession> $mapper = WebSendSessionMapper.ensureInitialized();
@override
$R call(
{String? sessionId,
Object? responseHandler = $none,
String? ip,
String? deviceInfo}) =>
$apply(FieldCopyWithData({
$R call({String? sessionId, Object? responseHandler = $none, String? ip, String? deviceInfo}) => $apply(FieldCopyWithData({
if (sessionId != null) #sessionId: sessionId,
if (responseHandler != $none) #responseHandler: responseHandler,
if (ip != null) #ip: ip,
@@ -141,7 +112,5 @@ class _WebSendSessionCopyWithImpl<$R, $Out>
deviceInfo: data.get(#deviceInfo, or: $value.deviceInfo));
@override
WebSendSessionCopyWith<$R2, WebSendSession, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_WebSendSessionCopyWithImpl($value, $cast, t);
WebSendSessionCopyWith<$R2, WebSendSession, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _WebSendSessionCopyWithImpl($value, $cast, t);
}
@@ -23,14 +23,11 @@ class WebSendStateMapper extends ClassMapperBase<WebSendState> {
final String id = 'WebSendState';
static Map<String, WebSendSession> _$sessions(WebSendState v) => v.sessions;
static const Field<WebSendState, Map<String, WebSendSession>> _f$sessions =
Field('sessions', _$sessions);
static const Field<WebSendState, Map<String, WebSendSession>> _f$sessions = Field('sessions', _$sessions);
static Map<String, WebSendFile> _$files(WebSendState v) => v.files;
static const Field<WebSendState, Map<String, WebSendFile>> _f$files =
Field('files', _$files);
static const Field<WebSendState, Map<String, WebSendFile>> _f$files = Field('files', _$files);
static bool _$autoAccept(WebSendState v) => v.autoAccept;
static const Field<WebSendState, bool> _f$autoAccept =
Field('autoAccept', _$autoAccept);
static const Field<WebSendState, bool> _f$autoAccept = Field('autoAccept', _$autoAccept);
@override
final Map<Symbol, Field<WebSendState, dynamic>> fields = const {
@@ -40,10 +37,7 @@ class WebSendStateMapper extends ClassMapperBase<WebSendState> {
};
static WebSendState _instantiate(DecodingData data) {
return WebSendState(
sessions: data.dec(_f$sessions),
files: data.dec(_f$files),
autoAccept: data.dec(_f$autoAccept));
return WebSendState(sessions: data.dec(_f$sessions), files: data.dec(_f$files), autoAccept: data.dec(_f$autoAccept));
}
@override
@@ -60,85 +54,57 @@ class WebSendStateMapper extends ClassMapperBase<WebSendState> {
mixin WebSendStateMappable {
String serialize() {
return WebSendStateMapper.ensureInitialized()
.encodeJson<WebSendState>(this as WebSendState);
return WebSendStateMapper.ensureInitialized().encodeJson<WebSendState>(this as WebSendState);
}
Map<String, dynamic> toJson() {
return WebSendStateMapper.ensureInitialized()
.encodeMap<WebSendState>(this as WebSendState);
return WebSendStateMapper.ensureInitialized().encodeMap<WebSendState>(this as WebSendState);
}
WebSendStateCopyWith<WebSendState, WebSendState, WebSendState> get copyWith =>
_WebSendStateCopyWithImpl(this as WebSendState, $identity, $identity);
@override
String toString() {
return WebSendStateMapper.ensureInitialized()
.stringifyValue(this as WebSendState);
return WebSendStateMapper.ensureInitialized().stringifyValue(this as WebSendState);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
WebSendStateMapper.ensureInitialized()
.isValueEqual(this as WebSendState, other));
(runtimeType == other.runtimeType && WebSendStateMapper.ensureInitialized().isValueEqual(this as WebSendState, other));
}
@override
int get hashCode {
return WebSendStateMapper.ensureInitialized()
.hashValue(this as WebSendState);
return WebSendStateMapper.ensureInitialized().hashValue(this as WebSendState);
}
}
extension WebSendStateValueCopy<$R, $Out>
on ObjectCopyWith<$R, WebSendState, $Out> {
WebSendStateCopyWith<$R, WebSendState, $Out> get $asWebSendState =>
$base.as((v, t, t2) => _WebSendStateCopyWithImpl(v, t, t2));
extension WebSendStateValueCopy<$R, $Out> on ObjectCopyWith<$R, WebSendState, $Out> {
WebSendStateCopyWith<$R, WebSendState, $Out> get $asWebSendState => $base.as((v, t, t2) => _WebSendStateCopyWithImpl(v, t, t2));
}
abstract class WebSendStateCopyWith<$R, $In extends WebSendState, $Out>
implements ClassCopyWith<$R, $In, $Out> {
MapCopyWith<$R, String, WebSendSession,
WebSendSessionCopyWith<$R, WebSendSession, WebSendSession>> get sessions;
MapCopyWith<$R, String, WebSendFile,
WebSendFileCopyWith<$R, WebSendFile, WebSendFile>> get files;
$R call(
{Map<String, WebSendSession>? sessions,
Map<String, WebSendFile>? files,
bool? autoAccept});
abstract class WebSendStateCopyWith<$R, $In extends WebSendState, $Out> implements ClassCopyWith<$R, $In, $Out> {
MapCopyWith<$R, String, WebSendSession, WebSendSessionCopyWith<$R, WebSendSession, WebSendSession>> get sessions;
MapCopyWith<$R, String, WebSendFile, WebSendFileCopyWith<$R, WebSendFile, WebSendFile>> get files;
$R call({Map<String, WebSendSession>? sessions, Map<String, WebSendFile>? files, bool? autoAccept});
WebSendStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _WebSendStateCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, WebSendState, $Out>
implements WebSendStateCopyWith<$R, WebSendState, $Out> {
class _WebSendStateCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, WebSendState, $Out> implements WebSendStateCopyWith<$R, WebSendState, $Out> {
_WebSendStateCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<WebSendState> $mapper =
WebSendStateMapper.ensureInitialized();
late final ClassMapperBase<WebSendState> $mapper = WebSendStateMapper.ensureInitialized();
@override
MapCopyWith<$R, String, WebSendSession,
WebSendSessionCopyWith<$R, WebSendSession, WebSendSession>>
get sessions => MapCopyWith($value.sessions,
(v, t) => v.copyWith.$chain(t), (v) => call(sessions: v));
MapCopyWith<$R, String, WebSendSession, WebSendSessionCopyWith<$R, WebSendSession, WebSendSession>> get sessions =>
MapCopyWith($value.sessions, (v, t) => v.copyWith.$chain(t), (v) => call(sessions: v));
@override
MapCopyWith<$R, String, WebSendFile,
WebSendFileCopyWith<$R, WebSendFile, WebSendFile>>
get files => MapCopyWith(
$value.files, (v, t) => v.copyWith.$chain(t), (v) => call(files: v));
MapCopyWith<$R, String, WebSendFile, WebSendFileCopyWith<$R, WebSendFile, WebSendFile>> get files =>
MapCopyWith($value.files, (v, t) => v.copyWith.$chain(t), (v) => call(files: v));
@override
$R call(
{Map<String, WebSendSession>? sessions,
Map<String, WebSendFile>? files,
bool? autoAccept}) =>
$apply(FieldCopyWithData({
if (sessions != null) #sessions: sessions,
if (files != null) #files: files,
if (autoAccept != null) #autoAccept: autoAccept
}));
$R call({Map<String, WebSendSession>? sessions, Map<String, WebSendFile>? files, bool? autoAccept}) => $apply(FieldCopyWithData(
{if (sessions != null) #sessions: sessions, if (files != null) #files: files, if (autoAccept != null) #autoAccept: autoAccept}));
@override
WebSendState $make(CopyWithData data) => WebSendState(
sessions: data.get(#sessions, or: $value.sessions),
@@ -146,7 +112,5 @@ class _WebSendStateCopyWithImpl<$R, $Out>
autoAccept: data.get(#autoAccept, or: $value.autoAccept));
@override
WebSendStateCopyWith<$R2, WebSendState, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_WebSendStateCopyWithImpl($value, $cast, t);
WebSendStateCopyWith<$R2, WebSendState, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _WebSendStateCopyWithImpl($value, $cast, t);
}
@@ -23,39 +23,25 @@ class ReceiveSessionStateMapper extends ClassMapperBase<ReceiveSessionState> {
final String id = 'ReceiveSessionState';
static String _$sessionId(ReceiveSessionState v) => v.sessionId;
static const Field<ReceiveSessionState, String> _f$sessionId =
Field('sessionId', _$sessionId);
static const Field<ReceiveSessionState, String> _f$sessionId = Field('sessionId', _$sessionId);
static SessionStatus _$status(ReceiveSessionState v) => v.status;
static const Field<ReceiveSessionState, SessionStatus> _f$status =
Field('status', _$status);
static const Field<ReceiveSessionState, SessionStatus> _f$status = Field('status', _$status);
static Device _$sender(ReceiveSessionState v) => v.sender;
static const Field<ReceiveSessionState, Device> _f$sender =
Field('sender', _$sender);
static const Field<ReceiveSessionState, Device> _f$sender = Field('sender', _$sender);
static String _$senderAlias(ReceiveSessionState v) => v.senderAlias;
static const Field<ReceiveSessionState, String> _f$senderAlias =
Field('senderAlias', _$senderAlias);
static const Field<ReceiveSessionState, String> _f$senderAlias = Field('senderAlias', _$senderAlias);
static Map<String, ReceivingFile> _$files(ReceiveSessionState v) => v.files;
static const Field<ReceiveSessionState, Map<String, ReceivingFile>> _f$files =
Field('files', _$files);
static const Field<ReceiveSessionState, Map<String, ReceivingFile>> _f$files = Field('files', _$files);
static int? _$startTime(ReceiveSessionState v) => v.startTime;
static const Field<ReceiveSessionState, int> _f$startTime =
Field('startTime', _$startTime);
static const Field<ReceiveSessionState, int> _f$startTime = Field('startTime', _$startTime);
static int? _$endTime(ReceiveSessionState v) => v.endTime;
static const Field<ReceiveSessionState, int> _f$endTime =
Field('endTime', _$endTime);
static String _$destinationDirectory(ReceiveSessionState v) =>
v.destinationDirectory;
static const Field<ReceiveSessionState, String> _f$destinationDirectory =
Field('destinationDirectory', _$destinationDirectory);
static const Field<ReceiveSessionState, int> _f$endTime = Field('endTime', _$endTime);
static String _$destinationDirectory(ReceiveSessionState v) => v.destinationDirectory;
static const Field<ReceiveSessionState, String> _f$destinationDirectory = Field('destinationDirectory', _$destinationDirectory);
static bool _$saveToGallery(ReceiveSessionState v) => v.saveToGallery;
static const Field<ReceiveSessionState, bool> _f$saveToGallery =
Field('saveToGallery', _$saveToGallery);
static StreamController<Map<String, String>?>? _$responseHandler(
ReceiveSessionState v) =>
v.responseHandler;
static const Field<ReceiveSessionState,
StreamController<Map<String, String>?>> _f$responseHandler =
Field('responseHandler', _$responseHandler);
static const Field<ReceiveSessionState, bool> _f$saveToGallery = Field('saveToGallery', _$saveToGallery);
static StreamController<Map<String, String>?>? _$responseHandler(ReceiveSessionState v) => v.responseHandler;
static const Field<ReceiveSessionState, StreamController<Map<String, String>?>> _f$responseHandler = Field('responseHandler', _$responseHandler);
@override
final Map<Symbol, Field<ReceiveSessionState, dynamic>> fields = const {
@@ -99,52 +85,40 @@ class ReceiveSessionStateMapper extends ClassMapperBase<ReceiveSessionState> {
mixin ReceiveSessionStateMappable {
String serialize() {
return ReceiveSessionStateMapper.ensureInitialized()
.encodeJson<ReceiveSessionState>(this as ReceiveSessionState);
return ReceiveSessionStateMapper.ensureInitialized().encodeJson<ReceiveSessionState>(this as ReceiveSessionState);
}
Map<String, dynamic> toJson() {
return ReceiveSessionStateMapper.ensureInitialized()
.encodeMap<ReceiveSessionState>(this as ReceiveSessionState);
return ReceiveSessionStateMapper.ensureInitialized().encodeMap<ReceiveSessionState>(this as ReceiveSessionState);
}
ReceiveSessionStateCopyWith<ReceiveSessionState, ReceiveSessionState,
ReceiveSessionState>
get copyWith => _ReceiveSessionStateCopyWithImpl(
this as ReceiveSessionState, $identity, $identity);
ReceiveSessionStateCopyWith<ReceiveSessionState, ReceiveSessionState, ReceiveSessionState> get copyWith =>
_ReceiveSessionStateCopyWithImpl(this as ReceiveSessionState, $identity, $identity);
@override
String toString() {
return ReceiveSessionStateMapper.ensureInitialized()
.stringifyValue(this as ReceiveSessionState);
return ReceiveSessionStateMapper.ensureInitialized().stringifyValue(this as ReceiveSessionState);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
ReceiveSessionStateMapper.ensureInitialized()
.isValueEqual(this as ReceiveSessionState, other));
(runtimeType == other.runtimeType && ReceiveSessionStateMapper.ensureInitialized().isValueEqual(this as ReceiveSessionState, other));
}
@override
int get hashCode {
return ReceiveSessionStateMapper.ensureInitialized()
.hashValue(this as ReceiveSessionState);
return ReceiveSessionStateMapper.ensureInitialized().hashValue(this as ReceiveSessionState);
}
}
extension ReceiveSessionStateValueCopy<$R, $Out>
on ObjectCopyWith<$R, ReceiveSessionState, $Out> {
ReceiveSessionStateCopyWith<$R, ReceiveSessionState, $Out>
get $asReceiveSessionState =>
$base.as((v, t, t2) => _ReceiveSessionStateCopyWithImpl(v, t, t2));
extension ReceiveSessionStateValueCopy<$R, $Out> on ObjectCopyWith<$R, ReceiveSessionState, $Out> {
ReceiveSessionStateCopyWith<$R, ReceiveSessionState, $Out> get $asReceiveSessionState =>
$base.as((v, t, t2) => _ReceiveSessionStateCopyWithImpl(v, t, t2));
}
abstract class ReceiveSessionStateCopyWith<$R, $In extends ReceiveSessionState,
$Out> implements ClassCopyWith<$R, $In, $Out> {
abstract class ReceiveSessionStateCopyWith<$R, $In extends ReceiveSessionState, $Out> implements ClassCopyWith<$R, $In, $Out> {
DeviceCopyWith<$R, Device, Device> get sender;
MapCopyWith<$R, String, ReceivingFile,
ReceivingFileCopyWith<$R, ReceivingFile, ReceivingFile>> get files;
MapCopyWith<$R, String, ReceivingFile, ReceivingFileCopyWith<$R, ReceivingFile, ReceivingFile>> get files;
$R call(
{String? sessionId,
SessionStatus? status,
@@ -156,26 +130,20 @@ abstract class ReceiveSessionStateCopyWith<$R, $In extends ReceiveSessionState,
String? destinationDirectory,
bool? saveToGallery,
StreamController<Map<String, String>?>? responseHandler});
ReceiveSessionStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t);
ReceiveSessionStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _ReceiveSessionStateCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, ReceiveSessionState, $Out>
class _ReceiveSessionStateCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, ReceiveSessionState, $Out>
implements ReceiveSessionStateCopyWith<$R, ReceiveSessionState, $Out> {
_ReceiveSessionStateCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<ReceiveSessionState> $mapper =
ReceiveSessionStateMapper.ensureInitialized();
late final ClassMapperBase<ReceiveSessionState> $mapper = ReceiveSessionStateMapper.ensureInitialized();
@override
DeviceCopyWith<$R, Device, Device> get sender =>
$value.sender.copyWith.$chain((v) => call(sender: v));
DeviceCopyWith<$R, Device, Device> get sender => $value.sender.copyWith.$chain((v) => call(sender: v));
@override
MapCopyWith<$R, String, ReceivingFile,
ReceivingFileCopyWith<$R, ReceivingFile, ReceivingFile>>
get files => MapCopyWith(
$value.files, (v, t) => v.copyWith.$chain(t), (v) => call(files: v));
MapCopyWith<$R, String, ReceivingFile, ReceivingFileCopyWith<$R, ReceivingFile, ReceivingFile>> get files =>
MapCopyWith($value.files, (v, t) => v.copyWith.$chain(t), (v) => call(files: v));
@override
$R call(
{String? sessionId,
@@ -196,8 +164,7 @@ class _ReceiveSessionStateCopyWithImpl<$R, $Out>
if (files != null) #files: files,
if (startTime != $none) #startTime: startTime,
if (endTime != $none) #endTime: endTime,
if (destinationDirectory != null)
#destinationDirectory: destinationDirectory,
if (destinationDirectory != null) #destinationDirectory: destinationDirectory,
if (saveToGallery != null) #saveToGallery: saveToGallery,
if (responseHandler != $none) #responseHandler: responseHandler
}));
@@ -210,13 +177,11 @@ class _ReceiveSessionStateCopyWithImpl<$R, $Out>
files: data.get(#files, or: $value.files),
startTime: data.get(#startTime, or: $value.startTime),
endTime: data.get(#endTime, or: $value.endTime),
destinationDirectory:
data.get(#destinationDirectory, or: $value.destinationDirectory),
destinationDirectory: data.get(#destinationDirectory, or: $value.destinationDirectory),
saveToGallery: data.get(#saveToGallery, or: $value.saveToGallery),
responseHandler: data.get(#responseHandler, or: $value.responseHandler));
@override
ReceiveSessionStateCopyWith<$R2, ReceiveSessionState, $Out2>
$chain<$R2, $Out2>(Then<$Out2, $R2> t) =>
_ReceiveSessionStateCopyWithImpl($value, $cast, t);
ReceiveSessionStateCopyWith<$R2, ReceiveSessionState, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) =>
_ReceiveSessionStateCopyWithImpl($value, $cast, t);
}
@@ -23,21 +23,17 @@ class ReceivingFileMapper extends ClassMapperBase<ReceivingFile> {
static FileDto _$file(ReceivingFile v) => v.file;
static const Field<ReceivingFile, FileDto> _f$file = Field('file', _$file);
static FileStatus _$status(ReceivingFile v) => v.status;
static const Field<ReceivingFile, FileStatus> _f$status =
Field('status', _$status);
static const Field<ReceivingFile, FileStatus> _f$status = Field('status', _$status);
static String? _$token(ReceivingFile v) => v.token;
static const Field<ReceivingFile, String> _f$token = Field('token', _$token);
static String? _$desiredName(ReceivingFile v) => v.desiredName;
static const Field<ReceivingFile, String> _f$desiredName =
Field('desiredName', _$desiredName);
static const Field<ReceivingFile, String> _f$desiredName = Field('desiredName', _$desiredName);
static String? _$path(ReceivingFile v) => v.path;
static const Field<ReceivingFile, String> _f$path = Field('path', _$path);
static bool _$savedToGallery(ReceivingFile v) => v.savedToGallery;
static const Field<ReceivingFile, bool> _f$savedToGallery =
Field('savedToGallery', _$savedToGallery);
static const Field<ReceivingFile, bool> _f$savedToGallery = Field('savedToGallery', _$savedToGallery);
static String? _$errorMessage(ReceivingFile v) => v.errorMessage;
static const Field<ReceivingFile, String> _f$errorMessage =
Field('errorMessage', _$errorMessage);
static const Field<ReceivingFile, String> _f$errorMessage = Field('errorMessage', _$errorMessage);
@override
final Map<Symbol, Field<ReceivingFile, dynamic>> fields = const {
@@ -75,66 +71,47 @@ class ReceivingFileMapper extends ClassMapperBase<ReceivingFile> {
mixin ReceivingFileMappable {
String serialize() {
return ReceivingFileMapper.ensureInitialized()
.encodeJson<ReceivingFile>(this as ReceivingFile);
return ReceivingFileMapper.ensureInitialized().encodeJson<ReceivingFile>(this as ReceivingFile);
}
Map<String, dynamic> toJson() {
return ReceivingFileMapper.ensureInitialized()
.encodeMap<ReceivingFile>(this as ReceivingFile);
return ReceivingFileMapper.ensureInitialized().encodeMap<ReceivingFile>(this as ReceivingFile);
}
ReceivingFileCopyWith<ReceivingFile, ReceivingFile, ReceivingFile>
get copyWith => _ReceivingFileCopyWithImpl(
this as ReceivingFile, $identity, $identity);
ReceivingFileCopyWith<ReceivingFile, ReceivingFile, ReceivingFile> get copyWith =>
_ReceivingFileCopyWithImpl(this as ReceivingFile, $identity, $identity);
@override
String toString() {
return ReceivingFileMapper.ensureInitialized()
.stringifyValue(this as ReceivingFile);
return ReceivingFileMapper.ensureInitialized().stringifyValue(this as ReceivingFile);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
ReceivingFileMapper.ensureInitialized()
.isValueEqual(this as ReceivingFile, other));
(runtimeType == other.runtimeType && ReceivingFileMapper.ensureInitialized().isValueEqual(this as ReceivingFile, other));
}
@override
int get hashCode {
return ReceivingFileMapper.ensureInitialized()
.hashValue(this as ReceivingFile);
return ReceivingFileMapper.ensureInitialized().hashValue(this as ReceivingFile);
}
}
extension ReceivingFileValueCopy<$R, $Out>
on ObjectCopyWith<$R, ReceivingFile, $Out> {
ReceivingFileCopyWith<$R, ReceivingFile, $Out> get $asReceivingFile =>
$base.as((v, t, t2) => _ReceivingFileCopyWithImpl(v, t, t2));
extension ReceivingFileValueCopy<$R, $Out> on ObjectCopyWith<$R, ReceivingFile, $Out> {
ReceivingFileCopyWith<$R, ReceivingFile, $Out> get $asReceivingFile => $base.as((v, t, t2) => _ReceivingFileCopyWithImpl(v, t, t2));
}
abstract class ReceivingFileCopyWith<$R, $In extends ReceivingFile, $Out>
implements ClassCopyWith<$R, $In, $Out> {
$R call(
{FileDto? file,
FileStatus? status,
String? token,
String? desiredName,
String? path,
bool? savedToGallery,
String? errorMessage});
abstract class ReceivingFileCopyWith<$R, $In extends ReceivingFile, $Out> implements ClassCopyWith<$R, $In, $Out> {
$R call({FileDto? file, FileStatus? status, String? token, String? desiredName, String? path, bool? savedToGallery, String? errorMessage});
ReceivingFileCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _ReceivingFileCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, ReceivingFile, $Out>
class _ReceivingFileCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, ReceivingFile, $Out>
implements ReceivingFileCopyWith<$R, ReceivingFile, $Out> {
_ReceivingFileCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<ReceivingFile> $mapper =
ReceivingFileMapper.ensureInitialized();
late final ClassMapperBase<ReceivingFile> $mapper = ReceivingFileMapper.ensureInitialized();
@override
$R call(
{FileDto? file,
@@ -164,7 +141,5 @@ class _ReceivingFileCopyWithImpl<$R, $Out>
errorMessage: data.get(#errorMessage, or: $value.errorMessage));
@override
ReceivingFileCopyWith<$R2, ReceivingFile, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_ReceivingFileCopyWithImpl($value, $cast, t);
ReceivingFileCopyWith<$R2, ReceivingFile, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _ReceivingFileCopyWithImpl($value, $cast, t);
}
@@ -23,8 +23,7 @@ class ServerStateMapper extends ClassMapperBase<ServerState> {
final String id = 'ServerState';
static HttpServer _$httpServer(ServerState v) => v.httpServer;
static const Field<ServerState, HttpServer> _f$httpServer =
Field('httpServer', _$httpServer);
static const Field<ServerState, HttpServer> _f$httpServer = Field('httpServer', _$httpServer);
static String _$alias(ServerState v) => v.alias;
static const Field<ServerState, String> _f$alias = Field('alias', _$alias);
static int _$port(ServerState v) => v.port;
@@ -32,11 +31,9 @@ class ServerStateMapper extends ClassMapperBase<ServerState> {
static bool _$https(ServerState v) => v.https;
static const Field<ServerState, bool> _f$https = Field('https', _$https);
static ReceiveSessionState? _$session(ServerState v) => v.session;
static const Field<ServerState, ReceiveSessionState> _f$session =
Field('session', _$session);
static const Field<ServerState, ReceiveSessionState> _f$session = Field('session', _$session);
static WebSendState? _$webSendState(ServerState v) => v.webSendState;
static const Field<ServerState, WebSendState> _f$webSendState =
Field('webSendState', _$webSendState);
static const Field<ServerState, WebSendState> _f$webSendState = Field('webSendState', _$webSendState);
@override
final Map<Symbol, Field<ServerState, dynamic>> fields = const {
@@ -72,29 +69,23 @@ class ServerStateMapper extends ClassMapperBase<ServerState> {
mixin ServerStateMappable {
String serialize() {
return ServerStateMapper.ensureInitialized()
.encodeJson<ServerState>(this as ServerState);
return ServerStateMapper.ensureInitialized().encodeJson<ServerState>(this as ServerState);
}
Map<String, dynamic> toJson() {
return ServerStateMapper.ensureInitialized()
.encodeMap<ServerState>(this as ServerState);
return ServerStateMapper.ensureInitialized().encodeMap<ServerState>(this as ServerState);
}
ServerStateCopyWith<ServerState, ServerState, ServerState> get copyWith =>
_ServerStateCopyWithImpl(this as ServerState, $identity, $identity);
ServerStateCopyWith<ServerState, ServerState, ServerState> get copyWith => _ServerStateCopyWithImpl(this as ServerState, $identity, $identity);
@override
String toString() {
return ServerStateMapper.ensureInitialized()
.stringifyValue(this as ServerState);
return ServerStateMapper.ensureInitialized().stringifyValue(this as ServerState);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
ServerStateMapper.ensureInitialized()
.isValueEqual(this as ServerState, other));
(runtimeType == other.runtimeType && ServerStateMapper.ensureInitialized().isValueEqual(this as ServerState, other));
}
@override
@@ -103,49 +94,28 @@ mixin ServerStateMappable {
}
}
extension ServerStateValueCopy<$R, $Out>
on ObjectCopyWith<$R, ServerState, $Out> {
ServerStateCopyWith<$R, ServerState, $Out> get $asServerState =>
$base.as((v, t, t2) => _ServerStateCopyWithImpl(v, t, t2));
extension ServerStateValueCopy<$R, $Out> on ObjectCopyWith<$R, ServerState, $Out> {
ServerStateCopyWith<$R, ServerState, $Out> get $asServerState => $base.as((v, t, t2) => _ServerStateCopyWithImpl(v, t, t2));
}
abstract class ServerStateCopyWith<$R, $In extends ServerState, $Out>
implements ClassCopyWith<$R, $In, $Out> {
ReceiveSessionStateCopyWith<$R, ReceiveSessionState, ReceiveSessionState>?
get session;
abstract class ServerStateCopyWith<$R, $In extends ServerState, $Out> implements ClassCopyWith<$R, $In, $Out> {
ReceiveSessionStateCopyWith<$R, ReceiveSessionState, ReceiveSessionState>? get session;
WebSendStateCopyWith<$R, WebSendState, WebSendState>? get webSendState;
$R call(
{HttpServer? httpServer,
String? alias,
int? port,
bool? https,
ReceiveSessionState? session,
WebSendState? webSendState});
$R call({HttpServer? httpServer, String? alias, int? port, bool? https, ReceiveSessionState? session, WebSendState? webSendState});
ServerStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _ServerStateCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, ServerState, $Out>
implements ServerStateCopyWith<$R, ServerState, $Out> {
class _ServerStateCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, ServerState, $Out> implements ServerStateCopyWith<$R, ServerState, $Out> {
_ServerStateCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<ServerState> $mapper =
ServerStateMapper.ensureInitialized();
late final ClassMapperBase<ServerState> $mapper = ServerStateMapper.ensureInitialized();
@override
ReceiveSessionStateCopyWith<$R, ReceiveSessionState, ReceiveSessionState>?
get session => $value.session?.copyWith.$chain((v) => call(session: v));
ReceiveSessionStateCopyWith<$R, ReceiveSessionState, ReceiveSessionState>? get session => $value.session?.copyWith.$chain((v) => call(session: v));
@override
WebSendStateCopyWith<$R, WebSendState, WebSendState>? get webSendState =>
$value.webSendState?.copyWith.$chain((v) => call(webSendState: v));
WebSendStateCopyWith<$R, WebSendState, WebSendState>? get webSendState => $value.webSendState?.copyWith.$chain((v) => call(webSendState: v));
@override
$R call(
{HttpServer? httpServer,
String? alias,
int? port,
bool? https,
Object? session = $none,
Object? webSendState = $none}) =>
$R call({HttpServer? httpServer, String? alias, int? port, bool? https, Object? session = $none, Object? webSendState = $none}) =>
$apply(FieldCopyWithData({
if (httpServer != null) #httpServer: httpServer,
if (alias != null) #alias: alias,
@@ -164,7 +134,5 @@ class _ServerStateCopyWithImpl<$R, $Out>
webSendState: data.get(#webSendState, or: $value.webSendState));
@override
ServerStateCopyWith<$R2, ServerState, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_ServerStateCopyWithImpl($value, $cast, t);
ServerStateCopyWith<$R2, ServerState, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _ServerStateCopyWithImpl($value, $cast, t);
}
+41 -83
View File
@@ -22,70 +22,49 @@ class SettingsStateMapper extends ClassMapperBase<SettingsState> {
final String id = 'SettingsState';
static String _$showToken(SettingsState v) => v.showToken;
static const Field<SettingsState, String> _f$showToken =
Field('showToken', _$showToken);
static const Field<SettingsState, String> _f$showToken = Field('showToken', _$showToken);
static String _$alias(SettingsState v) => v.alias;
static const Field<SettingsState, String> _f$alias = Field('alias', _$alias);
static ThemeMode _$theme(SettingsState v) => v.theme;
static const Field<SettingsState, ThemeMode> _f$theme =
Field('theme', _$theme);
static const Field<SettingsState, ThemeMode> _f$theme = Field('theme', _$theme);
static ColorMode _$colorMode(SettingsState v) => v.colorMode;
static const Field<SettingsState, ColorMode> _f$colorMode =
Field('colorMode', _$colorMode);
static const Field<SettingsState, ColorMode> _f$colorMode = Field('colorMode', _$colorMode);
static AppLocale? _$locale(SettingsState v) => v.locale;
static const Field<SettingsState, AppLocale> _f$locale =
Field('locale', _$locale);
static const Field<SettingsState, AppLocale> _f$locale = Field('locale', _$locale);
static int _$port(SettingsState v) => v.port;
static const Field<SettingsState, int> _f$port = Field('port', _$port);
static String _$multicastGroup(SettingsState v) => v.multicastGroup;
static const Field<SettingsState, String> _f$multicastGroup =
Field('multicastGroup', _$multicastGroup);
static const Field<SettingsState, String> _f$multicastGroup = Field('multicastGroup', _$multicastGroup);
static String? _$destination(SettingsState v) => v.destination;
static const Field<SettingsState, String> _f$destination =
Field('destination', _$destination);
static const Field<SettingsState, String> _f$destination = Field('destination', _$destination);
static bool _$saveToGallery(SettingsState v) => v.saveToGallery;
static const Field<SettingsState, bool> _f$saveToGallery =
Field('saveToGallery', _$saveToGallery);
static const Field<SettingsState, bool> _f$saveToGallery = Field('saveToGallery', _$saveToGallery);
static bool _$saveToHistory(SettingsState v) => v.saveToHistory;
static const Field<SettingsState, bool> _f$saveToHistory =
Field('saveToHistory', _$saveToHistory);
static const Field<SettingsState, bool> _f$saveToHistory = Field('saveToHistory', _$saveToHistory);
static bool _$quickSave(SettingsState v) => v.quickSave;
static const Field<SettingsState, bool> _f$quickSave =
Field('quickSave', _$quickSave);
static const Field<SettingsState, bool> _f$quickSave = Field('quickSave', _$quickSave);
static bool _$autoFinish(SettingsState v) => v.autoFinish;
static const Field<SettingsState, bool> _f$autoFinish =
Field('autoFinish', _$autoFinish);
static const Field<SettingsState, bool> _f$autoFinish = Field('autoFinish', _$autoFinish);
static bool _$minimizeToTray(SettingsState v) => v.minimizeToTray;
static const Field<SettingsState, bool> _f$minimizeToTray =
Field('minimizeToTray', _$minimizeToTray);
static const Field<SettingsState, bool> _f$minimizeToTray = Field('minimizeToTray', _$minimizeToTray);
static bool _$launchAtStartup(SettingsState v) => v.launchAtStartup;
static const Field<SettingsState, bool> _f$launchAtStartup =
Field('launchAtStartup', _$launchAtStartup);
static bool _$autoStartLaunchMinimized(SettingsState v) =>
v.autoStartLaunchMinimized;
static const Field<SettingsState, bool> _f$autoStartLaunchMinimized =
Field('autoStartLaunchMinimized', _$autoStartLaunchMinimized);
static const Field<SettingsState, bool> _f$launchAtStartup = Field('launchAtStartup', _$launchAtStartup);
static bool _$autoStartLaunchMinimized(SettingsState v) => v.autoStartLaunchMinimized;
static const Field<SettingsState, bool> _f$autoStartLaunchMinimized = Field('autoStartLaunchMinimized', _$autoStartLaunchMinimized);
static bool _$https(SettingsState v) => v.https;
static const Field<SettingsState, bool> _f$https = Field('https', _$https);
static SendMode _$sendMode(SettingsState v) => v.sendMode;
static const Field<SettingsState, SendMode> _f$sendMode =
Field('sendMode', _$sendMode);
static const Field<SettingsState, SendMode> _f$sendMode = Field('sendMode', _$sendMode);
static bool _$saveWindowPlacement(SettingsState v) => v.saveWindowPlacement;
static const Field<SettingsState, bool> _f$saveWindowPlacement =
Field('saveWindowPlacement', _$saveWindowPlacement);
static const Field<SettingsState, bool> _f$saveWindowPlacement = Field('saveWindowPlacement', _$saveWindowPlacement);
static bool _$enableAnimations(SettingsState v) => v.enableAnimations;
static const Field<SettingsState, bool> _f$enableAnimations =
Field('enableAnimations', _$enableAnimations);
static const Field<SettingsState, bool> _f$enableAnimations = Field('enableAnimations', _$enableAnimations);
static DeviceType? _$deviceType(SettingsState v) => v.deviceType;
static const Field<SettingsState, DeviceType> _f$deviceType =
Field('deviceType', _$deviceType);
static const Field<SettingsState, DeviceType> _f$deviceType = Field('deviceType', _$deviceType);
static String? _$deviceModel(SettingsState v) => v.deviceModel;
static const Field<SettingsState, String> _f$deviceModel =
Field('deviceModel', _$deviceModel);
static bool _$shareViaLinkAutoAccept(SettingsState v) =>
v.shareViaLinkAutoAccept;
static const Field<SettingsState, bool> _f$shareViaLinkAutoAccept =
Field('shareViaLinkAutoAccept', _$shareViaLinkAutoAccept);
static const Field<SettingsState, String> _f$deviceModel = Field('deviceModel', _$deviceModel);
static bool _$shareViaLinkAutoAccept(SettingsState v) => v.shareViaLinkAutoAccept;
static const Field<SettingsState, bool> _f$shareViaLinkAutoAccept = Field('shareViaLinkAutoAccept', _$shareViaLinkAutoAccept);
@override
final Map<Symbol, Field<SettingsState, dynamic>> fields = const {
@@ -153,47 +132,37 @@ class SettingsStateMapper extends ClassMapperBase<SettingsState> {
mixin SettingsStateMappable {
String serialize() {
return SettingsStateMapper.ensureInitialized()
.encodeJson<SettingsState>(this as SettingsState);
return SettingsStateMapper.ensureInitialized().encodeJson<SettingsState>(this as SettingsState);
}
Map<String, dynamic> toJson() {
return SettingsStateMapper.ensureInitialized()
.encodeMap<SettingsState>(this as SettingsState);
return SettingsStateMapper.ensureInitialized().encodeMap<SettingsState>(this as SettingsState);
}
SettingsStateCopyWith<SettingsState, SettingsState, SettingsState>
get copyWith => _SettingsStateCopyWithImpl(
this as SettingsState, $identity, $identity);
SettingsStateCopyWith<SettingsState, SettingsState, SettingsState> get copyWith =>
_SettingsStateCopyWithImpl(this as SettingsState, $identity, $identity);
@override
String toString() {
return SettingsStateMapper.ensureInitialized()
.stringifyValue(this as SettingsState);
return SettingsStateMapper.ensureInitialized().stringifyValue(this as SettingsState);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
SettingsStateMapper.ensureInitialized()
.isValueEqual(this as SettingsState, other));
(runtimeType == other.runtimeType && SettingsStateMapper.ensureInitialized().isValueEqual(this as SettingsState, other));
}
@override
int get hashCode {
return SettingsStateMapper.ensureInitialized()
.hashValue(this as SettingsState);
return SettingsStateMapper.ensureInitialized().hashValue(this as SettingsState);
}
}
extension SettingsStateValueCopy<$R, $Out>
on ObjectCopyWith<$R, SettingsState, $Out> {
SettingsStateCopyWith<$R, SettingsState, $Out> get $asSettingsState =>
$base.as((v, t, t2) => _SettingsStateCopyWithImpl(v, t, t2));
extension SettingsStateValueCopy<$R, $Out> on ObjectCopyWith<$R, SettingsState, $Out> {
SettingsStateCopyWith<$R, SettingsState, $Out> get $asSettingsState => $base.as((v, t, t2) => _SettingsStateCopyWithImpl(v, t, t2));
}
abstract class SettingsStateCopyWith<$R, $In extends SettingsState, $Out>
implements ClassCopyWith<$R, $In, $Out> {
abstract class SettingsStateCopyWith<$R, $In extends SettingsState, $Out> implements ClassCopyWith<$R, $In, $Out> {
$R call(
{String? showToken,
String? alias,
@@ -220,14 +189,12 @@ abstract class SettingsStateCopyWith<$R, $In extends SettingsState, $Out>
SettingsStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _SettingsStateCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, SettingsState, $Out>
class _SettingsStateCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, SettingsState, $Out>
implements SettingsStateCopyWith<$R, SettingsState, $Out> {
_SettingsStateCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<SettingsState> $mapper =
SettingsStateMapper.ensureInitialized();
late final ClassMapperBase<SettingsState> $mapper = SettingsStateMapper.ensureInitialized();
@override
$R call(
{String? showToken,
@@ -267,17 +234,14 @@ class _SettingsStateCopyWithImpl<$R, $Out>
if (autoFinish != null) #autoFinish: autoFinish,
if (minimizeToTray != null) #minimizeToTray: minimizeToTray,
if (launchAtStartup != null) #launchAtStartup: launchAtStartup,
if (autoStartLaunchMinimized != null)
#autoStartLaunchMinimized: autoStartLaunchMinimized,
if (autoStartLaunchMinimized != null) #autoStartLaunchMinimized: autoStartLaunchMinimized,
if (https != null) #https: https,
if (sendMode != null) #sendMode: sendMode,
if (saveWindowPlacement != null)
#saveWindowPlacement: saveWindowPlacement,
if (saveWindowPlacement != null) #saveWindowPlacement: saveWindowPlacement,
if (enableAnimations != null) #enableAnimations: enableAnimations,
if (deviceType != $none) #deviceType: deviceType,
if (deviceModel != $none) #deviceModel: deviceModel,
if (shareViaLinkAutoAccept != null)
#shareViaLinkAutoAccept: shareViaLinkAutoAccept
if (shareViaLinkAutoAccept != null) #shareViaLinkAutoAccept: shareViaLinkAutoAccept
}));
@override
SettingsState $make(CopyWithData data) => SettingsState(
@@ -295,21 +259,15 @@ class _SettingsStateCopyWithImpl<$R, $Out>
autoFinish: data.get(#autoFinish, or: $value.autoFinish),
minimizeToTray: data.get(#minimizeToTray, or: $value.minimizeToTray),
launchAtStartup: data.get(#launchAtStartup, or: $value.launchAtStartup),
autoStartLaunchMinimized: data.get(#autoStartLaunchMinimized,
or: $value.autoStartLaunchMinimized),
autoStartLaunchMinimized: data.get(#autoStartLaunchMinimized, or: $value.autoStartLaunchMinimized),
https: data.get(#https, or: $value.https),
sendMode: data.get(#sendMode, or: $value.sendMode),
saveWindowPlacement:
data.get(#saveWindowPlacement, or: $value.saveWindowPlacement),
enableAnimations:
data.get(#enableAnimations, or: $value.enableAnimations),
saveWindowPlacement: data.get(#saveWindowPlacement, or: $value.saveWindowPlacement),
enableAnimations: data.get(#enableAnimations, or: $value.enableAnimations),
deviceType: data.get(#deviceType, or: $value.deviceType),
deviceModel: data.get(#deviceModel, or: $value.deviceModel),
shareViaLinkAutoAccept:
data.get(#shareViaLinkAutoAccept, or: $value.shareViaLinkAutoAccept));
shareViaLinkAutoAccept: data.get(#shareViaLinkAutoAccept, or: $value.shareViaLinkAutoAccept));
@override
SettingsStateCopyWith<$R2, SettingsState, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_SettingsStateCopyWithImpl($value, $cast, t);
SettingsStateCopyWith<$R2, SettingsState, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _SettingsStateCopyWithImpl($value, $cast, t);
}
@@ -41,7 +41,7 @@ class SettingsTabController extends ReduxNotifier<SettingsTabVm> {
}) : _settingsService = settingsService,
_serverService = serverNotifier,
_initialDeviceInfo = initialDeviceInfo,
_supportsDynamicColors = supportsDynamicColors;
_supportsDynamicColors = supportsDynamicColors;
@override
SettingsTabVm init() {
+53 -111
View File
@@ -23,70 +23,39 @@ class SettingsTabVmMapper extends ClassMapperBase<SettingsTabVm> {
final String id = 'SettingsTabVm';
static bool _$advanced(SettingsTabVm v) => v.advanced;
static const Field<SettingsTabVm, bool> _f$advanced =
Field('advanced', _$advanced);
static TextEditingController _$aliasController(SettingsTabVm v) =>
v.aliasController;
static const Field<SettingsTabVm, TextEditingController> _f$aliasController =
Field('aliasController', _$aliasController);
static TextEditingController _$deviceModelController(SettingsTabVm v) =>
v.deviceModelController;
static const Field<SettingsTabVm, TextEditingController>
_f$deviceModelController =
Field('deviceModelController', _$deviceModelController);
static TextEditingController _$portController(SettingsTabVm v) =>
v.portController;
static const Field<SettingsTabVm, TextEditingController> _f$portController =
Field('portController', _$portController);
static TextEditingController _$multicastController(SettingsTabVm v) =>
v.multicastController;
static const Field<SettingsTabVm, TextEditingController>
_f$multicastController =
Field('multicastController', _$multicastController);
static const Field<SettingsTabVm, bool> _f$advanced = Field('advanced', _$advanced);
static TextEditingController _$aliasController(SettingsTabVm v) => v.aliasController;
static const Field<SettingsTabVm, TextEditingController> _f$aliasController = Field('aliasController', _$aliasController);
static TextEditingController _$deviceModelController(SettingsTabVm v) => v.deviceModelController;
static const Field<SettingsTabVm, TextEditingController> _f$deviceModelController = Field('deviceModelController', _$deviceModelController);
static TextEditingController _$portController(SettingsTabVm v) => v.portController;
static const Field<SettingsTabVm, TextEditingController> _f$portController = Field('portController', _$portController);
static TextEditingController _$multicastController(SettingsTabVm v) => v.multicastController;
static const Field<SettingsTabVm, TextEditingController> _f$multicastController = Field('multicastController', _$multicastController);
static SettingsState _$settings(SettingsTabVm v) => v.settings;
static const Field<SettingsTabVm, SettingsState> _f$settings =
Field('settings', _$settings);
static const Field<SettingsTabVm, SettingsState> _f$settings = Field('settings', _$settings);
static ServerState? _$serverState(SettingsTabVm v) => v.serverState;
static const Field<SettingsTabVm, ServerState> _f$serverState =
Field('serverState', _$serverState);
static const Field<SettingsTabVm, ServerState> _f$serverState = Field('serverState', _$serverState);
static DeviceInfoResult _$deviceInfo(SettingsTabVm v) => v.deviceInfo;
static const Field<SettingsTabVm, DeviceInfoResult> _f$deviceInfo =
Field('deviceInfo', _$deviceInfo);
static const Field<SettingsTabVm, DeviceInfoResult> _f$deviceInfo = Field('deviceInfo', _$deviceInfo);
static List<ColorMode> _$colorModes(SettingsTabVm v) => v.colorModes;
static const Field<SettingsTabVm, List<ColorMode>> _f$colorModes =
Field('colorModes', _$colorModes);
static void Function(BuildContext, ThemeMode) _$onChangeTheme(
SettingsTabVm v) =>
v.onChangeTheme;
static const Field<SettingsTabVm, void Function(BuildContext, ThemeMode)>
_f$onChangeTheme = Field('onChangeTheme', _$onChangeTheme);
static void Function(ColorMode) _$onChangeColorMode(SettingsTabVm v) =>
v.onChangeColorMode;
static const Field<SettingsTabVm, void Function(ColorMode)>
_f$onChangeColorMode = Field('onChangeColorMode', _$onChangeColorMode);
static void Function(BuildContext) _$onTapLanguage(SettingsTabVm v) =>
v.onTapLanguage;
static const Field<SettingsTabVm, void Function(BuildContext)>
_f$onTapLanguage = Field('onTapLanguage', _$onTapLanguage);
static void Function(BuildContext) _$onTapRestartServer(SettingsTabVm v) =>
v.onTapRestartServer;
static const Field<SettingsTabVm, void Function(BuildContext)>
_f$onTapRestartServer = Field('onTapRestartServer', _$onTapRestartServer);
static void Function(BuildContext) _$onTapStartServer(SettingsTabVm v) =>
v.onTapStartServer;
static const Field<SettingsTabVm, void Function(BuildContext)>
_f$onTapStartServer = Field('onTapStartServer', _$onTapStartServer);
static void Function() _$onTapStopServer(SettingsTabVm v) =>
v.onTapStopServer;
static const Field<SettingsTabVm, void Function()> _f$onTapStopServer =
Field('onTapStopServer', _$onTapStopServer);
static void Function(bool) _$onTapAdvanced(SettingsTabVm v) =>
v.onTapAdvanced;
static const Field<SettingsTabVm, void Function(bool)> _f$onTapAdvanced =
Field('onTapAdvanced', _$onTapAdvanced);
static const Field<SettingsTabVm, List<ColorMode>> _f$colorModes = Field('colorModes', _$colorModes);
static void Function(BuildContext, ThemeMode) _$onChangeTheme(SettingsTabVm v) => v.onChangeTheme;
static const Field<SettingsTabVm, void Function(BuildContext, ThemeMode)> _f$onChangeTheme = Field('onChangeTheme', _$onChangeTheme);
static void Function(ColorMode) _$onChangeColorMode(SettingsTabVm v) => v.onChangeColorMode;
static const Field<SettingsTabVm, void Function(ColorMode)> _f$onChangeColorMode = Field('onChangeColorMode', _$onChangeColorMode);
static void Function(BuildContext) _$onTapLanguage(SettingsTabVm v) => v.onTapLanguage;
static const Field<SettingsTabVm, void Function(BuildContext)> _f$onTapLanguage = Field('onTapLanguage', _$onTapLanguage);
static void Function(BuildContext) _$onTapRestartServer(SettingsTabVm v) => v.onTapRestartServer;
static const Field<SettingsTabVm, void Function(BuildContext)> _f$onTapRestartServer = Field('onTapRestartServer', _$onTapRestartServer);
static void Function(BuildContext) _$onTapStartServer(SettingsTabVm v) => v.onTapStartServer;
static const Field<SettingsTabVm, void Function(BuildContext)> _f$onTapStartServer = Field('onTapStartServer', _$onTapStartServer);
static void Function() _$onTapStopServer(SettingsTabVm v) => v.onTapStopServer;
static const Field<SettingsTabVm, void Function()> _f$onTapStopServer = Field('onTapStopServer', _$onTapStopServer);
static void Function(bool) _$onTapAdvanced(SettingsTabVm v) => v.onTapAdvanced;
static const Field<SettingsTabVm, void Function(bool)> _f$onTapAdvanced = Field('onTapAdvanced', _$onTapAdvanced);
static List<ThemeMode> _$themeModes(SettingsTabVm v) => v.themeModes;
static const Field<SettingsTabVm, List<ThemeMode>> _f$themeModes =
Field('themeModes', _$themeModes, mode: FieldMode.member);
static const Field<SettingsTabVm, List<ThemeMode>> _f$themeModes = Field('themeModes', _$themeModes, mode: FieldMode.member);
@override
final Map<Symbol, Field<SettingsTabVm, dynamic>> fields = const {
@@ -143,51 +112,40 @@ class SettingsTabVmMapper extends ClassMapperBase<SettingsTabVm> {
mixin SettingsTabVmMappable {
String serialize() {
return SettingsTabVmMapper.ensureInitialized()
.encodeJson<SettingsTabVm>(this as SettingsTabVm);
return SettingsTabVmMapper.ensureInitialized().encodeJson<SettingsTabVm>(this as SettingsTabVm);
}
Map<String, dynamic> toJson() {
return SettingsTabVmMapper.ensureInitialized()
.encodeMap<SettingsTabVm>(this as SettingsTabVm);
return SettingsTabVmMapper.ensureInitialized().encodeMap<SettingsTabVm>(this as SettingsTabVm);
}
SettingsTabVmCopyWith<SettingsTabVm, SettingsTabVm, SettingsTabVm>
get copyWith => _SettingsTabVmCopyWithImpl(
this as SettingsTabVm, $identity, $identity);
SettingsTabVmCopyWith<SettingsTabVm, SettingsTabVm, SettingsTabVm> get copyWith =>
_SettingsTabVmCopyWithImpl(this as SettingsTabVm, $identity, $identity);
@override
String toString() {
return SettingsTabVmMapper.ensureInitialized()
.stringifyValue(this as SettingsTabVm);
return SettingsTabVmMapper.ensureInitialized().stringifyValue(this as SettingsTabVm);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
SettingsTabVmMapper.ensureInitialized()
.isValueEqual(this as SettingsTabVm, other));
(runtimeType == other.runtimeType && SettingsTabVmMapper.ensureInitialized().isValueEqual(this as SettingsTabVm, other));
}
@override
int get hashCode {
return SettingsTabVmMapper.ensureInitialized()
.hashValue(this as SettingsTabVm);
return SettingsTabVmMapper.ensureInitialized().hashValue(this as SettingsTabVm);
}
}
extension SettingsTabVmValueCopy<$R, $Out>
on ObjectCopyWith<$R, SettingsTabVm, $Out> {
SettingsTabVmCopyWith<$R, SettingsTabVm, $Out> get $asSettingsTabVm =>
$base.as((v, t, t2) => _SettingsTabVmCopyWithImpl(v, t, t2));
extension SettingsTabVmValueCopy<$R, $Out> on ObjectCopyWith<$R, SettingsTabVm, $Out> {
SettingsTabVmCopyWith<$R, SettingsTabVm, $Out> get $asSettingsTabVm => $base.as((v, t, t2) => _SettingsTabVmCopyWithImpl(v, t, t2));
}
abstract class SettingsTabVmCopyWith<$R, $In extends SettingsTabVm, $Out>
implements ClassCopyWith<$R, $In, $Out> {
abstract class SettingsTabVmCopyWith<$R, $In extends SettingsTabVm, $Out> implements ClassCopyWith<$R, $In, $Out> {
SettingsStateCopyWith<$R, SettingsState, SettingsState> get settings;
ServerStateCopyWith<$R, ServerState, ServerState>? get serverState;
ListCopyWith<$R, ColorMode, ObjectCopyWith<$R, ColorMode, ColorMode>>
get colorModes;
ListCopyWith<$R, ColorMode, ObjectCopyWith<$R, ColorMode, ColorMode>> get colorModes;
$R call(
{bool? advanced,
TextEditingController? aliasController,
@@ -208,26 +166,19 @@ abstract class SettingsTabVmCopyWith<$R, $In extends SettingsTabVm, $Out>
SettingsTabVmCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _SettingsTabVmCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, SettingsTabVm, $Out>
class _SettingsTabVmCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, SettingsTabVm, $Out>
implements SettingsTabVmCopyWith<$R, SettingsTabVm, $Out> {
_SettingsTabVmCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<SettingsTabVm> $mapper =
SettingsTabVmMapper.ensureInitialized();
late final ClassMapperBase<SettingsTabVm> $mapper = SettingsTabVmMapper.ensureInitialized();
@override
SettingsStateCopyWith<$R, SettingsState, SettingsState> get settings =>
$value.settings.copyWith.$chain((v) => call(settings: v));
SettingsStateCopyWith<$R, SettingsState, SettingsState> get settings => $value.settings.copyWith.$chain((v) => call(settings: v));
@override
ServerStateCopyWith<$R, ServerState, ServerState>? get serverState =>
$value.serverState?.copyWith.$chain((v) => call(serverState: v));
ServerStateCopyWith<$R, ServerState, ServerState>? get serverState => $value.serverState?.copyWith.$chain((v) => call(serverState: v));
@override
ListCopyWith<$R, ColorMode, ObjectCopyWith<$R, ColorMode, ColorMode>>
get colorModes => ListCopyWith(
$value.colorModes,
(v, t) => ObjectCopyWith(v, $identity, t),
(v) => call(colorModes: v));
ListCopyWith<$R, ColorMode, ObjectCopyWith<$R, ColorMode, ColorMode>> get colorModes =>
ListCopyWith($value.colorModes, (v, t) => ObjectCopyWith(v, $identity, t), (v) => call(colorModes: v));
@override
$R call(
{bool? advanced,
@@ -249,11 +200,9 @@ class _SettingsTabVmCopyWithImpl<$R, $Out>
$apply(FieldCopyWithData({
if (advanced != null) #advanced: advanced,
if (aliasController != null) #aliasController: aliasController,
if (deviceModelController != null)
#deviceModelController: deviceModelController,
if (deviceModelController != null) #deviceModelController: deviceModelController,
if (portController != null) #portController: portController,
if (multicastController != null)
#multicastController: multicastController,
if (multicastController != null) #multicastController: multicastController,
if (settings != null) #settings: settings,
if (serverState != $none) #serverState: serverState,
if (deviceInfo != null) #deviceInfo: deviceInfo,
@@ -270,28 +219,21 @@ class _SettingsTabVmCopyWithImpl<$R, $Out>
SettingsTabVm $make(CopyWithData data) => SettingsTabVm(
advanced: data.get(#advanced, or: $value.advanced),
aliasController: data.get(#aliasController, or: $value.aliasController),
deviceModelController:
data.get(#deviceModelController, or: $value.deviceModelController),
deviceModelController: data.get(#deviceModelController, or: $value.deviceModelController),
portController: data.get(#portController, or: $value.portController),
multicastController:
data.get(#multicastController, or: $value.multicastController),
multicastController: data.get(#multicastController, or: $value.multicastController),
settings: data.get(#settings, or: $value.settings),
serverState: data.get(#serverState, or: $value.serverState),
deviceInfo: data.get(#deviceInfo, or: $value.deviceInfo),
colorModes: data.get(#colorModes, or: $value.colorModes),
onChangeTheme: data.get(#onChangeTheme, or: $value.onChangeTheme),
onChangeColorMode:
data.get(#onChangeColorMode, or: $value.onChangeColorMode),
onChangeColorMode: data.get(#onChangeColorMode, or: $value.onChangeColorMode),
onTapLanguage: data.get(#onTapLanguage, or: $value.onTapLanguage),
onTapRestartServer:
data.get(#onTapRestartServer, or: $value.onTapRestartServer),
onTapStartServer:
data.get(#onTapStartServer, or: $value.onTapStartServer),
onTapRestartServer: data.get(#onTapRestartServer, or: $value.onTapRestartServer),
onTapStartServer: data.get(#onTapStartServer, or: $value.onTapStartServer),
onTapStopServer: data.get(#onTapStopServer, or: $value.onTapStopServer),
onTapAdvanced: data.get(#onTapAdvanced, or: $value.onTapAdvanced));
@override
SettingsTabVmCopyWith<$R2, SettingsTabVm, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_SettingsTabVmCopyWithImpl($value, $cast, t);
SettingsTabVmCopyWith<$R2, SettingsTabVm, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _SettingsTabVmCopyWithImpl($value, $cast, t);
}
@@ -21,15 +21,11 @@ class ApkProviderParamMapper extends ClassMapperBase<ApkProviderParam> {
final String id = 'ApkProviderParam';
static String _$query(ApkProviderParam v) => v.query;
static const Field<ApkProviderParam, String> _f$query =
Field('query', _$query);
static const Field<ApkProviderParam, String> _f$query = Field('query', _$query);
static bool _$includeSystemApps(ApkProviderParam v) => v.includeSystemApps;
static const Field<ApkProviderParam, bool> _f$includeSystemApps =
Field('includeSystemApps', _$includeSystemApps);
static bool _$onlyAppsWithLaunchIntent(ApkProviderParam v) =>
v.onlyAppsWithLaunchIntent;
static const Field<ApkProviderParam, bool> _f$onlyAppsWithLaunchIntent =
Field('onlyAppsWithLaunchIntent', _$onlyAppsWithLaunchIntent);
static const Field<ApkProviderParam, bool> _f$includeSystemApps = Field('includeSystemApps', _$includeSystemApps);
static bool _$onlyAppsWithLaunchIntent(ApkProviderParam v) => v.onlyAppsWithLaunchIntent;
static const Field<ApkProviderParam, bool> _f$onlyAppsWithLaunchIntent = Field('onlyAppsWithLaunchIntent', _$onlyAppsWithLaunchIntent);
@override
final Map<Symbol, Field<ApkProviderParam, dynamic>> fields = const {
@@ -59,83 +55,59 @@ class ApkProviderParamMapper extends ClassMapperBase<ApkProviderParam> {
mixin ApkProviderParamMappable {
String serialize() {
return ApkProviderParamMapper.ensureInitialized()
.encodeJson<ApkProviderParam>(this as ApkProviderParam);
return ApkProviderParamMapper.ensureInitialized().encodeJson<ApkProviderParam>(this as ApkProviderParam);
}
Map<String, dynamic> toJson() {
return ApkProviderParamMapper.ensureInitialized()
.encodeMap<ApkProviderParam>(this as ApkProviderParam);
return ApkProviderParamMapper.ensureInitialized().encodeMap<ApkProviderParam>(this as ApkProviderParam);
}
ApkProviderParamCopyWith<ApkProviderParam, ApkProviderParam, ApkProviderParam>
get copyWith => _ApkProviderParamCopyWithImpl(
this as ApkProviderParam, $identity, $identity);
ApkProviderParamCopyWith<ApkProviderParam, ApkProviderParam, ApkProviderParam> get copyWith =>
_ApkProviderParamCopyWithImpl(this as ApkProviderParam, $identity, $identity);
@override
String toString() {
return ApkProviderParamMapper.ensureInitialized()
.stringifyValue(this as ApkProviderParam);
return ApkProviderParamMapper.ensureInitialized().stringifyValue(this as ApkProviderParam);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
ApkProviderParamMapper.ensureInitialized()
.isValueEqual(this as ApkProviderParam, other));
(runtimeType == other.runtimeType && ApkProviderParamMapper.ensureInitialized().isValueEqual(this as ApkProviderParam, other));
}
@override
int get hashCode {
return ApkProviderParamMapper.ensureInitialized()
.hashValue(this as ApkProviderParam);
return ApkProviderParamMapper.ensureInitialized().hashValue(this as ApkProviderParam);
}
}
extension ApkProviderParamValueCopy<$R, $Out>
on ObjectCopyWith<$R, ApkProviderParam, $Out> {
ApkProviderParamCopyWith<$R, ApkProviderParam, $Out>
get $asApkProviderParam =>
$base.as((v, t, t2) => _ApkProviderParamCopyWithImpl(v, t, t2));
extension ApkProviderParamValueCopy<$R, $Out> on ObjectCopyWith<$R, ApkProviderParam, $Out> {
ApkProviderParamCopyWith<$R, ApkProviderParam, $Out> get $asApkProviderParam => $base.as((v, t, t2) => _ApkProviderParamCopyWithImpl(v, t, t2));
}
abstract class ApkProviderParamCopyWith<$R, $In extends ApkProviderParam, $Out>
implements ClassCopyWith<$R, $In, $Out> {
$R call(
{String? query, bool? includeSystemApps, bool? onlyAppsWithLaunchIntent});
ApkProviderParamCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t);
abstract class ApkProviderParamCopyWith<$R, $In extends ApkProviderParam, $Out> implements ClassCopyWith<$R, $In, $Out> {
$R call({String? query, bool? includeSystemApps, bool? onlyAppsWithLaunchIntent});
ApkProviderParamCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _ApkProviderParamCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, ApkProviderParam, $Out>
class _ApkProviderParamCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, ApkProviderParam, $Out>
implements ApkProviderParamCopyWith<$R, ApkProviderParam, $Out> {
_ApkProviderParamCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<ApkProviderParam> $mapper =
ApkProviderParamMapper.ensureInitialized();
late final ClassMapperBase<ApkProviderParam> $mapper = ApkProviderParamMapper.ensureInitialized();
@override
$R call(
{String? query,
bool? includeSystemApps,
bool? onlyAppsWithLaunchIntent}) =>
$apply(FieldCopyWithData({
$R call({String? query, bool? includeSystemApps, bool? onlyAppsWithLaunchIntent}) => $apply(FieldCopyWithData({
if (query != null) #query: query,
if (includeSystemApps != null) #includeSystemApps: includeSystemApps,
if (onlyAppsWithLaunchIntent != null)
#onlyAppsWithLaunchIntent: onlyAppsWithLaunchIntent
if (onlyAppsWithLaunchIntent != null) #onlyAppsWithLaunchIntent: onlyAppsWithLaunchIntent
}));
@override
ApkProviderParam $make(CopyWithData data) => ApkProviderParam(
query: data.get(#query, or: $value.query),
includeSystemApps:
data.get(#includeSystemApps, or: $value.includeSystemApps),
onlyAppsWithLaunchIntent: data.get(#onlyAppsWithLaunchIntent,
or: $value.onlyAppsWithLaunchIntent));
includeSystemApps: data.get(#includeSystemApps, or: $value.includeSystemApps),
onlyAppsWithLaunchIntent: data.get(#onlyAppsWithLaunchIntent, or: $value.onlyAppsWithLaunchIntent));
@override
ApkProviderParamCopyWith<$R2, ApkProviderParam, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t) =>
_ApkProviderParamCopyWithImpl($value, $cast, t);
ApkProviderParamCopyWith<$R2, ApkProviderParam, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _ApkProviderParamCopyWithImpl($value, $cast, t);
}
@@ -6,8 +6,7 @@
part of 'cached_apk_provider_param.dart';
class CachedApkProviderParamMapper
extends ClassMapperBase<CachedApkProviderParam> {
class CachedApkProviderParamMapper extends ClassMapperBase<CachedApkProviderParam> {
CachedApkProviderParamMapper._();
static CachedApkProviderParamMapper? _instance;
@@ -21,14 +20,10 @@ class CachedApkProviderParamMapper
@override
final String id = 'CachedApkProviderParam';
static bool _$includeSystemApps(CachedApkProviderParam v) =>
v.includeSystemApps;
static const Field<CachedApkProviderParam, bool> _f$includeSystemApps =
Field('includeSystemApps', _$includeSystemApps);
static bool _$onlyAppsWithLaunchIntent(CachedApkProviderParam v) =>
v.onlyAppsWithLaunchIntent;
static const Field<CachedApkProviderParam, bool> _f$onlyAppsWithLaunchIntent =
Field('onlyAppsWithLaunchIntent', _$onlyAppsWithLaunchIntent);
static bool _$includeSystemApps(CachedApkProviderParam v) => v.includeSystemApps;
static const Field<CachedApkProviderParam, bool> _f$includeSystemApps = Field('includeSystemApps', _$includeSystemApps);
static bool _$onlyAppsWithLaunchIntent(CachedApkProviderParam v) => v.onlyAppsWithLaunchIntent;
static const Field<CachedApkProviderParam, bool> _f$onlyAppsWithLaunchIntent = Field('onlyAppsWithLaunchIntent', _$onlyAppsWithLaunchIntent);
@override
final Map<Symbol, Field<CachedApkProviderParam, dynamic>> fields = const {
@@ -37,9 +32,7 @@ class CachedApkProviderParamMapper
};
static CachedApkProviderParam _instantiate(DecodingData data) {
return CachedApkProviderParam(
includeSystemApps: data.dec(_f$includeSystemApps),
onlyAppsWithLaunchIntent: data.dec(_f$onlyAppsWithLaunchIntent));
return CachedApkProviderParam(includeSystemApps: data.dec(_f$includeSystemApps), onlyAppsWithLaunchIntent: data.dec(_f$onlyAppsWithLaunchIntent));
}
@override
@@ -56,81 +49,59 @@ class CachedApkProviderParamMapper
mixin CachedApkProviderParamMappable {
String serialize() {
return CachedApkProviderParamMapper.ensureInitialized()
.encodeJson<CachedApkProviderParam>(this as CachedApkProviderParam);
return CachedApkProviderParamMapper.ensureInitialized().encodeJson<CachedApkProviderParam>(this as CachedApkProviderParam);
}
Map<String, dynamic> toJson() {
return CachedApkProviderParamMapper.ensureInitialized()
.encodeMap<CachedApkProviderParam>(this as CachedApkProviderParam);
return CachedApkProviderParamMapper.ensureInitialized().encodeMap<CachedApkProviderParam>(this as CachedApkProviderParam);
}
CachedApkProviderParamCopyWith<CachedApkProviderParam, CachedApkProviderParam,
CachedApkProviderParam>
get copyWith => _CachedApkProviderParamCopyWithImpl(
this as CachedApkProviderParam, $identity, $identity);
CachedApkProviderParamCopyWith<CachedApkProviderParam, CachedApkProviderParam, CachedApkProviderParam> get copyWith =>
_CachedApkProviderParamCopyWithImpl(this as CachedApkProviderParam, $identity, $identity);
@override
String toString() {
return CachedApkProviderParamMapper.ensureInitialized()
.stringifyValue(this as CachedApkProviderParam);
return CachedApkProviderParamMapper.ensureInitialized().stringifyValue(this as CachedApkProviderParam);
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(runtimeType == other.runtimeType &&
CachedApkProviderParamMapper.ensureInitialized()
.isValueEqual(this as CachedApkProviderParam, other));
(runtimeType == other.runtimeType && CachedApkProviderParamMapper.ensureInitialized().isValueEqual(this as CachedApkProviderParam, other));
}
@override
int get hashCode {
return CachedApkProviderParamMapper.ensureInitialized()
.hashValue(this as CachedApkProviderParam);
return CachedApkProviderParamMapper.ensureInitialized().hashValue(this as CachedApkProviderParam);
}
}
extension CachedApkProviderParamValueCopy<$R, $Out>
on ObjectCopyWith<$R, CachedApkProviderParam, $Out> {
CachedApkProviderParamCopyWith<$R, CachedApkProviderParam, $Out>
get $asCachedApkProviderParam =>
$base.as((v, t, t2) => _CachedApkProviderParamCopyWithImpl(v, t, t2));
extension CachedApkProviderParamValueCopy<$R, $Out> on ObjectCopyWith<$R, CachedApkProviderParam, $Out> {
CachedApkProviderParamCopyWith<$R, CachedApkProviderParam, $Out> get $asCachedApkProviderParam =>
$base.as((v, t, t2) => _CachedApkProviderParamCopyWithImpl(v, t, t2));
}
abstract class CachedApkProviderParamCopyWith<
$R,
$In extends CachedApkProviderParam,
$Out> implements ClassCopyWith<$R, $In, $Out> {
abstract class CachedApkProviderParamCopyWith<$R, $In extends CachedApkProviderParam, $Out> implements ClassCopyWith<$R, $In, $Out> {
$R call({bool? includeSystemApps, bool? onlyAppsWithLaunchIntent});
CachedApkProviderParamCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(
Then<$Out2, $R2> t);
CachedApkProviderParamCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
}
class _CachedApkProviderParamCopyWithImpl<$R, $Out>
extends ClassCopyWithBase<$R, CachedApkProviderParam, $Out>
implements
CachedApkProviderParamCopyWith<$R, CachedApkProviderParam, $Out> {
class _CachedApkProviderParamCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, CachedApkProviderParam, $Out>
implements CachedApkProviderParamCopyWith<$R, CachedApkProviderParam, $Out> {
_CachedApkProviderParamCopyWithImpl(super.value, super.then, super.then2);
@override
late final ClassMapperBase<CachedApkProviderParam> $mapper =
CachedApkProviderParamMapper.ensureInitialized();
late final ClassMapperBase<CachedApkProviderParam> $mapper = CachedApkProviderParamMapper.ensureInitialized();
@override
$R call({bool? includeSystemApps, bool? onlyAppsWithLaunchIntent}) =>
$apply(FieldCopyWithData({
$R call({bool? includeSystemApps, bool? onlyAppsWithLaunchIntent}) => $apply(FieldCopyWithData({
if (includeSystemApps != null) #includeSystemApps: includeSystemApps,
if (onlyAppsWithLaunchIntent != null)
#onlyAppsWithLaunchIntent: onlyAppsWithLaunchIntent
if (onlyAppsWithLaunchIntent != null) #onlyAppsWithLaunchIntent: onlyAppsWithLaunchIntent
}));
@override
CachedApkProviderParam $make(CopyWithData data) => CachedApkProviderParam(
includeSystemApps:
data.get(#includeSystemApps, or: $value.includeSystemApps),
onlyAppsWithLaunchIntent: data.get(#onlyAppsWithLaunchIntent,
or: $value.onlyAppsWithLaunchIntent));
includeSystemApps: data.get(#includeSystemApps, or: $value.includeSystemApps),
onlyAppsWithLaunchIntent: data.get(#onlyAppsWithLaunchIntent, or: $value.onlyAppsWithLaunchIntent));
@override
CachedApkProviderParamCopyWith<$R2, CachedApkProviderParam, $Out2>
$chain<$R2, $Out2>(Then<$Out2, $R2> t) =>
_CachedApkProviderParamCopyWithImpl($value, $cast, t);
CachedApkProviderParamCopyWith<$R2, CachedApkProviderParam, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) =>
_CachedApkProviderParamCopyWithImpl($value, $cast, t);
}
@@ -67,7 +67,6 @@ const _deviceType = 'ls_device_type';
const _deviceModel = 'ls_device_model';
const _shareViaLinkAutoAccept = 'ls_share_via_link_auto_accept';
final persistenceProvider = Provider<PersistenceService>((ref) {
throw Exception('persistenceProvider not initialized');
});
+7 -5
View File
@@ -27,11 +27,13 @@ class CustomDropdownButton<T> extends StatelessWidget {
underline: Container(),
borderRadius: Theme.of(context).inputDecorationTheme.borderRadius,
items: items,
onChanged: onChanged == null ? null : (value) {
if (value != null) {
onChanged!(value);
}
},
onChanged: onChanged == null
? null
: (value) {
if (value != null) {
onChanged!(value);
}
},
),
);
}
+2 -6
View File
@@ -31,17 +31,13 @@ class ShortcutWatcher extends StatelessWidget {
// Control+V and Command+V
LogicalKeySet(LogicalKeyboardKey.control, LogicalKeyboardKey.keyV): _PasteIntent(),
LogicalKeySet(LogicalKeyboardKey.meta, LogicalKeyboardKey.keyV): _PasteIntent(),
},
child: Actions(
actions: {
_ExitAppIntent: CallbackAction(onInvoke: (_) => exit(0)),
_PopPageIntent: CallbackAction(
onInvoke: (_) async =>
Navigator.of(Routerino.context).maybePop()),
_PopPageIntent: CallbackAction(onInvoke: (_) async => Navigator.of(Routerino.context).maybePop()),
_PasteIntent: CallbackAction(onInvoke: (_) async {
await context.ref.dispatchAsync(PickFileAction(
option: FilePickerOption.clipboard, context: context));
await context.ref.dispatchAsync(PickFileAction(option: FilePickerOption.clipboard, context: context));
return null;
}),
_CloseWindowIntent: CallbackAction<_CloseWindowIntent>(
+3
View File
@@ -100,6 +100,9 @@ flutter:
- assets/web/
- assets/CHANGELOG.md
flutter_gen:
line_length: 150
msix_config:
display_name: LocalSend
publisher_display_name: Tien Do Nam
+14 -28
View File
@@ -11,8 +11,7 @@ import 'package:flutter/material.dart' as _i8;
import 'package:localsend_app/gen/strings.g.dart' as _i10;
import 'package:localsend_app/model/persistence/color_mode.dart' as _i9;
import 'package:localsend_app/model/persistence/favorite_device.dart' as _i6;
import 'package:localsend_app/model/persistence/receive_history_entry.dart'
as _i5;
import 'package:localsend_app/model/persistence/receive_history_entry.dart' as _i5;
import 'package:localsend_app/model/send_mode.dart' as _i11;
import 'package:localsend_app/provider/persistence_provider.dart' as _i3;
import 'package:mockito/mockito.dart' as _i1;
@@ -32,8 +31,7 @@ import 'package:shared_preferences/shared_preferences.dart' as _i13;
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeStoredSecurityContext_0 extends _i1.SmartFake
implements _i2.StoredSecurityContext {
class _FakeStoredSecurityContext_0 extends _i1.SmartFake implements _i2.StoredSecurityContext {
_FakeStoredSecurityContext_0(
Object parent,
Invocation parentInvocation,
@@ -46,8 +44,7 @@ class _FakeStoredSecurityContext_0 extends _i1.SmartFake
/// A class which mocks [PersistenceService].
///
/// See the documentation for Mockito's code generation for more information.
class MockPersistenceService extends _i1.Mock
implements _i3.PersistenceService {
class MockPersistenceService extends _i1.Mock implements _i3.PersistenceService {
@override
_i2.StoredSecurityContext getSecurityContext() => (super.noSuchMethod(
Invocation.method(
@@ -71,8 +68,7 @@ class MockPersistenceService extends _i1.Mock
) as _i2.StoredSecurityContext);
@override
_i4.Future<void> setSecurityContext(_i2.StoredSecurityContext? context) =>
(super.noSuchMethod(
_i4.Future<void> setSecurityContext(_i2.StoredSecurityContext? context) => (super.noSuchMethod(
Invocation.method(
#setSecurityContext,
[context],
@@ -92,8 +88,7 @@ class MockPersistenceService extends _i1.Mock
) as List<_i5.ReceiveHistoryEntry>);
@override
_i4.Future<void> setReceiveHistory(List<_i5.ReceiveHistoryEntry>? entries) =>
(super.noSuchMethod(
_i4.Future<void> setReceiveHistory(List<_i5.ReceiveHistoryEntry>? entries) => (super.noSuchMethod(
Invocation.method(
#setReceiveHistory,
[entries],
@@ -113,8 +108,7 @@ class MockPersistenceService extends _i1.Mock
) as List<_i6.FavoriteDevice>);
@override
_i4.Future<void> setFavorites(List<_i6.FavoriteDevice>? entries) =>
(super.noSuchMethod(
_i4.Future<void> setFavorites(List<_i6.FavoriteDevice>? entries) => (super.noSuchMethod(
Invocation.method(
#setFavorites,
[entries],
@@ -258,8 +252,7 @@ class MockPersistenceService extends _i1.Mock
) as bool);
@override
_i4.Future<void> setShareViaLinkAutoAccept(bool? shareViaLinkAutoAccept) =>
(super.noSuchMethod(
_i4.Future<void> setShareViaLinkAutoAccept(bool? shareViaLinkAutoAccept) => (super.noSuchMethod(
Invocation.method(
#setShareViaLinkAutoAccept,
[shareViaLinkAutoAccept],
@@ -401,8 +394,7 @@ class MockPersistenceService extends _i1.Mock
) as bool);
@override
_i4.Future<void> setMinimizeToTray(bool? minimizeToTray) =>
(super.noSuchMethod(
_i4.Future<void> setMinimizeToTray(bool? minimizeToTray) => (super.noSuchMethod(
Invocation.method(
#setMinimizeToTray,
[minimizeToTray],
@@ -422,8 +414,7 @@ class MockPersistenceService extends _i1.Mock
) as bool);
@override
_i4.Future<void> setLaunchAtStartup(bool? launchAtStartup) =>
(super.noSuchMethod(
_i4.Future<void> setLaunchAtStartup(bool? launchAtStartup) => (super.noSuchMethod(
Invocation.method(
#setLaunchAtStartup,
[launchAtStartup],
@@ -443,8 +434,7 @@ class MockPersistenceService extends _i1.Mock
) as bool);
@override
_i4.Future<void> setAutoStartLaunchMinimized(bool? launchMinimized) =>
(super.noSuchMethod(
_i4.Future<void> setAutoStartLaunchMinimized(bool? launchMinimized) => (super.noSuchMethod(
Invocation.method(
#setAutoStartLaunchMinimized,
[launchMinimized],
@@ -534,8 +524,7 @@ class MockPersistenceService extends _i1.Mock
) as _i4.Future<void>);
@override
Map<String, _i12.OffsetBase?> getWindowLastDimensions() =>
(super.noSuchMethod(
Map<String, _i12.OffsetBase?> getWindowLastDimensions() => (super.noSuchMethod(
Invocation.method(
#getWindowLastDimensions,
[],
@@ -545,8 +534,7 @@ class MockPersistenceService extends _i1.Mock
) as Map<String, _i12.OffsetBase?>);
@override
_i4.Future<void> setSaveWindowPlacement(bool? savePlacement) =>
(super.noSuchMethod(
_i4.Future<void> setSaveWindowPlacement(bool? savePlacement) => (super.noSuchMethod(
Invocation.method(
#setSaveWindowPlacement,
[savePlacement],
@@ -566,8 +554,7 @@ class MockPersistenceService extends _i1.Mock
) as bool);
@override
_i4.Future<void> setEnableAnimations(bool? enableAnimations) =>
(super.noSuchMethod(
_i4.Future<void> setEnableAnimations(bool? enableAnimations) => (super.noSuchMethod(
Invocation.method(
#setEnableAnimations,
[enableAnimations],
@@ -587,8 +574,7 @@ class MockPersistenceService extends _i1.Mock
) as bool);
@override
_i4.Future<void> setDeviceType(_i2.DeviceType? deviceType) =>
(super.noSuchMethod(
_i4.Future<void> setDeviceType(_i2.DeviceType? deviceType) => (super.noSuchMethod(
Invocation.method(
#setDeviceType,
[deviceType],