mirror of
https://github.com/localsend/localsend.git
synced 2026-06-23 04:10:07 +00:00
chore: format
This commit is contained in:
@@ -19,6 +19,7 @@ analyzer:
|
||||
|
||||
formatter:
|
||||
trailing_commas: preserve
|
||||
page_width: 150
|
||||
|
||||
linter:
|
||||
rules:
|
||||
|
||||
+62
-44
@@ -128,7 +128,7 @@ Future<RefenaContainer> preInit(List<String> args) async {
|
||||
} else if (defaultTargetPlatform == TargetPlatform.macOS) {
|
||||
startHidden = await isLaunchedAsLoginItem() && await getLaunchAtLoginMinimized();
|
||||
}
|
||||
|
||||
|
||||
doWhenWindowReady(() {
|
||||
if (startHidden) {
|
||||
unawaited(hideToTray());
|
||||
@@ -158,35 +158,41 @@ Future<RefenaContainer> preInit(List<String> args) async {
|
||||
);
|
||||
|
||||
// initialize multi-threading
|
||||
container.set(parentIsolateProvider.overrideWithNotifier((ref) {
|
||||
final settings = ref.read(settingsProvider);
|
||||
return IsolateController(
|
||||
initialState: ParentIsolateState.initial(
|
||||
SyncState(
|
||||
init: () async {
|
||||
await Rhttp.init();
|
||||
},
|
||||
rootIsolateToken: RootIsolateToken.instance!,
|
||||
httpClientFactory: RhttpWrapper.create,
|
||||
securityContext: persistenceService.getSecurityContext(),
|
||||
deviceInfo: ref.read(deviceInfoProvider),
|
||||
alias: settings.alias,
|
||||
port: settings.port,
|
||||
networkWhitelist: settings.networkWhitelist,
|
||||
networkBlacklist: settings.networkBlacklist,
|
||||
protocol: settings.https ? ProtocolType.https : ProtocolType.http,
|
||||
multicastGroup: settings.multicastGroup,
|
||||
discoveryTimeout: settings.discoveryTimeout,
|
||||
serverRunning: true,
|
||||
download: false,
|
||||
container.set(
|
||||
parentIsolateProvider.overrideWithNotifier((ref) {
|
||||
final settings = ref.read(settingsProvider);
|
||||
return IsolateController(
|
||||
initialState: ParentIsolateState.initial(
|
||||
SyncState(
|
||||
init: () async {
|
||||
await Rhttp.init();
|
||||
},
|
||||
rootIsolateToken: RootIsolateToken.instance!,
|
||||
httpClientFactory: RhttpWrapper.create,
|
||||
securityContext: persistenceService.getSecurityContext(),
|
||||
deviceInfo: ref.read(deviceInfoProvider),
|
||||
alias: settings.alias,
|
||||
port: settings.port,
|
||||
networkWhitelist: settings.networkWhitelist,
|
||||
networkBlacklist: settings.networkBlacklist,
|
||||
protocol: settings.https ? ProtocolType.https : ProtocolType.http,
|
||||
multicastGroup: settings.multicastGroup,
|
||||
discoveryTimeout: settings.discoveryTimeout,
|
||||
serverRunning: true,
|
||||
download: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}));
|
||||
);
|
||||
}),
|
||||
);
|
||||
|
||||
await container.redux(parentIsolateProvider).dispatchAsync(IsolateSetupAction(
|
||||
uriContentStreamResolver: AndroidUriContentStreamResolver(),
|
||||
));
|
||||
await container
|
||||
.redux(parentIsolateProvider)
|
||||
.dispatchAsync(
|
||||
IsolateSetupAction(
|
||||
uriContentStreamResolver: AndroidUriContentStreamResolver(),
|
||||
),
|
||||
);
|
||||
|
||||
return container;
|
||||
}
|
||||
@@ -225,9 +231,11 @@ Future<void> postInit(BuildContext context, Ref ref, bool appStart) async {
|
||||
if (defaultTargetPlatform == TargetPlatform.macOS) {
|
||||
// handle dropped files
|
||||
pendingFilesStream.listen((files) async {
|
||||
await ref.global.dispatchAsync(_HandleAppStartArgumentsAction(
|
||||
args: files,
|
||||
));
|
||||
await ref.global.dispatchAsync(
|
||||
_HandleAppStartArgumentsAction(
|
||||
args: files,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
// handle dropped strings
|
||||
@@ -241,9 +249,11 @@ Future<void> postInit(BuildContext context, Ref ref, bool appStart) async {
|
||||
await setupMethodCallHandler();
|
||||
} else {
|
||||
final args = ref.read(appArgumentsProvider);
|
||||
await ref.global.dispatchAsync(_HandleAppStartArgumentsAction(
|
||||
args: args,
|
||||
));
|
||||
await ref.global.dispatchAsync(
|
||||
_HandleAppStartArgumentsAction(
|
||||
args: args,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,17 +267,21 @@ Future<void> postInit(BuildContext context, Ref ref, bool appStart) async {
|
||||
if (initialSharedPayload != null) {
|
||||
hasInitialShare = true;
|
||||
// ignore: unawaited_futures
|
||||
ref.global.dispatchAsync(_HandleShareIntentAction(
|
||||
payload: initialSharedPayload,
|
||||
));
|
||||
ref.global.dispatchAsync(
|
||||
_HandleShareIntentAction(
|
||||
payload: initialSharedPayload,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
_sharedMediaSubscription?.cancel(); // ignore: unawaited_futures
|
||||
_sharedMediaSubscription = shareHandler.sharedMediaStream.listen((SharedMedia payload) async {
|
||||
await ref.global.dispatchAsync(_HandleShareIntentAction(
|
||||
payload: payload,
|
||||
));
|
||||
await ref.global.dispatchAsync(
|
||||
_HandleShareIntentAction(
|
||||
payload: payload,
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -298,10 +312,14 @@ class _HandleShareIntentAction extends AsyncGlobalAction {
|
||||
if (message != null && message.trim().isNotEmpty) {
|
||||
ref.redux(selectedSendingFilesProvider).dispatch(AddMessageAction(message: message));
|
||||
}
|
||||
await ref.redux(selectedSendingFilesProvider).dispatchAsync(AddFilesAction(
|
||||
files: payload.attachments?.where((a) => a != null).cast<SharedAttachment>() ?? <SharedAttachment>[],
|
||||
converter: CrossFileConverters.convertSharedAttachment,
|
||||
));
|
||||
await ref
|
||||
.redux(selectedSendingFilesProvider)
|
||||
.dispatchAsync(
|
||||
AddFilesAction(
|
||||
files: payload.attachments?.where((a) => a != null).cast<SharedAttachment>() ?? <SharedAttachment>[],
|
||||
converter: CrossFileConverters.convertSharedAttachment,
|
||||
),
|
||||
);
|
||||
|
||||
ref.redux(homePageControllerProvider).dispatch(ChangeTabAction(HomeTab.send));
|
||||
}
|
||||
|
||||
@@ -20,12 +20,14 @@ void showInitErrorApp({
|
||||
await WindowManager.instance.show();
|
||||
}
|
||||
|
||||
runApp(RefenaScope(
|
||||
child: _ErrorApp(
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
runApp(
|
||||
RefenaScope(
|
||||
child: _ErrorApp(
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
),
|
||||
),
|
||||
));
|
||||
);
|
||||
|
||||
await showFromTray();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,8 @@ final _logger = Logger('Refena');
|
||||
|
||||
class CustomRefenaObserver extends RefenaMultiObserver {
|
||||
CustomRefenaObserver()
|
||||
: super(observers: [
|
||||
: super(
|
||||
observers: [
|
||||
RefenaDebugObserver(
|
||||
onLine: (line) => _logger.info(line),
|
||||
exclude: _exclude,
|
||||
@@ -19,7 +20,8 @@ class CustomRefenaObserver extends RefenaMultiObserver {
|
||||
exclude: _exclude,
|
||||
),
|
||||
RefenaInspectorObserver(),
|
||||
]);
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
bool _exclude(RefenaEvent event) {
|
||||
|
||||
+18
-14
@@ -46,7 +46,7 @@ ThemeData getTheme(ColorMode colorMode, Brightness brightness, DynamicColors? dy
|
||||
AppLocale.ko => 'Noto Sans CJK KR',
|
||||
AppLocale.zhCn => 'Noto Sans CJK SC',
|
||||
AppLocale.zhHk || AppLocale.zhTw => 'Noto Sans CJK TC',
|
||||
_ => 'Noto Sans',
|
||||
_ => 'Noto Sans',
|
||||
};
|
||||
} else {
|
||||
fontFamily = null;
|
||||
@@ -97,18 +97,22 @@ Future<void> updateSystemOverlayStyleWithBrightness(Brightness brightness) async
|
||||
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge); // ignore: unawaited_futures
|
||||
|
||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
statusBarIconBrightness: brightness == Brightness.light ? Brightness.dark : Brightness.light,
|
||||
systemNavigationBarColor: edgeToEdge ? Colors.transparent : (darkMode ? Colors.black : Colors.white),
|
||||
systemNavigationBarContrastEnforced: false,
|
||||
systemNavigationBarIconBrightness: darkMode ? Brightness.light : Brightness.dark,
|
||||
));
|
||||
SystemChrome.setSystemUIOverlayStyle(
|
||||
SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
statusBarIconBrightness: brightness == Brightness.light ? Brightness.dark : Brightness.light,
|
||||
systemNavigationBarColor: edgeToEdge ? Colors.transparent : (darkMode ? Colors.black : Colors.white),
|
||||
systemNavigationBarContrastEnforced: false,
|
||||
systemNavigationBarIconBrightness: darkMode ? Brightness.light : Brightness.dark,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||||
statusBarBrightness: brightness, // iOS
|
||||
statusBarColor: Colors.transparent, // Not relevant to this issue
|
||||
));
|
||||
SystemChrome.setSystemUIOverlayStyle(
|
||||
SystemUiOverlayStyle(
|
||||
statusBarBrightness: brightness, // iOS
|
||||
statusBarColor: Colors.transparent, // Not relevant to this issue
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,8 +151,8 @@ ColorScheme _determineColorScheme(ColorMode mode, Brightness brightness, Dynamic
|
||||
ColorMode.system => brightness == Brightness.light ? dynamicColors?.light : dynamicColors?.dark,
|
||||
ColorMode.localsend => null,
|
||||
ColorMode.oled => (dynamicColors?.dark ?? defaultColorScheme).copyWith(
|
||||
surface: Colors.black,
|
||||
),
|
||||
surface: Colors.black,
|
||||
),
|
||||
ColorMode.yaru => throw 'Should reach here',
|
||||
};
|
||||
|
||||
|
||||
+7
-5
@@ -29,12 +29,14 @@ Future<void> main(List<String> args) async {
|
||||
return;
|
||||
}
|
||||
|
||||
runApp(RefenaScope.withContainer(
|
||||
container: container,
|
||||
child: TranslationProvider(
|
||||
child: const LocalSendApp(),
|
||||
runApp(
|
||||
RefenaScope.withContainer(
|
||||
container: container,
|
||||
child: TranslationProvider(
|
||||
child: const LocalSendApp(),
|
||||
),
|
||||
),
|
||||
));
|
||||
);
|
||||
}
|
||||
|
||||
class LocalSendApp extends StatelessWidget {
|
||||
|
||||
@@ -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;
|
||||
@@ -38,11 +36,9 @@ class CrossFileMapper extends ClassMapperBase<CrossFile> {
|
||||
static List<int>? _$bytes(CrossFile v) => v.bytes;
|
||||
static const Field<CrossFile, List<int>> _f$bytes = Field('bytes', _$bytes);
|
||||
static DateTime? _$lastModified(CrossFile v) => v.lastModified;
|
||||
static const Field<CrossFile, DateTime> _f$lastModified =
|
||||
Field('lastModified', _$lastModified);
|
||||
static const Field<CrossFile, DateTime> _f$lastModified = Field('lastModified', _$lastModified);
|
||||
static DateTime? _$lastAccessed(CrossFile v) => v.lastAccessed;
|
||||
static const Field<CrossFile, DateTime> _f$lastAccessed =
|
||||
Field('lastAccessed', _$lastAccessed);
|
||||
static const Field<CrossFile, DateTime> _f$lastAccessed = Field('lastAccessed', _$lastAccessed);
|
||||
|
||||
@override
|
||||
final MappableFields<CrossFile> fields = const {
|
||||
@@ -59,15 +55,16 @@ class CrossFileMapper extends ClassMapperBase<CrossFile> {
|
||||
|
||||
static CrossFile _instantiate(DecodingData data) {
|
||||
return CrossFile(
|
||||
name: data.dec(_f$name),
|
||||
fileType: data.dec(_f$fileType),
|
||||
size: data.dec(_f$size),
|
||||
thumbnail: data.dec(_f$thumbnail),
|
||||
asset: data.dec(_f$asset),
|
||||
path: data.dec(_f$path),
|
||||
bytes: data.dec(_f$bytes),
|
||||
lastModified: data.dec(_f$lastModified),
|
||||
lastAccessed: data.dec(_f$lastAccessed));
|
||||
name: data.dec(_f$name),
|
||||
fileType: data.dec(_f$fileType),
|
||||
size: data.dec(_f$size),
|
||||
thumbnail: data.dec(_f$thumbnail),
|
||||
asset: data.dec(_f$asset),
|
||||
path: data.dec(_f$path),
|
||||
bytes: data.dec(_f$bytes),
|
||||
lastModified: data.dec(_f$lastModified),
|
||||
lastAccessed: data.dec(_f$lastAccessed),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -84,27 +81,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 CrossFileMapper.ensureInitialized()
|
||||
.equalsValue(this as CrossFile, other);
|
||||
return CrossFileMapper.ensureInitialized().equalsValue(this as CrossFile, other);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -114,76 +106,70 @@ 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,
|
||||
DateTime? lastModified,
|
||||
DateTime? lastAccessed});
|
||||
$R call({
|
||||
String? name,
|
||||
FileType? fileType,
|
||||
int? size,
|
||||
Uint8List? thumbnail,
|
||||
AssetEntity? asset,
|
||||
String? path,
|
||||
List<int>? bytes,
|
||||
DateTime? lastModified,
|
||||
DateTime? lastAccessed,
|
||||
});
|
||||
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,
|
||||
FileType? fileType,
|
||||
int? size,
|
||||
Object? thumbnail = $none,
|
||||
Object? asset = $none,
|
||||
Object? path = $none,
|
||||
Object? bytes = $none,
|
||||
Object? lastModified = $none,
|
||||
Object? lastAccessed = $none}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (name != null) #name: name,
|
||||
if (fileType != null) #fileType: fileType,
|
||||
if (size != null) #size: size,
|
||||
if (thumbnail != $none) #thumbnail: thumbnail,
|
||||
if (asset != $none) #asset: asset,
|
||||
if (path != $none) #path: path,
|
||||
if (bytes != $none) #bytes: bytes,
|
||||
if (lastModified != $none) #lastModified: lastModified,
|
||||
if (lastAccessed != $none) #lastAccessed: lastAccessed
|
||||
}));
|
||||
$R call({
|
||||
String? name,
|
||||
FileType? fileType,
|
||||
int? size,
|
||||
Object? thumbnail = $none,
|
||||
Object? asset = $none,
|
||||
Object? path = $none,
|
||||
Object? bytes = $none,
|
||||
Object? lastModified = $none,
|
||||
Object? lastAccessed = $none,
|
||||
}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (name != null) #name: name,
|
||||
if (fileType != null) #fileType: fileType,
|
||||
if (size != null) #size: size,
|
||||
if (thumbnail != $none) #thumbnail: thumbnail,
|
||||
if (asset != $none) #asset: asset,
|
||||
if (path != $none) #path: path,
|
||||
if (bytes != $none) #bytes: bytes,
|
||||
if (lastModified != $none) #lastModified: lastModified,
|
||||
if (lastAccessed != $none) #lastAccessed: lastAccessed,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
CrossFile $make(CopyWithData data) => CrossFile(
|
||||
name: data.get(#name, or: $value.name),
|
||||
fileType: data.get(#fileType, or: $value.fileType),
|
||||
size: data.get(#size, or: $value.size),
|
||||
thumbnail: data.get(#thumbnail, or: $value.thumbnail),
|
||||
asset: data.get(#asset, or: $value.asset),
|
||||
path: data.get(#path, or: $value.path),
|
||||
bytes: data.get(#bytes, or: $value.bytes),
|
||||
lastModified: data.get(#lastModified, or: $value.lastModified),
|
||||
lastAccessed: data.get(#lastAccessed, or: $value.lastAccessed));
|
||||
name: data.get(#name, or: $value.name),
|
||||
fileType: data.get(#fileType, or: $value.fileType),
|
||||
size: data.get(#size, or: $value.size),
|
||||
thumbnail: data.get(#thumbnail, or: $value.thumbnail),
|
||||
asset: data.get(#asset, or: $value.asset),
|
||||
path: data.get(#path, or: $value.path),
|
||||
bytes: data.get(#bytes, or: $value.bytes),
|
||||
lastModified: data.get(#lastModified, or: $value.lastModified),
|
||||
lastAccessed: data.get(#lastAccessed, or: $value.lastAccessed),
|
||||
);
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@@ -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,8 +64,7 @@ mixin LogEntryMappable {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return LogEntryMapper.ensureInitialized()
|
||||
.equalsValue(this as LogEntry, other);
|
||||
return LogEntryMapper.ensureInitialized().equalsValue(this as LogEntry, other);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -79,36 +74,28 @@ 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));
|
||||
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 MappableFields<FavoriteDevice> fields = const {
|
||||
@@ -47,12 +45,13 @@ class FavoriteDeviceMapper extends ClassMapperBase<FavoriteDevice> {
|
||||
|
||||
static FavoriteDevice _instantiate(DecodingData data) {
|
||||
return FavoriteDevice(
|
||||
id: data.dec(_f$id),
|
||||
fingerprint: data.dec(_f$fingerprint),
|
||||
ip: data.dec(_f$ip),
|
||||
port: data.dec(_f$port),
|
||||
alias: data.dec(_f$alias),
|
||||
customAlias: data.dec(_f$customAlias));
|
||||
id: data.dec(_f$id),
|
||||
fingerprint: data.dec(_f$fingerprint),
|
||||
ip: data.dec(_f$ip),
|
||||
port: data.dec(_f$port),
|
||||
alias: data.dec(_f$alias),
|
||||
customAlias: data.dec(_f$customAlias),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -69,91 +68,67 @@ 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 FavoriteDeviceMapper.ensureInitialized()
|
||||
.equalsValue(this as FavoriteDevice, other);
|
||||
return FavoriteDeviceMapper.ensureInitialized().equalsValue(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({
|
||||
if (id != null) #id: id,
|
||||
if (fingerprint != null) #fingerprint: fingerprint,
|
||||
if (ip != null) #ip: ip,
|
||||
if (port != null) #port: port,
|
||||
if (alias != null) #alias: alias,
|
||||
if (customAlias != null) #customAlias: customAlias
|
||||
}));
|
||||
$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,
|
||||
if (port != null) #port: port,
|
||||
if (alias != null) #alias: alias,
|
||||
if (customAlias != null) #customAlias: customAlias,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
FavoriteDevice $make(CopyWithData data) => FavoriteDevice(
|
||||
id: data.get(#id, or: $value.id),
|
||||
fingerprint: data.get(#fingerprint, or: $value.fingerprint),
|
||||
ip: data.get(#ip, or: $value.ip),
|
||||
port: data.get(#port, or: $value.port),
|
||||
alias: data.get(#alias, or: $value.alias),
|
||||
customAlias: data.get(#customAlias, or: $value.customAlias));
|
||||
id: data.get(#id, or: $value.id),
|
||||
fingerprint: data.get(#fingerprint, or: $value.fingerprint),
|
||||
ip: data.get(#ip, or: $value.ip),
|
||||
port: data.get(#port, or: $value.port),
|
||||
alias: data.get(#alias, or: $value.alias),
|
||||
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,29 +24,21 @@ 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 bool _$isMessage(ReceiveHistoryEntry v) => v.isMessage;
|
||||
static const Field<ReceiveHistoryEntry, bool> _f$isMessage =
|
||||
Field('isMessage', _$isMessage, hook: IsMessageHook());
|
||||
static const Field<ReceiveHistoryEntry, bool> _f$isMessage = Field('isMessage', _$isMessage, hook: IsMessageHook());
|
||||
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 MappableFields<ReceiveHistoryEntry> fields = const {
|
||||
@@ -63,15 +55,16 @@ class ReceiveHistoryEntryMapper extends ClassMapperBase<ReceiveHistoryEntry> {
|
||||
|
||||
static ReceiveHistoryEntry _instantiate(DecodingData data) {
|
||||
return ReceiveHistoryEntry(
|
||||
id: data.dec(_f$id),
|
||||
fileName: data.dec(_f$fileName),
|
||||
fileType: data.dec(_f$fileType),
|
||||
path: data.dec(_f$path),
|
||||
savedToGallery: data.dec(_f$savedToGallery),
|
||||
isMessage: data.dec(_f$isMessage),
|
||||
fileSize: data.dec(_f$fileSize),
|
||||
senderAlias: data.dec(_f$senderAlias),
|
||||
timestamp: data.dec(_f$timestamp));
|
||||
id: data.dec(_f$id),
|
||||
fileName: data.dec(_f$fileName),
|
||||
fileType: data.dec(_f$fileType),
|
||||
path: data.dec(_f$path),
|
||||
savedToGallery: data.dec(_f$savedToGallery),
|
||||
isMessage: data.dec(_f$isMessage),
|
||||
fileSize: data.dec(_f$fileSize),
|
||||
senderAlias: data.dec(_f$senderAlias),
|
||||
timestamp: data.dec(_f$timestamp),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -88,105 +81,95 @@ 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 ReceiveHistoryEntryMapper.ensureInitialized()
|
||||
.equalsValue(this as ReceiveHistoryEntry, other);
|
||||
return ReceiveHistoryEntryMapper.ensureInitialized().equalsValue(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> {
|
||||
$R call(
|
||||
{String? id,
|
||||
String? fileName,
|
||||
FileType? fileType,
|
||||
String? path,
|
||||
bool? savedToGallery,
|
||||
bool? isMessage,
|
||||
int? fileSize,
|
||||
String? senderAlias,
|
||||
DateTime? timestamp});
|
||||
ReceiveHistoryEntryCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t);
|
||||
abstract class ReceiveHistoryEntryCopyWith<$R, $In extends ReceiveHistoryEntry, $Out> implements ClassCopyWith<$R, $In, $Out> {
|
||||
$R call({
|
||||
String? id,
|
||||
String? fileName,
|
||||
FileType? fileType,
|
||||
String? path,
|
||||
bool? savedToGallery,
|
||||
bool? isMessage,
|
||||
int? fileSize,
|
||||
String? senderAlias,
|
||||
DateTime? timestamp,
|
||||
});
|
||||
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,
|
||||
String? fileName,
|
||||
FileType? fileType,
|
||||
Object? path = $none,
|
||||
bool? savedToGallery,
|
||||
bool? isMessage,
|
||||
int? fileSize,
|
||||
String? senderAlias,
|
||||
DateTime? timestamp}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (id != null) #id: id,
|
||||
if (fileName != null) #fileName: fileName,
|
||||
if (fileType != null) #fileType: fileType,
|
||||
if (path != $none) #path: path,
|
||||
if (savedToGallery != null) #savedToGallery: savedToGallery,
|
||||
if (isMessage != null) #isMessage: isMessage,
|
||||
if (fileSize != null) #fileSize: fileSize,
|
||||
if (senderAlias != null) #senderAlias: senderAlias,
|
||||
if (timestamp != null) #timestamp: timestamp
|
||||
}));
|
||||
$R call({
|
||||
String? id,
|
||||
String? fileName,
|
||||
FileType? fileType,
|
||||
Object? path = $none,
|
||||
bool? savedToGallery,
|
||||
bool? isMessage,
|
||||
int? fileSize,
|
||||
String? senderAlias,
|
||||
DateTime? timestamp,
|
||||
}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (id != null) #id: id,
|
||||
if (fileName != null) #fileName: fileName,
|
||||
if (fileType != null) #fileType: fileType,
|
||||
if (path != $none) #path: path,
|
||||
if (savedToGallery != null) #savedToGallery: savedToGallery,
|
||||
if (isMessage != null) #isMessage: isMessage,
|
||||
if (fileSize != null) #fileSize: fileSize,
|
||||
if (senderAlias != null) #senderAlias: senderAlias,
|
||||
if (timestamp != null) #timestamp: timestamp,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
ReceiveHistoryEntry $make(CopyWithData data) => ReceiveHistoryEntry(
|
||||
id: data.get(#id, or: $value.id),
|
||||
fileName: data.get(#fileName, or: $value.fileName),
|
||||
fileType: data.get(#fileType, or: $value.fileType),
|
||||
path: data.get(#path, or: $value.path),
|
||||
savedToGallery: data.get(#savedToGallery, or: $value.savedToGallery),
|
||||
isMessage: data.get(#isMessage, or: $value.isMessage),
|
||||
fileSize: data.get(#fileSize, or: $value.fileSize),
|
||||
senderAlias: data.get(#senderAlias, or: $value.senderAlias),
|
||||
timestamp: data.get(#timestamp, or: $value.timestamp));
|
||||
id: data.get(#id, or: $value.id),
|
||||
fileName: data.get(#fileName, or: $value.fileName),
|
||||
fileType: data.get(#fileType, or: $value.fileType),
|
||||
path: data.get(#path, or: $value.path),
|
||||
savedToGallery: data.get(#savedToGallery, or: $value.savedToGallery),
|
||||
isMessage: data.get(#isMessage, or: $value.isMessage),
|
||||
fileSize: data.get(#fileSize, or: $value.fileSize),
|
||||
senderAlias: data.get(#senderAlias, or: $value.senderAlias),
|
||||
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,20 +21,14 @@ 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 Map<String, Set<Device>> _$signalingDevices(NearbyDevicesState v) =>
|
||||
v.signalingDevices;
|
||||
static const Field<NearbyDevicesState, Map<String, Set<Device>>>
|
||||
_f$signalingDevices = Field('signalingDevices', _$signalingDevices);
|
||||
static const Field<NearbyDevicesState, Map<String, Device>> _f$devices = Field('devices', _$devices);
|
||||
static Map<String, Set<Device>> _$signalingDevices(NearbyDevicesState v) => v.signalingDevices;
|
||||
static const Field<NearbyDevicesState, Map<String, Set<Device>>> _f$signalingDevices = Field('signalingDevices', _$signalingDevices);
|
||||
|
||||
@override
|
||||
final MappableFields<NearbyDevicesState> fields = const {
|
||||
@@ -46,10 +40,11 @@ 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),
|
||||
signalingDevices: data.dec(_f$signalingDevices));
|
||||
runningFavoriteScan: data.dec(_f$runningFavoriteScan),
|
||||
runningIps: data.dec(_f$runningIps),
|
||||
devices: data.dec(_f$devices),
|
||||
signalingDevices: data.dec(_f$signalingDevices),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -66,103 +61,73 @@ 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 NearbyDevicesStateMapper.ensureInitialized()
|
||||
.equalsValue(this as NearbyDevicesState, other);
|
||||
return NearbyDevicesStateMapper.ensureInitialized().equalsValue(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;
|
||||
MapCopyWith<$R, String, Set<Device>,
|
||||
ObjectCopyWith<$R, Set<Device>, Set<Device>>> get signalingDevices;
|
||||
$R call(
|
||||
{bool? runningFavoriteScan,
|
||||
Set<String>? runningIps,
|
||||
Map<String, Device>? devices,
|
||||
Map<String, Set<Device>>? signalingDevices});
|
||||
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;
|
||||
MapCopyWith<$R, String, Set<Device>, ObjectCopyWith<$R, Set<Device>, Set<Device>>> get signalingDevices;
|
||||
$R call({bool? runningFavoriteScan, Set<String>? runningIps, Map<String, Device>? devices, Map<String, Set<Device>>? signalingDevices});
|
||||
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
|
||||
MapCopyWith<$R, String, Set<Device>,
|
||||
ObjectCopyWith<$R, Set<Device>, Set<Device>>>
|
||||
get signalingDevices => MapCopyWith(
|
||||
$value.signalingDevices,
|
||||
(v, t) => ObjectCopyWith(v, $identity, t),
|
||||
(v) => call(signalingDevices: v));
|
||||
MapCopyWith<$R, String, Set<Device>, ObjectCopyWith<$R, Set<Device>, Set<Device>>> get signalingDevices =>
|
||||
MapCopyWith($value.signalingDevices, (v, t) => ObjectCopyWith(v, $identity, t), (v) => call(signalingDevices: v));
|
||||
@override
|
||||
$R call(
|
||||
{bool? runningFavoriteScan,
|
||||
Set<String>? runningIps,
|
||||
Map<String, Device>? devices,
|
||||
Map<String, Set<Device>>? signalingDevices}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (runningFavoriteScan != null)
|
||||
#runningFavoriteScan: runningFavoriteScan,
|
||||
if (runningIps != null) #runningIps: runningIps,
|
||||
if (devices != null) #devices: devices,
|
||||
if (signalingDevices != null) #signalingDevices: signalingDevices
|
||||
}));
|
||||
$R call({bool? runningFavoriteScan, Set<String>? runningIps, Map<String, Device>? devices, Map<String, Set<Device>>? signalingDevices}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (runningFavoriteScan != null) #runningFavoriteScan: runningFavoriteScan,
|
||||
if (runningIps != null) #runningIps: runningIps,
|
||||
if (devices != null) #devices: devices,
|
||||
if (signalingDevices != null) #signalingDevices: signalingDevices,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
NearbyDevicesState $make(CopyWithData data) => NearbyDevicesState(
|
||||
runningFavoriteScan:
|
||||
data.get(#runningFavoriteScan, or: $value.runningFavoriteScan),
|
||||
runningIps: data.get(#runningIps, or: $value.runningIps),
|
||||
devices: data.get(#devices, or: $value.devices),
|
||||
signalingDevices:
|
||||
data.get(#signalingDevices, or: $value.signalingDevices));
|
||||
runningFavoriteScan: data.get(#runningFavoriteScan, or: $value.runningFavoriteScan),
|
||||
runningIps: data.get(#runningIps, or: $value.runningIps),
|
||||
devices: data.get(#devices, or: $value.devices),
|
||||
signalingDevices: data.get(#signalingDevices, or: $value.signalingDevices),
|
||||
);
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@@ -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 MappableFields<NetworkState> 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,74 +49,58 @@ 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 NetworkStateMapper.ensureInitialized()
|
||||
.equalsValue(this as NetworkState, other);
|
||||
return NetworkStateMapper.ensureInitialized().equalsValue(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));
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -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 MappableFields<PurchaseState> 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,84 +52,61 @@ 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 PurchaseStateMapper.ensureInitialized()
|
||||
.equalsValue(this as PurchaseState, other);
|
||||
return PurchaseStateMapper.ensureInitialized().equalsValue(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),
|
||||
purchases: data.get(#purchases, or: $value.purchases),
|
||||
pending: data.get(#pending, or: $value.pending));
|
||||
prices: data.get(#prices, or: $value.prices),
|
||||
purchases: data.get(#purchases, or: $value.purchases),
|
||||
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,36 +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 List<SendingTask>? _$sendingTasks(SendSessionState v) =>
|
||||
v.sendingTasks;
|
||||
static const Field<SendSessionState, List<SendingTask>> _f$sendingTasks =
|
||||
Field('sendingTasks', _$sendingTasks);
|
||||
static const Field<SendSessionState, int> _f$endTime = Field('endTime', _$endTime);
|
||||
static List<SendingTask>? _$sendingTasks(SendSessionState v) => v.sendingTasks;
|
||||
static const Field<SendSessionState, List<SendingTask>> _f$sendingTasks = Field('sendingTasks', _$sendingTasks);
|
||||
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 MappableFields<SendSessionState> fields = const {
|
||||
@@ -70,16 +59,17 @@ class SendSessionStateMapper extends ClassMapperBase<SendSessionState> {
|
||||
|
||||
static SendSessionState _instantiate(DecodingData data) {
|
||||
return SendSessionState(
|
||||
sessionId: data.dec(_f$sessionId),
|
||||
remoteSessionId: data.dec(_f$remoteSessionId),
|
||||
background: data.dec(_f$background),
|
||||
status: data.dec(_f$status),
|
||||
target: data.dec(_f$target),
|
||||
files: data.dec(_f$files),
|
||||
startTime: data.dec(_f$startTime),
|
||||
endTime: data.dec(_f$endTime),
|
||||
sendingTasks: data.dec(_f$sendingTasks),
|
||||
errorMessage: data.dec(_f$errorMessage));
|
||||
sessionId: data.dec(_f$sessionId),
|
||||
remoteSessionId: data.dec(_f$remoteSessionId),
|
||||
background: data.dec(_f$background),
|
||||
status: data.dec(_f$status),
|
||||
target: data.dec(_f$target),
|
||||
files: data.dec(_f$files),
|
||||
startTime: data.dec(_f$startTime),
|
||||
endTime: data.dec(_f$endTime),
|
||||
sendingTasks: data.dec(_f$sendingTasks),
|
||||
errorMessage: data.dec(_f$errorMessage),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -96,129 +86,109 @@ 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 SendSessionStateMapper.ensureInitialized()
|
||||
.equalsValue(this as SendSessionState, other);
|
||||
return SendSessionStateMapper.ensureInitialized().equalsValue(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;
|
||||
ListCopyWith<$R, SendingTask, ObjectCopyWith<$R, SendingTask, SendingTask>>?
|
||||
get sendingTasks;
|
||||
$R call(
|
||||
{String? sessionId,
|
||||
String? remoteSessionId,
|
||||
bool? background,
|
||||
SessionStatus? status,
|
||||
Device? target,
|
||||
Map<String, SendingFile>? files,
|
||||
int? startTime,
|
||||
int? endTime,
|
||||
List<SendingTask>? sendingTasks,
|
||||
String? errorMessage});
|
||||
SendSessionStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t);
|
||||
MapCopyWith<$R, String, SendingFile, SendingFileCopyWith<$R, SendingFile, SendingFile>> get files;
|
||||
ListCopyWith<$R, SendingTask, ObjectCopyWith<$R, SendingTask, SendingTask>>? get sendingTasks;
|
||||
$R call({
|
||||
String? sessionId,
|
||||
String? remoteSessionId,
|
||||
bool? background,
|
||||
SessionStatus? status,
|
||||
Device? target,
|
||||
Map<String, SendingFile>? files,
|
||||
int? startTime,
|
||||
int? endTime,
|
||||
List<SendingTask>? sendingTasks,
|
||||
String? errorMessage,
|
||||
});
|
||||
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
|
||||
ListCopyWith<$R, SendingTask, ObjectCopyWith<$R, SendingTask, SendingTask>>?
|
||||
get sendingTasks => $value.sendingTasks != null
|
||||
? ListCopyWith(
|
||||
$value.sendingTasks!,
|
||||
(v, t) => ObjectCopyWith(v, $identity, t),
|
||||
(v) => call(sendingTasks: v))
|
||||
: null;
|
||||
ListCopyWith<$R, SendingTask, ObjectCopyWith<$R, SendingTask, SendingTask>>? get sendingTasks => $value.sendingTasks != null
|
||||
? ListCopyWith($value.sendingTasks!, (v, t) => ObjectCopyWith(v, $identity, t), (v) => call(sendingTasks: v))
|
||||
: null;
|
||||
@override
|
||||
$R call(
|
||||
{String? sessionId,
|
||||
Object? remoteSessionId = $none,
|
||||
bool? background,
|
||||
SessionStatus? status,
|
||||
Device? target,
|
||||
Map<String, SendingFile>? files,
|
||||
Object? startTime = $none,
|
||||
Object? endTime = $none,
|
||||
Object? sendingTasks = $none,
|
||||
Object? errorMessage = $none}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (sessionId != null) #sessionId: sessionId,
|
||||
if (remoteSessionId != $none) #remoteSessionId: remoteSessionId,
|
||||
if (background != null) #background: background,
|
||||
if (status != null) #status: status,
|
||||
if (target != null) #target: target,
|
||||
if (files != null) #files: files,
|
||||
if (startTime != $none) #startTime: startTime,
|
||||
if (endTime != $none) #endTime: endTime,
|
||||
if (sendingTasks != $none) #sendingTasks: sendingTasks,
|
||||
if (errorMessage != $none) #errorMessage: errorMessage
|
||||
}));
|
||||
$R call({
|
||||
String? sessionId,
|
||||
Object? remoteSessionId = $none,
|
||||
bool? background,
|
||||
SessionStatus? status,
|
||||
Device? target,
|
||||
Map<String, SendingFile>? files,
|
||||
Object? startTime = $none,
|
||||
Object? endTime = $none,
|
||||
Object? sendingTasks = $none,
|
||||
Object? errorMessage = $none,
|
||||
}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (sessionId != null) #sessionId: sessionId,
|
||||
if (remoteSessionId != $none) #remoteSessionId: remoteSessionId,
|
||||
if (background != null) #background: background,
|
||||
if (status != null) #status: status,
|
||||
if (target != null) #target: target,
|
||||
if (files != null) #files: files,
|
||||
if (startTime != $none) #startTime: startTime,
|
||||
if (endTime != $none) #endTime: endTime,
|
||||
if (sendingTasks != $none) #sendingTasks: sendingTasks,
|
||||
if (errorMessage != $none) #errorMessage: errorMessage,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
SendSessionState $make(CopyWithData data) => SendSessionState(
|
||||
sessionId: data.get(#sessionId, or: $value.sessionId),
|
||||
remoteSessionId: data.get(#remoteSessionId, or: $value.remoteSessionId),
|
||||
background: data.get(#background, or: $value.background),
|
||||
status: data.get(#status, or: $value.status),
|
||||
target: data.get(#target, or: $value.target),
|
||||
files: data.get(#files, or: $value.files),
|
||||
startTime: data.get(#startTime, or: $value.startTime),
|
||||
endTime: data.get(#endTime, or: $value.endTime),
|
||||
sendingTasks: data.get(#sendingTasks, or: $value.sendingTasks),
|
||||
errorMessage: data.get(#errorMessage, or: $value.errorMessage));
|
||||
sessionId: data.get(#sessionId, or: $value.sessionId),
|
||||
remoteSessionId: data.get(#remoteSessionId, or: $value.remoteSessionId),
|
||||
background: data.get(#background, or: $value.background),
|
||||
status: data.get(#status, or: $value.status),
|
||||
target: data.get(#target, or: $value.target),
|
||||
files: data.get(#files, or: $value.files),
|
||||
startTime: data.get(#startTime, or: $value.startTime),
|
||||
endTime: data.get(#endTime, or: $value.endTime),
|
||||
sendingTasks: data.get(#sendingTasks, or: $value.sendingTasks),
|
||||
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 MappableFields<SendingFile> fields = const {
|
||||
@@ -55,14 +51,15 @@ class SendingFileMapper extends ClassMapperBase<SendingFile> {
|
||||
|
||||
static SendingFile _instantiate(DecodingData data) {
|
||||
return SendingFile(
|
||||
file: data.dec(_f$file),
|
||||
status: data.dec(_f$status),
|
||||
token: data.dec(_f$token),
|
||||
thumbnail: data.dec(_f$thumbnail),
|
||||
asset: data.dec(_f$asset),
|
||||
path: data.dec(_f$path),
|
||||
bytes: data.dec(_f$bytes),
|
||||
errorMessage: data.dec(_f$errorMessage));
|
||||
file: data.dec(_f$file),
|
||||
status: data.dec(_f$status),
|
||||
token: data.dec(_f$token),
|
||||
thumbnail: data.dec(_f$thumbnail),
|
||||
asset: data.dec(_f$asset),
|
||||
path: data.dec(_f$path),
|
||||
bytes: data.dec(_f$bytes),
|
||||
errorMessage: data.dec(_f$errorMessage),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -79,27 +76,22 @@ 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 SendingFileMapper.ensureInitialized()
|
||||
.equalsValue(this as SendingFile, other);
|
||||
return SendingFileMapper.ensureInitialized().equalsValue(this as SendingFile, other);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -108,74 +100,67 @@ 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,
|
||||
FileStatus? status,
|
||||
String? token,
|
||||
Uint8List? thumbnail,
|
||||
AssetEntity? asset,
|
||||
String? path,
|
||||
List<int>? bytes,
|
||||
String? errorMessage});
|
||||
$R call({
|
||||
FileDto? file,
|
||||
FileStatus? status,
|
||||
String? token,
|
||||
Uint8List? thumbnail,
|
||||
AssetEntity? asset,
|
||||
String? path,
|
||||
List<int>? bytes,
|
||||
String? errorMessage,
|
||||
});
|
||||
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,
|
||||
FileStatus? status,
|
||||
Object? token = $none,
|
||||
Object? thumbnail = $none,
|
||||
Object? asset = $none,
|
||||
Object? path = $none,
|
||||
Object? bytes = $none,
|
||||
Object? errorMessage = $none}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (file != null) #file: file,
|
||||
if (status != null) #status: status,
|
||||
if (token != $none) #token: token,
|
||||
if (thumbnail != $none) #thumbnail: thumbnail,
|
||||
if (asset != $none) #asset: asset,
|
||||
if (path != $none) #path: path,
|
||||
if (bytes != $none) #bytes: bytes,
|
||||
if (errorMessage != $none) #errorMessage: errorMessage
|
||||
}));
|
||||
$R call({
|
||||
FileDto? file,
|
||||
FileStatus? status,
|
||||
Object? token = $none,
|
||||
Object? thumbnail = $none,
|
||||
Object? asset = $none,
|
||||
Object? path = $none,
|
||||
Object? bytes = $none,
|
||||
Object? errorMessage = $none,
|
||||
}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (file != null) #file: file,
|
||||
if (status != null) #status: status,
|
||||
if (token != $none) #token: token,
|
||||
if (thumbnail != $none) #thumbnail: thumbnail,
|
||||
if (asset != $none) #asset: asset,
|
||||
if (path != $none) #path: path,
|
||||
if (bytes != $none) #bytes: bytes,
|
||||
if (errorMessage != $none) #errorMessage: errorMessage,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
SendingFile $make(CopyWithData data) => SendingFile(
|
||||
file: data.get(#file, or: $value.file),
|
||||
status: data.get(#status, or: $value.status),
|
||||
token: data.get(#token, or: $value.token),
|
||||
thumbnail: data.get(#thumbnail, or: $value.thumbnail),
|
||||
asset: data.get(#asset, or: $value.asset),
|
||||
path: data.get(#path, or: $value.path),
|
||||
bytes: data.get(#bytes, or: $value.bytes),
|
||||
errorMessage: data.get(#errorMessage, or: $value.errorMessage));
|
||||
file: data.get(#file, or: $value.file),
|
||||
status: data.get(#status, or: $value.status),
|
||||
token: data.get(#token, or: $value.token),
|
||||
thumbnail: data.get(#thumbnail, or: $value.thumbnail),
|
||||
asset: data.get(#asset, or: $value.asset),
|
||||
path: data.get(#path, or: $value.path),
|
||||
bytes: data.get(#bytes, or: $value.bytes),
|
||||
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,27 +55,22 @@ 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 WebSendFileMapper.ensureInitialized()
|
||||
.equalsValue(this as WebSendFile, other);
|
||||
return WebSendFileMapper.ensureInitialized().equalsValue(this as WebSendFile, other);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -89,54 +79,41 @@ 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),
|
||||
asset: data.get(#asset, or: $value.asset),
|
||||
path: data.get(#path, or: $value.path),
|
||||
bytes: data.get(#bytes, or: $value.bytes));
|
||||
file: data.get(#file, or: $value.file),
|
||||
asset: data.get(#asset, or: $value.asset),
|
||||
path: data.get(#path, or: $value.path),
|
||||
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 MappableFields<WebSendSession> fields = const {
|
||||
@@ -43,10 +39,11 @@ 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,83 +60,63 @@ 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 WebSendSessionMapper.ensureInitialized()
|
||||
.equalsValue(this as WebSendSession, other);
|
||||
return WebSendSessionMapper.ensureInitialized().equalsValue(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({
|
||||
if (sessionId != null) #sessionId: sessionId,
|
||||
if (responseHandler != $none) #responseHandler: responseHandler,
|
||||
if (ip != null) #ip: ip,
|
||||
if (deviceInfo != null) #deviceInfo: deviceInfo
|
||||
}));
|
||||
$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,
|
||||
if (deviceInfo != null) #deviceInfo: deviceInfo,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
WebSendSession $make(CopyWithData data) => WebSendSession(
|
||||
sessionId: data.get(#sessionId, or: $value.sessionId),
|
||||
responseHandler: data.get(#responseHandler, or: $value.responseHandler),
|
||||
ip: data.get(#ip, or: $value.ip),
|
||||
deviceInfo: data.get(#deviceInfo, or: $value.deviceInfo));
|
||||
sessionId: data.get(#sessionId, or: $value.sessionId),
|
||||
responseHandler: data.get(#responseHandler, or: $value.responseHandler),
|
||||
ip: data.get(#ip, or: $value.ip),
|
||||
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,19 +23,15 @@ 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);
|
||||
static String? _$pin(WebSendState v) => v.pin;
|
||||
static const Field<WebSendState, String> _f$pin = Field('pin', _$pin);
|
||||
static Map<String, int> _$pinAttempts(WebSendState v) => v.pinAttempts;
|
||||
static const Field<WebSendState, Map<String, int>> _f$pinAttempts =
|
||||
Field('pinAttempts', _$pinAttempts);
|
||||
static const Field<WebSendState, Map<String, int>> _f$pinAttempts = Field('pinAttempts', _$pinAttempts);
|
||||
|
||||
@override
|
||||
final MappableFields<WebSendState> fields = const {
|
||||
@@ -48,11 +44,12 @@ 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),
|
||||
pin: data.dec(_f$pin),
|
||||
pinAttempts: data.dec(_f$pinAttempts));
|
||||
sessions: data.dec(_f$sessions),
|
||||
files: data.dec(_f$files),
|
||||
autoAccept: data.dec(_f$autoAccept),
|
||||
pin: data.dec(_f$pin),
|
||||
pinAttempts: data.dec(_f$pinAttempts),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -69,104 +66,82 @@ 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 WebSendStateMapper.ensureInitialized()
|
||||
.equalsValue(this as WebSendState, other);
|
||||
return WebSendStateMapper.ensureInitialized().equalsValue(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;
|
||||
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;
|
||||
MapCopyWith<$R, String, int, ObjectCopyWith<$R, int, int>> get pinAttempts;
|
||||
$R call(
|
||||
{Map<String, WebSendSession>? sessions,
|
||||
Map<String, WebSendFile>? files,
|
||||
bool? autoAccept,
|
||||
String? pin,
|
||||
Map<String, int>? pinAttempts});
|
||||
$R call({Map<String, WebSendSession>? sessions, Map<String, WebSendFile>? files, bool? autoAccept, String? pin, Map<String, int>? pinAttempts});
|
||||
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
|
||||
MapCopyWith<$R, String, int, ObjectCopyWith<$R, int, int>> get pinAttempts =>
|
||||
MapCopyWith($value.pinAttempts, (v, t) => ObjectCopyWith(v, $identity, t),
|
||||
(v) => call(pinAttempts: v));
|
||||
MapCopyWith($value.pinAttempts, (v, t) => ObjectCopyWith(v, $identity, t), (v) => call(pinAttempts: v));
|
||||
@override
|
||||
$R call(
|
||||
{Map<String, WebSendSession>? sessions,
|
||||
Map<String, WebSendFile>? files,
|
||||
bool? autoAccept,
|
||||
Object? pin = $none,
|
||||
Map<String, int>? pinAttempts}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (sessions != null) #sessions: sessions,
|
||||
if (files != null) #files: files,
|
||||
if (autoAccept != null) #autoAccept: autoAccept,
|
||||
if (pin != $none) #pin: pin,
|
||||
if (pinAttempts != null) #pinAttempts: pinAttempts
|
||||
}));
|
||||
$R call({
|
||||
Map<String, WebSendSession>? sessions,
|
||||
Map<String, WebSendFile>? files,
|
||||
bool? autoAccept,
|
||||
Object? pin = $none,
|
||||
Map<String, int>? pinAttempts,
|
||||
}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (sessions != null) #sessions: sessions,
|
||||
if (files != null) #files: files,
|
||||
if (autoAccept != null) #autoAccept: autoAccept,
|
||||
if (pin != $none) #pin: pin,
|
||||
if (pinAttempts != null) #pinAttempts: pinAttempts,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
WebSendState $make(CopyWithData data) => WebSendState(
|
||||
sessions: data.get(#sessions, or: $value.sessions),
|
||||
files: data.get(#files, or: $value.files),
|
||||
autoAccept: data.get(#autoAccept, or: $value.autoAccept),
|
||||
pin: data.get(#pin, or: $value.pin),
|
||||
pinAttempts: data.get(#pinAttempts, or: $value.pinAttempts));
|
||||
sessions: data.get(#sessions, or: $value.sessions),
|
||||
files: data.get(#files, or: $value.files),
|
||||
autoAccept: data.get(#autoAccept, or: $value.autoAccept),
|
||||
pin: data.get(#pin, or: $value.pin),
|
||||
pinAttempts: data.get(#pinAttempts, or: $value.pinAttempts),
|
||||
);
|
||||
|
||||
@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,46 +23,29 @@ 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 String _$cacheDirectory(ReceiveSessionState v) => v.cacheDirectory;
|
||||
static const Field<ReceiveSessionState, String> _f$cacheDirectory =
|
||||
Field('cacheDirectory', _$cacheDirectory);
|
||||
static const Field<ReceiveSessionState, String> _f$cacheDirectory = Field('cacheDirectory', _$cacheDirectory);
|
||||
static bool _$saveToGallery(ReceiveSessionState v) => v.saveToGallery;
|
||||
static const Field<ReceiveSessionState, bool> _f$saveToGallery =
|
||||
Field('saveToGallery', _$saveToGallery);
|
||||
static Set<String> _$createdDirectories(ReceiveSessionState v) =>
|
||||
v.createdDirectories;
|
||||
static const Field<ReceiveSessionState, Set<String>> _f$createdDirectories =
|
||||
Field('createdDirectories', _$createdDirectories);
|
||||
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 Set<String> _$createdDirectories(ReceiveSessionState v) => v.createdDirectories;
|
||||
static const Field<ReceiveSessionState, Set<String>> _f$createdDirectories = Field('createdDirectories', _$createdDirectories);
|
||||
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 MappableFields<ReceiveSessionState> fields = const {
|
||||
@@ -82,18 +65,19 @@ class ReceiveSessionStateMapper extends ClassMapperBase<ReceiveSessionState> {
|
||||
|
||||
static ReceiveSessionState _instantiate(DecodingData data) {
|
||||
return ReceiveSessionState(
|
||||
sessionId: data.dec(_f$sessionId),
|
||||
status: data.dec(_f$status),
|
||||
sender: data.dec(_f$sender),
|
||||
senderAlias: data.dec(_f$senderAlias),
|
||||
files: data.dec(_f$files),
|
||||
startTime: data.dec(_f$startTime),
|
||||
endTime: data.dec(_f$endTime),
|
||||
destinationDirectory: data.dec(_f$destinationDirectory),
|
||||
cacheDirectory: data.dec(_f$cacheDirectory),
|
||||
saveToGallery: data.dec(_f$saveToGallery),
|
||||
createdDirectories: data.dec(_f$createdDirectories),
|
||||
responseHandler: data.dec(_f$responseHandler));
|
||||
sessionId: data.dec(_f$sessionId),
|
||||
status: data.dec(_f$status),
|
||||
sender: data.dec(_f$sender),
|
||||
senderAlias: data.dec(_f$senderAlias),
|
||||
files: data.dec(_f$files),
|
||||
startTime: data.dec(_f$startTime),
|
||||
endTime: data.dec(_f$endTime),
|
||||
destinationDirectory: data.dec(_f$destinationDirectory),
|
||||
cacheDirectory: data.dec(_f$cacheDirectory),
|
||||
saveToGallery: data.dec(_f$saveToGallery),
|
||||
createdDirectories: data.dec(_f$createdDirectories),
|
||||
responseHandler: data.dec(_f$responseHandler),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -110,131 +94,114 @@ 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 ReceiveSessionStateMapper.ensureInitialized()
|
||||
.equalsValue(this as ReceiveSessionState, other);
|
||||
return ReceiveSessionStateMapper.ensureInitialized().equalsValue(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;
|
||||
$R call(
|
||||
{String? sessionId,
|
||||
SessionStatus? status,
|
||||
Device? sender,
|
||||
String? senderAlias,
|
||||
Map<String, ReceivingFile>? files,
|
||||
int? startTime,
|
||||
int? endTime,
|
||||
String? destinationDirectory,
|
||||
String? cacheDirectory,
|
||||
bool? saveToGallery,
|
||||
Set<String>? createdDirectories,
|
||||
StreamController<Map<String, String>?>? responseHandler});
|
||||
ReceiveSessionStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t);
|
||||
MapCopyWith<$R, String, ReceivingFile, ReceivingFileCopyWith<$R, ReceivingFile, ReceivingFile>> get files;
|
||||
$R call({
|
||||
String? sessionId,
|
||||
SessionStatus? status,
|
||||
Device? sender,
|
||||
String? senderAlias,
|
||||
Map<String, ReceivingFile>? files,
|
||||
int? startTime,
|
||||
int? endTime,
|
||||
String? destinationDirectory,
|
||||
String? cacheDirectory,
|
||||
bool? saveToGallery,
|
||||
Set<String>? createdDirectories,
|
||||
StreamController<Map<String, String>?>? responseHandler,
|
||||
});
|
||||
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,
|
||||
SessionStatus? status,
|
||||
Device? sender,
|
||||
String? senderAlias,
|
||||
Map<String, ReceivingFile>? files,
|
||||
Object? startTime = $none,
|
||||
Object? endTime = $none,
|
||||
String? destinationDirectory,
|
||||
String? cacheDirectory,
|
||||
bool? saveToGallery,
|
||||
Set<String>? createdDirectories,
|
||||
Object? responseHandler = $none}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (sessionId != null) #sessionId: sessionId,
|
||||
if (status != null) #status: status,
|
||||
if (sender != null) #sender: sender,
|
||||
if (senderAlias != null) #senderAlias: senderAlias,
|
||||
if (files != null) #files: files,
|
||||
if (startTime != $none) #startTime: startTime,
|
||||
if (endTime != $none) #endTime: endTime,
|
||||
if (destinationDirectory != null)
|
||||
#destinationDirectory: destinationDirectory,
|
||||
if (cacheDirectory != null) #cacheDirectory: cacheDirectory,
|
||||
if (saveToGallery != null) #saveToGallery: saveToGallery,
|
||||
if (createdDirectories != null) #createdDirectories: createdDirectories,
|
||||
if (responseHandler != $none) #responseHandler: responseHandler
|
||||
}));
|
||||
$R call({
|
||||
String? sessionId,
|
||||
SessionStatus? status,
|
||||
Device? sender,
|
||||
String? senderAlias,
|
||||
Map<String, ReceivingFile>? files,
|
||||
Object? startTime = $none,
|
||||
Object? endTime = $none,
|
||||
String? destinationDirectory,
|
||||
String? cacheDirectory,
|
||||
bool? saveToGallery,
|
||||
Set<String>? createdDirectories,
|
||||
Object? responseHandler = $none,
|
||||
}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (sessionId != null) #sessionId: sessionId,
|
||||
if (status != null) #status: status,
|
||||
if (sender != null) #sender: sender,
|
||||
if (senderAlias != null) #senderAlias: senderAlias,
|
||||
if (files != null) #files: files,
|
||||
if (startTime != $none) #startTime: startTime,
|
||||
if (endTime != $none) #endTime: endTime,
|
||||
if (destinationDirectory != null) #destinationDirectory: destinationDirectory,
|
||||
if (cacheDirectory != null) #cacheDirectory: cacheDirectory,
|
||||
if (saveToGallery != null) #saveToGallery: saveToGallery,
|
||||
if (createdDirectories != null) #createdDirectories: createdDirectories,
|
||||
if (responseHandler != $none) #responseHandler: responseHandler,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
ReceiveSessionState $make(CopyWithData data) => ReceiveSessionState(
|
||||
sessionId: data.get(#sessionId, or: $value.sessionId),
|
||||
status: data.get(#status, or: $value.status),
|
||||
sender: data.get(#sender, or: $value.sender),
|
||||
senderAlias: data.get(#senderAlias, or: $value.senderAlias),
|
||||
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),
|
||||
cacheDirectory: data.get(#cacheDirectory, or: $value.cacheDirectory),
|
||||
saveToGallery: data.get(#saveToGallery, or: $value.saveToGallery),
|
||||
createdDirectories:
|
||||
data.get(#createdDirectories, or: $value.createdDirectories),
|
||||
responseHandler: data.get(#responseHandler, or: $value.responseHandler));
|
||||
sessionId: data.get(#sessionId, or: $value.sessionId),
|
||||
status: data.get(#status, or: $value.status),
|
||||
sender: data.get(#sender, or: $value.sender),
|
||||
senderAlias: data.get(#senderAlias, or: $value.senderAlias),
|
||||
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),
|
||||
cacheDirectory: data.get(#cacheDirectory, or: $value.cacheDirectory),
|
||||
saveToGallery: data.get(#saveToGallery, or: $value.saveToGallery),
|
||||
createdDirectories: data.get(#createdDirectories, or: $value.createdDirectories),
|
||||
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 MappableFields<ReceivingFile> fields = const {
|
||||
@@ -52,13 +48,14 @@ class ReceivingFileMapper extends ClassMapperBase<ReceivingFile> {
|
||||
|
||||
static ReceivingFile _instantiate(DecodingData data) {
|
||||
return ReceivingFile(
|
||||
file: data.dec(_f$file),
|
||||
status: data.dec(_f$status),
|
||||
token: data.dec(_f$token),
|
||||
desiredName: data.dec(_f$desiredName),
|
||||
path: data.dec(_f$path),
|
||||
savedToGallery: data.dec(_f$savedToGallery),
|
||||
errorMessage: data.dec(_f$errorMessage));
|
||||
file: data.dec(_f$file),
|
||||
status: data.dec(_f$status),
|
||||
token: data.dec(_f$token),
|
||||
desiredName: data.dec(_f$desiredName),
|
||||
path: data.dec(_f$path),
|
||||
savedToGallery: data.dec(_f$savedToGallery),
|
||||
errorMessage: data.dec(_f$errorMessage),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -75,94 +72,77 @@ 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 ReceivingFileMapper.ensureInitialized()
|
||||
.equalsValue(this as ReceivingFile, other);
|
||||
return ReceivingFileMapper.ensureInitialized().equalsValue(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,
|
||||
FileStatus? status,
|
||||
Object? token = $none,
|
||||
Object? desiredName = $none,
|
||||
Object? path = $none,
|
||||
bool? savedToGallery,
|
||||
Object? errorMessage = $none}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (file != null) #file: file,
|
||||
if (status != null) #status: status,
|
||||
if (token != $none) #token: token,
|
||||
if (desiredName != $none) #desiredName: desiredName,
|
||||
if (path != $none) #path: path,
|
||||
if (savedToGallery != null) #savedToGallery: savedToGallery,
|
||||
if (errorMessage != $none) #errorMessage: errorMessage
|
||||
}));
|
||||
$R call({
|
||||
FileDto? file,
|
||||
FileStatus? status,
|
||||
Object? token = $none,
|
||||
Object? desiredName = $none,
|
||||
Object? path = $none,
|
||||
bool? savedToGallery,
|
||||
Object? errorMessage = $none,
|
||||
}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (file != null) #file: file,
|
||||
if (status != null) #status: status,
|
||||
if (token != $none) #token: token,
|
||||
if (desiredName != $none) #desiredName: desiredName,
|
||||
if (path != $none) #path: path,
|
||||
if (savedToGallery != null) #savedToGallery: savedToGallery,
|
||||
if (errorMessage != $none) #errorMessage: errorMessage,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
ReceivingFile $make(CopyWithData data) => ReceivingFile(
|
||||
file: data.get(#file, or: $value.file),
|
||||
status: data.get(#status, or: $value.status),
|
||||
token: data.get(#token, or: $value.token),
|
||||
desiredName: data.get(#desiredName, or: $value.desiredName),
|
||||
path: data.get(#path, or: $value.path),
|
||||
savedToGallery: data.get(#savedToGallery, or: $value.savedToGallery),
|
||||
errorMessage: data.get(#errorMessage, or: $value.errorMessage));
|
||||
file: data.get(#file, or: $value.file),
|
||||
status: data.get(#status, or: $value.status),
|
||||
token: data.get(#token, or: $value.token),
|
||||
desiredName: data.get(#desiredName, or: $value.desiredName),
|
||||
path: data.get(#path, or: $value.path),
|
||||
savedToGallery: data.get(#savedToGallery, or: $value.savedToGallery),
|
||||
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 SimpleServer _$httpServer(ServerState v) => v.httpServer;
|
||||
static const Field<ServerState, SimpleServer> _f$httpServer =
|
||||
Field('httpServer', _$httpServer);
|
||||
static const Field<ServerState, SimpleServer> _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,14 +31,11 @@ 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);
|
||||
static Map<String, int> _$pinAttempts(ServerState v) => v.pinAttempts;
|
||||
static const Field<ServerState, Map<String, int>> _f$pinAttempts =
|
||||
Field('pinAttempts', _$pinAttempts);
|
||||
static const Field<ServerState, Map<String, int>> _f$pinAttempts = Field('pinAttempts', _$pinAttempts);
|
||||
|
||||
@override
|
||||
final MappableFields<ServerState> fields = const {
|
||||
@@ -54,13 +50,14 @@ class ServerStateMapper extends ClassMapperBase<ServerState> {
|
||||
|
||||
static ServerState _instantiate(DecodingData data) {
|
||||
return ServerState(
|
||||
httpServer: data.dec(_f$httpServer),
|
||||
alias: data.dec(_f$alias),
|
||||
port: data.dec(_f$port),
|
||||
https: data.dec(_f$https),
|
||||
session: data.dec(_f$session),
|
||||
webSendState: data.dec(_f$webSendState),
|
||||
pinAttempts: data.dec(_f$pinAttempts));
|
||||
httpServer: data.dec(_f$httpServer),
|
||||
alias: data.dec(_f$alias),
|
||||
port: data.dec(_f$port),
|
||||
https: data.dec(_f$https),
|
||||
session: data.dec(_f$session),
|
||||
webSendState: data.dec(_f$webSendState),
|
||||
pinAttempts: data.dec(_f$pinAttempts),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -77,27 +74,22 @@ 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 ServerStateMapper.ensureInitialized()
|
||||
.equalsValue(this as ServerState, other);
|
||||
return ServerStateMapper.ensureInitialized().equalsValue(this as ServerState, other);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -106,77 +98,69 @@ 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;
|
||||
MapCopyWith<$R, String, int, ObjectCopyWith<$R, int, int>> get pinAttempts;
|
||||
$R call(
|
||||
{SimpleServer? httpServer,
|
||||
String? alias,
|
||||
int? port,
|
||||
bool? https,
|
||||
ReceiveSessionState? session,
|
||||
WebSendState? webSendState,
|
||||
Map<String, int>? pinAttempts});
|
||||
$R call({
|
||||
SimpleServer? httpServer,
|
||||
String? alias,
|
||||
int? port,
|
||||
bool? https,
|
||||
ReceiveSessionState? session,
|
||||
WebSendState? webSendState,
|
||||
Map<String, int>? pinAttempts,
|
||||
});
|
||||
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
|
||||
MapCopyWith<$R, String, int, ObjectCopyWith<$R, int, int>> get pinAttempts =>
|
||||
MapCopyWith($value.pinAttempts, (v, t) => ObjectCopyWith(v, $identity, t),
|
||||
(v) => call(pinAttempts: v));
|
||||
MapCopyWith($value.pinAttempts, (v, t) => ObjectCopyWith(v, $identity, t), (v) => call(pinAttempts: v));
|
||||
@override
|
||||
$R call(
|
||||
{SimpleServer? httpServer,
|
||||
String? alias,
|
||||
int? port,
|
||||
bool? https,
|
||||
Object? session = $none,
|
||||
Object? webSendState = $none,
|
||||
Map<String, int>? pinAttempts}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (httpServer != null) #httpServer: httpServer,
|
||||
if (alias != null) #alias: alias,
|
||||
if (port != null) #port: port,
|
||||
if (https != null) #https: https,
|
||||
if (session != $none) #session: session,
|
||||
if (webSendState != $none) #webSendState: webSendState,
|
||||
if (pinAttempts != null) #pinAttempts: pinAttempts
|
||||
}));
|
||||
$R call({
|
||||
SimpleServer? httpServer,
|
||||
String? alias,
|
||||
int? port,
|
||||
bool? https,
|
||||
Object? session = $none,
|
||||
Object? webSendState = $none,
|
||||
Map<String, int>? pinAttempts,
|
||||
}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (httpServer != null) #httpServer: httpServer,
|
||||
if (alias != null) #alias: alias,
|
||||
if (port != null) #port: port,
|
||||
if (https != null) #https: https,
|
||||
if (session != $none) #session: session,
|
||||
if (webSendState != $none) #webSendState: webSendState,
|
||||
if (pinAttempts != null) #pinAttempts: pinAttempts,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
ServerState $make(CopyWithData data) => ServerState(
|
||||
httpServer: data.get(#httpServer, or: $value.httpServer),
|
||||
alias: data.get(#alias, or: $value.alias),
|
||||
port: data.get(#port, or: $value.port),
|
||||
https: data.get(#https, or: $value.https),
|
||||
session: data.get(#session, or: $value.session),
|
||||
webSendState: data.get(#webSendState, or: $value.webSendState),
|
||||
pinAttempts: data.get(#pinAttempts, or: $value.pinAttempts));
|
||||
httpServer: data.get(#httpServer, or: $value.httpServer),
|
||||
alias: data.get(#alias, or: $value.alias),
|
||||
port: data.get(#port, or: $value.port),
|
||||
https: data.get(#https, or: $value.https),
|
||||
session: data.get(#session, or: $value.session),
|
||||
webSendState: data.get(#webSendState, or: $value.webSendState),
|
||||
pinAttempts: data.get(#pinAttempts, or: $value.pinAttempts),
|
||||
);
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@@ -22,84 +22,57 @@ 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 List<String>? _$networkWhitelist(SettingsState v) =>
|
||||
v.networkWhitelist;
|
||||
static const Field<SettingsState, List<String>> _f$networkWhitelist =
|
||||
Field('networkWhitelist', _$networkWhitelist);
|
||||
static List<String>? _$networkBlacklist(SettingsState v) =>
|
||||
v.networkBlacklist;
|
||||
static const Field<SettingsState, List<String>> _f$networkBlacklist =
|
||||
Field('networkBlacklist', _$networkBlacklist);
|
||||
static List<String>? _$networkWhitelist(SettingsState v) => v.networkWhitelist;
|
||||
static const Field<SettingsState, List<String>> _f$networkWhitelist = Field('networkWhitelist', _$networkWhitelist);
|
||||
static List<String>? _$networkBlacklist(SettingsState v) => v.networkBlacklist;
|
||||
static const Field<SettingsState, List<String>> _f$networkBlacklist = Field('networkBlacklist', _$networkBlacklist);
|
||||
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 bool _$quickSaveFromFavorites(SettingsState v) =>
|
||||
v.quickSaveFromFavorites;
|
||||
static const Field<SettingsState, bool> _f$quickSaveFromFavorites =
|
||||
Field('quickSaveFromFavorites', _$quickSaveFromFavorites);
|
||||
static const Field<SettingsState, bool> _f$quickSave = Field('quickSave', _$quickSave);
|
||||
static bool _$quickSaveFromFavorites(SettingsState v) => v.quickSaveFromFavorites;
|
||||
static const Field<SettingsState, bool> _f$quickSaveFromFavorites = Field('quickSaveFromFavorites', _$quickSaveFromFavorites);
|
||||
static String? _$receivePin(SettingsState v) => v.receivePin;
|
||||
static const Field<SettingsState, String> _f$receivePin =
|
||||
Field('receivePin', _$receivePin);
|
||||
static const Field<SettingsState, String> _f$receivePin = Field('receivePin', _$receivePin);
|
||||
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 _$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);
|
||||
static int _$discoveryTimeout(SettingsState v) => v.discoveryTimeout;
|
||||
static const Field<SettingsState, int> _f$discoveryTimeout =
|
||||
Field('discoveryTimeout', _$discoveryTimeout);
|
||||
static const Field<SettingsState, int> _f$discoveryTimeout = Field('discoveryTimeout', _$discoveryTimeout);
|
||||
static bool _$advancedSettings(SettingsState v) => v.advancedSettings;
|
||||
static const Field<SettingsState, bool> _f$advancedSettings =
|
||||
Field('advancedSettings', _$advancedSettings);
|
||||
static const Field<SettingsState, bool> _f$advancedSettings = Field('advancedSettings', _$advancedSettings);
|
||||
|
||||
@override
|
||||
final MappableFields<SettingsState> fields = const {
|
||||
@@ -133,32 +106,33 @@ class SettingsStateMapper extends ClassMapperBase<SettingsState> {
|
||||
|
||||
static SettingsState _instantiate(DecodingData data) {
|
||||
return SettingsState(
|
||||
showToken: data.dec(_f$showToken),
|
||||
alias: data.dec(_f$alias),
|
||||
theme: data.dec(_f$theme),
|
||||
colorMode: data.dec(_f$colorMode),
|
||||
locale: data.dec(_f$locale),
|
||||
port: data.dec(_f$port),
|
||||
networkWhitelist: data.dec(_f$networkWhitelist),
|
||||
networkBlacklist: data.dec(_f$networkBlacklist),
|
||||
multicastGroup: data.dec(_f$multicastGroup),
|
||||
destination: data.dec(_f$destination),
|
||||
saveToGallery: data.dec(_f$saveToGallery),
|
||||
saveToHistory: data.dec(_f$saveToHistory),
|
||||
quickSave: data.dec(_f$quickSave),
|
||||
quickSaveFromFavorites: data.dec(_f$quickSaveFromFavorites),
|
||||
receivePin: data.dec(_f$receivePin),
|
||||
autoFinish: data.dec(_f$autoFinish),
|
||||
minimizeToTray: data.dec(_f$minimizeToTray),
|
||||
https: data.dec(_f$https),
|
||||
sendMode: data.dec(_f$sendMode),
|
||||
saveWindowPlacement: data.dec(_f$saveWindowPlacement),
|
||||
enableAnimations: data.dec(_f$enableAnimations),
|
||||
deviceType: data.dec(_f$deviceType),
|
||||
deviceModel: data.dec(_f$deviceModel),
|
||||
shareViaLinkAutoAccept: data.dec(_f$shareViaLinkAutoAccept),
|
||||
discoveryTimeout: data.dec(_f$discoveryTimeout),
|
||||
advancedSettings: data.dec(_f$advancedSettings));
|
||||
showToken: data.dec(_f$showToken),
|
||||
alias: data.dec(_f$alias),
|
||||
theme: data.dec(_f$theme),
|
||||
colorMode: data.dec(_f$colorMode),
|
||||
locale: data.dec(_f$locale),
|
||||
port: data.dec(_f$port),
|
||||
networkWhitelist: data.dec(_f$networkWhitelist),
|
||||
networkBlacklist: data.dec(_f$networkBlacklist),
|
||||
multicastGroup: data.dec(_f$multicastGroup),
|
||||
destination: data.dec(_f$destination),
|
||||
saveToGallery: data.dec(_f$saveToGallery),
|
||||
saveToHistory: data.dec(_f$saveToHistory),
|
||||
quickSave: data.dec(_f$quickSave),
|
||||
quickSaveFromFavorites: data.dec(_f$quickSaveFromFavorites),
|
||||
receivePin: data.dec(_f$receivePin),
|
||||
autoFinish: data.dec(_f$autoFinish),
|
||||
minimizeToTray: data.dec(_f$minimizeToTray),
|
||||
https: data.dec(_f$https),
|
||||
sendMode: data.dec(_f$sendMode),
|
||||
saveWindowPlacement: data.dec(_f$saveWindowPlacement),
|
||||
enableAnimations: data.dec(_f$enableAnimations),
|
||||
deviceType: data.dec(_f$deviceType),
|
||||
deviceModel: data.dec(_f$deviceModel),
|
||||
shareViaLinkAutoAccept: data.dec(_f$shareViaLinkAutoAccept),
|
||||
discoveryTimeout: data.dec(_f$discoveryTimeout),
|
||||
advancedSettings: data.dec(_f$advancedSettings),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -175,201 +149,171 @@ 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 SettingsStateMapper.ensureInitialized()
|
||||
.equalsValue(this as SettingsState, other);
|
||||
return SettingsStateMapper.ensureInitialized().equalsValue(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> {
|
||||
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>>?
|
||||
get networkWhitelist;
|
||||
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>>?
|
||||
get networkBlacklist;
|
||||
$R call(
|
||||
{String? showToken,
|
||||
String? alias,
|
||||
ThemeMode? theme,
|
||||
ColorMode? colorMode,
|
||||
AppLocale? locale,
|
||||
int? port,
|
||||
List<String>? networkWhitelist,
|
||||
List<String>? networkBlacklist,
|
||||
String? multicastGroup,
|
||||
String? destination,
|
||||
bool? saveToGallery,
|
||||
bool? saveToHistory,
|
||||
bool? quickSave,
|
||||
bool? quickSaveFromFavorites,
|
||||
String? receivePin,
|
||||
bool? autoFinish,
|
||||
bool? minimizeToTray,
|
||||
bool? https,
|
||||
SendMode? sendMode,
|
||||
bool? saveWindowPlacement,
|
||||
bool? enableAnimations,
|
||||
DeviceType? deviceType,
|
||||
String? deviceModel,
|
||||
bool? shareViaLinkAutoAccept,
|
||||
int? discoveryTimeout,
|
||||
bool? advancedSettings});
|
||||
abstract class SettingsStateCopyWith<$R, $In extends SettingsState, $Out> implements ClassCopyWith<$R, $In, $Out> {
|
||||
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>>? get networkWhitelist;
|
||||
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>>? get networkBlacklist;
|
||||
$R call({
|
||||
String? showToken,
|
||||
String? alias,
|
||||
ThemeMode? theme,
|
||||
ColorMode? colorMode,
|
||||
AppLocale? locale,
|
||||
int? port,
|
||||
List<String>? networkWhitelist,
|
||||
List<String>? networkBlacklist,
|
||||
String? multicastGroup,
|
||||
String? destination,
|
||||
bool? saveToGallery,
|
||||
bool? saveToHistory,
|
||||
bool? quickSave,
|
||||
bool? quickSaveFromFavorites,
|
||||
String? receivePin,
|
||||
bool? autoFinish,
|
||||
bool? minimizeToTray,
|
||||
bool? https,
|
||||
SendMode? sendMode,
|
||||
bool? saveWindowPlacement,
|
||||
bool? enableAnimations,
|
||||
DeviceType? deviceType,
|
||||
String? deviceModel,
|
||||
bool? shareViaLinkAutoAccept,
|
||||
int? discoveryTimeout,
|
||||
bool? advancedSettings,
|
||||
});
|
||||
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
|
||||
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>>?
|
||||
get networkWhitelist => $value.networkWhitelist != null
|
||||
? ListCopyWith(
|
||||
$value.networkWhitelist!,
|
||||
(v, t) => ObjectCopyWith(v, $identity, t),
|
||||
(v) => call(networkWhitelist: v))
|
||||
: null;
|
||||
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>>? get networkWhitelist => $value.networkWhitelist != null
|
||||
? ListCopyWith($value.networkWhitelist!, (v, t) => ObjectCopyWith(v, $identity, t), (v) => call(networkWhitelist: v))
|
||||
: null;
|
||||
@override
|
||||
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>>?
|
||||
get networkBlacklist => $value.networkBlacklist != null
|
||||
? ListCopyWith(
|
||||
$value.networkBlacklist!,
|
||||
(v, t) => ObjectCopyWith(v, $identity, t),
|
||||
(v) => call(networkBlacklist: v))
|
||||
: null;
|
||||
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>>? get networkBlacklist => $value.networkBlacklist != null
|
||||
? ListCopyWith($value.networkBlacklist!, (v, t) => ObjectCopyWith(v, $identity, t), (v) => call(networkBlacklist: v))
|
||||
: null;
|
||||
@override
|
||||
$R call(
|
||||
{String? showToken,
|
||||
String? alias,
|
||||
ThemeMode? theme,
|
||||
ColorMode? colorMode,
|
||||
Object? locale = $none,
|
||||
int? port,
|
||||
Object? networkWhitelist = $none,
|
||||
Object? networkBlacklist = $none,
|
||||
String? multicastGroup,
|
||||
Object? destination = $none,
|
||||
bool? saveToGallery,
|
||||
bool? saveToHistory,
|
||||
bool? quickSave,
|
||||
bool? quickSaveFromFavorites,
|
||||
Object? receivePin = $none,
|
||||
bool? autoFinish,
|
||||
bool? minimizeToTray,
|
||||
bool? https,
|
||||
SendMode? sendMode,
|
||||
bool? saveWindowPlacement,
|
||||
bool? enableAnimations,
|
||||
Object? deviceType = $none,
|
||||
Object? deviceModel = $none,
|
||||
bool? shareViaLinkAutoAccept,
|
||||
int? discoveryTimeout,
|
||||
bool? advancedSettings}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (showToken != null) #showToken: showToken,
|
||||
if (alias != null) #alias: alias,
|
||||
if (theme != null) #theme: theme,
|
||||
if (colorMode != null) #colorMode: colorMode,
|
||||
if (locale != $none) #locale: locale,
|
||||
if (port != null) #port: port,
|
||||
if (networkWhitelist != $none) #networkWhitelist: networkWhitelist,
|
||||
if (networkBlacklist != $none) #networkBlacklist: networkBlacklist,
|
||||
if (multicastGroup != null) #multicastGroup: multicastGroup,
|
||||
if (destination != $none) #destination: destination,
|
||||
if (saveToGallery != null) #saveToGallery: saveToGallery,
|
||||
if (saveToHistory != null) #saveToHistory: saveToHistory,
|
||||
if (quickSave != null) #quickSave: quickSave,
|
||||
if (quickSaveFromFavorites != null)
|
||||
#quickSaveFromFavorites: quickSaveFromFavorites,
|
||||
if (receivePin != $none) #receivePin: receivePin,
|
||||
if (autoFinish != null) #autoFinish: autoFinish,
|
||||
if (minimizeToTray != null) #minimizeToTray: minimizeToTray,
|
||||
if (https != null) #https: https,
|
||||
if (sendMode != null) #sendMode: sendMode,
|
||||
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 (discoveryTimeout != null) #discoveryTimeout: discoveryTimeout,
|
||||
if (advancedSettings != null) #advancedSettings: advancedSettings
|
||||
}));
|
||||
$R call({
|
||||
String? showToken,
|
||||
String? alias,
|
||||
ThemeMode? theme,
|
||||
ColorMode? colorMode,
|
||||
Object? locale = $none,
|
||||
int? port,
|
||||
Object? networkWhitelist = $none,
|
||||
Object? networkBlacklist = $none,
|
||||
String? multicastGroup,
|
||||
Object? destination = $none,
|
||||
bool? saveToGallery,
|
||||
bool? saveToHistory,
|
||||
bool? quickSave,
|
||||
bool? quickSaveFromFavorites,
|
||||
Object? receivePin = $none,
|
||||
bool? autoFinish,
|
||||
bool? minimizeToTray,
|
||||
bool? https,
|
||||
SendMode? sendMode,
|
||||
bool? saveWindowPlacement,
|
||||
bool? enableAnimations,
|
||||
Object? deviceType = $none,
|
||||
Object? deviceModel = $none,
|
||||
bool? shareViaLinkAutoAccept,
|
||||
int? discoveryTimeout,
|
||||
bool? advancedSettings,
|
||||
}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (showToken != null) #showToken: showToken,
|
||||
if (alias != null) #alias: alias,
|
||||
if (theme != null) #theme: theme,
|
||||
if (colorMode != null) #colorMode: colorMode,
|
||||
if (locale != $none) #locale: locale,
|
||||
if (port != null) #port: port,
|
||||
if (networkWhitelist != $none) #networkWhitelist: networkWhitelist,
|
||||
if (networkBlacklist != $none) #networkBlacklist: networkBlacklist,
|
||||
if (multicastGroup != null) #multicastGroup: multicastGroup,
|
||||
if (destination != $none) #destination: destination,
|
||||
if (saveToGallery != null) #saveToGallery: saveToGallery,
|
||||
if (saveToHistory != null) #saveToHistory: saveToHistory,
|
||||
if (quickSave != null) #quickSave: quickSave,
|
||||
if (quickSaveFromFavorites != null) #quickSaveFromFavorites: quickSaveFromFavorites,
|
||||
if (receivePin != $none) #receivePin: receivePin,
|
||||
if (autoFinish != null) #autoFinish: autoFinish,
|
||||
if (minimizeToTray != null) #minimizeToTray: minimizeToTray,
|
||||
if (https != null) #https: https,
|
||||
if (sendMode != null) #sendMode: sendMode,
|
||||
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 (discoveryTimeout != null) #discoveryTimeout: discoveryTimeout,
|
||||
if (advancedSettings != null) #advancedSettings: advancedSettings,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
SettingsState $make(CopyWithData data) => SettingsState(
|
||||
showToken: data.get(#showToken, or: $value.showToken),
|
||||
alias: data.get(#alias, or: $value.alias),
|
||||
theme: data.get(#theme, or: $value.theme),
|
||||
colorMode: data.get(#colorMode, or: $value.colorMode),
|
||||
locale: data.get(#locale, or: $value.locale),
|
||||
port: data.get(#port, or: $value.port),
|
||||
networkWhitelist:
|
||||
data.get(#networkWhitelist, or: $value.networkWhitelist),
|
||||
networkBlacklist:
|
||||
data.get(#networkBlacklist, or: $value.networkBlacklist),
|
||||
multicastGroup: data.get(#multicastGroup, or: $value.multicastGroup),
|
||||
destination: data.get(#destination, or: $value.destination),
|
||||
saveToGallery: data.get(#saveToGallery, or: $value.saveToGallery),
|
||||
saveToHistory: data.get(#saveToHistory, or: $value.saveToHistory),
|
||||
quickSave: data.get(#quickSave, or: $value.quickSave),
|
||||
quickSaveFromFavorites:
|
||||
data.get(#quickSaveFromFavorites, or: $value.quickSaveFromFavorites),
|
||||
receivePin: data.get(#receivePin, or: $value.receivePin),
|
||||
autoFinish: data.get(#autoFinish, or: $value.autoFinish),
|
||||
minimizeToTray: data.get(#minimizeToTray, or: $value.minimizeToTray),
|
||||
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),
|
||||
deviceType: data.get(#deviceType, or: $value.deviceType),
|
||||
deviceModel: data.get(#deviceModel, or: $value.deviceModel),
|
||||
shareViaLinkAutoAccept:
|
||||
data.get(#shareViaLinkAutoAccept, or: $value.shareViaLinkAutoAccept),
|
||||
discoveryTimeout:
|
||||
data.get(#discoveryTimeout, or: $value.discoveryTimeout),
|
||||
advancedSettings:
|
||||
data.get(#advancedSettings, or: $value.advancedSettings));
|
||||
showToken: data.get(#showToken, or: $value.showToken),
|
||||
alias: data.get(#alias, or: $value.alias),
|
||||
theme: data.get(#theme, or: $value.theme),
|
||||
colorMode: data.get(#colorMode, or: $value.colorMode),
|
||||
locale: data.get(#locale, or: $value.locale),
|
||||
port: data.get(#port, or: $value.port),
|
||||
networkWhitelist: data.get(#networkWhitelist, or: $value.networkWhitelist),
|
||||
networkBlacklist: data.get(#networkBlacklist, or: $value.networkBlacklist),
|
||||
multicastGroup: data.get(#multicastGroup, or: $value.multicastGroup),
|
||||
destination: data.get(#destination, or: $value.destination),
|
||||
saveToGallery: data.get(#saveToGallery, or: $value.saveToGallery),
|
||||
saveToHistory: data.get(#saveToHistory, or: $value.saveToHistory),
|
||||
quickSave: data.get(#quickSave, or: $value.quickSave),
|
||||
quickSaveFromFavorites: data.get(#quickSaveFromFavorites, or: $value.quickSaveFromFavorites),
|
||||
receivePin: data.get(#receivePin, or: $value.receivePin),
|
||||
autoFinish: data.get(#autoFinish, or: $value.autoFinish),
|
||||
minimizeToTray: data.get(#minimizeToTray, or: $value.minimizeToTray),
|
||||
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),
|
||||
deviceType: data.get(#deviceType, or: $value.deviceType),
|
||||
deviceModel: data.get(#deviceModel, or: $value.deviceModel),
|
||||
shareViaLinkAutoAccept: data.get(#shareViaLinkAutoAccept, or: $value.shareViaLinkAutoAccept),
|
||||
discoveryTimeout: data.get(#discoveryTimeout, or: $value.discoveryTimeout),
|
||||
advancedSettings: data.get(#advancedSettings, or: $value.advancedSettings),
|
||||
);
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@@ -47,17 +47,21 @@ class AboutPage extends StatelessWidget {
|
||||
Text(t.aboutPage.description.join('\n\n')),
|
||||
const SizedBox(height: 20),
|
||||
Text(t.aboutPage.author, style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
Text.rich(_buildContributor(
|
||||
label: 'Tien Do Nam (@Tienisto)',
|
||||
primaryColor: primaryColor,
|
||||
)),
|
||||
Text.rich(
|
||||
_buildContributor(
|
||||
label: 'Tien Do Nam (@Tienisto)',
|
||||
primaryColor: primaryColor,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text(t.aboutPage.contributors, style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
..._contributors.map((contributor) {
|
||||
return Text.rich(_buildContributor(
|
||||
label: contributor,
|
||||
primaryColor: primaryColor,
|
||||
));
|
||||
return Text.rich(
|
||||
_buildContributor(
|
||||
label: contributor,
|
||||
primaryColor: primaryColor,
|
||||
),
|
||||
);
|
||||
}),
|
||||
const SizedBox(height: 20),
|
||||
Text(t.aboutPage.packagers, style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
|
||||
@@ -25,10 +25,14 @@ class _ApkPickerPageState extends State<ApkPickerPage> with Refena {
|
||||
final List<Application> _selectedApps = [];
|
||||
|
||||
Future<void> _pickApp(Application app) async {
|
||||
await ref.redux(selectedSendingFilesProvider).dispatchAsync(AddFilesAction(
|
||||
files: [app],
|
||||
converter: CrossFileConverters.convertApplication,
|
||||
));
|
||||
await ref
|
||||
.redux(selectedSendingFilesProvider)
|
||||
.dispatchAsync(
|
||||
AddFilesAction(
|
||||
files: [app],
|
||||
converter: CrossFileConverters.convertApplication,
|
||||
),
|
||||
);
|
||||
|
||||
if (mounted) {
|
||||
context.pop();
|
||||
@@ -39,10 +43,14 @@ class _ApkPickerPageState extends State<ApkPickerPage> with Refena {
|
||||
// ignore: discarded_futures
|
||||
|
||||
for (Application app in apps) {
|
||||
await ref.redux(selectedSendingFilesProvider).dispatchAsync(AddFilesAction(
|
||||
files: [app],
|
||||
converter: CrossFileConverters.convertApplication,
|
||||
));
|
||||
await ref
|
||||
.redux(selectedSendingFilesProvider)
|
||||
.dispatchAsync(
|
||||
AddFilesAction(
|
||||
files: [app],
|
||||
converter: CrossFileConverters.convertApplication,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (mounted) {
|
||||
@@ -76,29 +84,32 @@ class _ApkPickerPageState extends State<ApkPickerPage> with Refena {
|
||||
appBar: AppBar(
|
||||
title: Text(t.apkPickerPage.title),
|
||||
actions: [
|
||||
PopupMenuButton(itemBuilder: (context) {
|
||||
return [
|
||||
CheckedPopupMenuItem<int>(
|
||||
value: 0,
|
||||
checked: !apkParams.includeSystemApps,
|
||||
child: Text(t.apkPickerPage.excludeSystemApps),
|
||||
),
|
||||
CheckedPopupMenuItem<int>(
|
||||
value: 1,
|
||||
checked: apkParams.onlyAppsWithLaunchIntent,
|
||||
child: Text(t.apkPickerPage.excludeAppsWithoutLaunchIntent),
|
||||
),
|
||||
];
|
||||
}, onSelected: (value) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
ref.notifier(apkSearchParamProvider).setState((old) => old.copyWith(includeSystemApps: !old.includeSystemApps));
|
||||
break;
|
||||
case 1:
|
||||
ref.notifier(apkSearchParamProvider).setState((old) => old.copyWith(onlyAppsWithLaunchIntent: !old.onlyAppsWithLaunchIntent));
|
||||
break;
|
||||
}
|
||||
}),
|
||||
PopupMenuButton(
|
||||
itemBuilder: (context) {
|
||||
return [
|
||||
CheckedPopupMenuItem<int>(
|
||||
value: 0,
|
||||
checked: !apkParams.includeSystemApps,
|
||||
child: Text(t.apkPickerPage.excludeSystemApps),
|
||||
),
|
||||
CheckedPopupMenuItem<int>(
|
||||
value: 1,
|
||||
checked: apkParams.onlyAppsWithLaunchIntent,
|
||||
child: Text(t.apkPickerPage.excludeAppsWithoutLaunchIntent),
|
||||
),
|
||||
];
|
||||
},
|
||||
onSelected: (value) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
ref.notifier(apkSearchParamProvider).setState((old) => old.copyWith(includeSystemApps: !old.includeSystemApps));
|
||||
break;
|
||||
case 1:
|
||||
ref.notifier(apkSearchParamProvider).setState((old) => old.copyWith(onlyAppsWithLaunchIntent: !old.onlyAppsWithLaunchIntent));
|
||||
break;
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
floatingActionButton: (_selectedApps.isEmpty)
|
||||
@@ -244,7 +255,7 @@ class _ApkPickerPageState extends State<ApkPickerPage> with Refena {
|
||||
Icon(
|
||||
_selectedApps.contains(app) ? Icons.check_circle : Icons.radio_button_unchecked,
|
||||
color: _selectedApps.contains(app) ? Theme.of(context).iconTheme.color : Colors.grey,
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -35,17 +35,19 @@ class DiscoveryDebugPage extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
...logs.map((log) => CopyableText(
|
||||
prefix: TextSpan(
|
||||
text: '[${_dateFormat.format(log.timestamp)}] ',
|
||||
style: const TextStyle(
|
||||
color: Colors.green,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
...logs.map(
|
||||
(log) => CopyableText(
|
||||
prefix: TextSpan(
|
||||
text: '[${_dateFormat.format(log.timestamp)}] ',
|
||||
style: const TextStyle(
|
||||
color: Colors.green,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
name: log.log,
|
||||
value: log.log,
|
||||
)),
|
||||
),
|
||||
name: log.log,
|
||||
value: log.log,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -28,17 +28,19 @@ class HttpLogsPage extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
...logs.map((log) => CopyableText(
|
||||
prefix: TextSpan(
|
||||
text: '[${_dateFormat.format(log.timestamp)}] ',
|
||||
style: const TextStyle(
|
||||
color: Colors.green,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
...logs.map(
|
||||
(log) => CopyableText(
|
||||
prefix: TextSpan(
|
||||
text: '[${_dateFormat.format(log.timestamp)}] ',
|
||||
style: const TextStyle(
|
||||
color: Colors.green,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
name: log.log,
|
||||
value: log.log,
|
||||
)),
|
||||
),
|
||||
name: log.log,
|
||||
value: log.log,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -89,10 +89,14 @@ class _HomePageState extends State<HomePage> with Refena {
|
||||
await ref.redux(selectedSendingFilesProvider).dispatchAsync(AddDirectoryAction(event.files.first.path));
|
||||
} else {
|
||||
// user dropped one or more files
|
||||
await ref.redux(selectedSendingFilesProvider).dispatchAsync(AddFilesAction(
|
||||
files: event.files,
|
||||
converter: CrossFileConverters.convertXFile,
|
||||
));
|
||||
await ref
|
||||
.redux(selectedSendingFilesProvider)
|
||||
.dispatchAsync(
|
||||
AddFilesAction(
|
||||
files: event.files,
|
||||
converter: CrossFileConverters.convertXFile,
|
||||
),
|
||||
);
|
||||
}
|
||||
vm.changeTab(HomeTab.send);
|
||||
},
|
||||
@@ -114,7 +118,7 @@ class _HomePageState extends State<HomePage> with Refena {
|
||||
children: [
|
||||
checkPlatform([TargetPlatform.macOS])
|
||||
? // considered adding some extra space so it looks more natural
|
||||
SizedBox(height: 40)
|
||||
SizedBox(height: 40)
|
||||
: SizedBox(height: 20),
|
||||
const Text(
|
||||
'LocalSend',
|
||||
@@ -125,10 +129,10 @@ class _HomePageState extends State<HomePage> with Refena {
|
||||
],
|
||||
)
|
||||
: checkPlatform([TargetPlatform.macOS])
|
||||
? SizedBox(
|
||||
height: 20,
|
||||
)
|
||||
: null,
|
||||
? SizedBox(
|
||||
height: 20,
|
||||
)
|
||||
: null,
|
||||
destinations: HomeTab.values.map((tab) {
|
||||
return NavigationRailDestination(
|
||||
icon: Icon(tab.icon),
|
||||
|
||||
@@ -73,7 +73,8 @@ class _ProgressPageState extends State<ProgressPage> with Refena {
|
||||
|
||||
// Periodically call WakelockPlus.enable() to keep the screen awake
|
||||
_wakelockPlusTimer = Timer.periodic(const Duration(seconds: 30), (timer) {
|
||||
final finished = ref.read(serverProvider)?.session?.files.values.map((e) => e.status).isFinishedOrSkipped ??
|
||||
final finished =
|
||||
ref.read(serverProvider)?.session?.files.values.map((e) => e.status).isFinishedOrSkipped ??
|
||||
ref.read(sendProvider)[widget.sessionId]?.files.values.map((e) => e.status).isFinishedOrSkipped ??
|
||||
true;
|
||||
if (finished) {
|
||||
@@ -90,7 +91,8 @@ class _ProgressPageState extends State<ProgressPage> with Refena {
|
||||
|
||||
if (ref.read(settingsProvider).autoFinish) {
|
||||
_finishTimer = Timer.periodic(const Duration(seconds: 1), (timer) {
|
||||
final finished = ref.read(serverProvider)?.session?.files.values.map((e) => e.status).isFinishedOrSkipped ??
|
||||
final finished =
|
||||
ref.read(serverProvider)?.session?.files.values.map((e) => e.status).isFinishedOrSkipped ??
|
||||
ref.read(sendProvider)[widget.sessionId]?.files.values.map((e) => e.status).isFinishedOrSkipped ??
|
||||
true;
|
||||
if (finished) {
|
||||
@@ -180,7 +182,9 @@ class _ProgressPageState extends State<ProgressPage> with Refena {
|
||||
Widget build(BuildContext context) {
|
||||
final progressNotifier = ref.watch(progressProvider);
|
||||
final currBytes = _files.fold<int>(
|
||||
0, (prev, curr) => prev + ((progressNotifier.getProgress(sessionId: widget.sessionId, fileId: curr.id) * curr.size).round()));
|
||||
0,
|
||||
(prev, curr) => prev + ((progressNotifier.getProgress(sessionId: widget.sessionId, fileId: curr.id) * curr.size).round()),
|
||||
);
|
||||
|
||||
final receiveSession = ref.watch(serverProvider.select((s) => s?.session));
|
||||
final sendSession = ref.watch(sendProvider)[widget.sessionId];
|
||||
@@ -276,9 +280,9 @@ class _ProgressPageState extends State<ProgressPage> with Refena {
|
||||
recognizer: checkPlatform([TargetPlatform.iOS])
|
||||
? null
|
||||
: (TapGestureRecognizer()
|
||||
..onTap = () async {
|
||||
await openFolder(folderPath: receiveSession.destinationDirectory);
|
||||
}),
|
||||
..onTap = () async {
|
||||
await openFolder(folderPath: receiveSession.destinationDirectory);
|
||||
}),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -410,7 +414,9 @@ class _ProgressPageState extends State<ProgressPage> with Refena {
|
||||
IconButton(
|
||||
icon: const Icon(Icons.refresh),
|
||||
onPressed: () async {
|
||||
await ref.notifier(sendProvider).sendFile(
|
||||
await ref
|
||||
.notifier(sendProvider)
|
||||
.sendFile(
|
||||
sessionId: widget.sessionId,
|
||||
isolateIndex: 0,
|
||||
file: sendSession.files[file.id]!,
|
||||
@@ -464,18 +470,24 @@ class _ProgressPageState extends State<ProgressPage> with Refena {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(t.progressPage.total.count(
|
||||
curr: finishedCount,
|
||||
n: _selectedFiles.length,
|
||||
)),
|
||||
Text(t.progressPage.total.size(
|
||||
curr: currBytes.asReadableFileSize,
|
||||
n: _totalBytes == double.maxFinite.toInt() ? '-' : _totalBytes.asReadableFileSize,
|
||||
)),
|
||||
Text(
|
||||
t.progressPage.total.count(
|
||||
curr: finishedCount,
|
||||
n: _selectedFiles.length,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
t.progressPage.total.size(
|
||||
curr: currBytes.asReadableFileSize,
|
||||
n: _totalBytes == double.maxFinite.toInt() ? '-' : _totalBytes.asReadableFileSize,
|
||||
),
|
||||
),
|
||||
if (speedInBytes != null)
|
||||
Text(t.progressPage.total.speed(
|
||||
speed: speedInBytes.asReadableFileSize,
|
||||
)),
|
||||
Text(
|
||||
t.progressPage.total.speed(
|
||||
speed: speedInBytes.asReadableFileSize,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -496,14 +508,16 @@ class _ProgressPageState extends State<ProgressPage> with Refena {
|
||||
style: TextButton.styleFrom(foregroundColor: Theme.of(context).colorScheme.onSurface),
|
||||
onPressed: () => _exit(closeSession: true),
|
||||
icon: Icon(status == SessionStatus.sending ? Icons.close : Icons.check_circle),
|
||||
label: Text(status == SessionStatus.sending
|
||||
? t.general.cancel
|
||||
: _finishTimer != null
|
||||
? '${t.general.done} ($_finishCounter)'
|
||||
: t.general.done),
|
||||
label: Text(
|
||||
status == SessionStatus.sending
|
||||
? t.general.cancel
|
||||
: _finishTimer != null
|
||||
? '${t.general.done} ($_finishCounter)'
|
||||
: t.general.done,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -89,7 +89,7 @@ class ReceiveOptionsPage extends StatelessWidget {
|
||||
Expanded(
|
||||
child: Text(t.receiveOptionsPage.saveToGalleryOff, style: const TextStyle(color: Colors.grey)),
|
||||
),
|
||||
]
|
||||
],
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -141,10 +141,11 @@ class ReceiveOptionsPage extends StatelessWidget {
|
||||
Text(
|
||||
'${!selectState.containsKey(file.id) ? t.general.skipped : (selectState[file.id] == file.fileName ? t.general.unchanged : t.general.renamed)} - ${file.size.asReadableFileSize}',
|
||||
style: TextStyle(
|
||||
color: !selectState.containsKey(file.id)
|
||||
? Colors.grey
|
||||
: (selectState[file.id] == file.fileName ? Theme.of(context).colorScheme.onSecondaryContainer : Colors.orange)),
|
||||
)
|
||||
color: !selectState.containsKey(file.id)
|
||||
? Colors.grey
|
||||
: (selectState[file.id] == file.fileName ? Theme.of(context).colorScheme.onSecondaryContainer : Colors.orange),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
+148
-142
@@ -63,12 +63,15 @@ class _ReceivePageState extends State<ReceivePage> with Refena {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final vm = context.watch(widget.vm, listener: (prev, next) {
|
||||
if (prev.status != next.status) {
|
||||
// ignore: discarded_futures
|
||||
TaskbarHelper.visualizeStatus(next.status);
|
||||
}
|
||||
});
|
||||
final vm = context.watch(
|
||||
widget.vm,
|
||||
listener: (prev, next) {
|
||||
if (prev.status != next.status) {
|
||||
// ignore: discarded_futures
|
||||
TaskbarHelper.visualizeStatus(next.status);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
if (vm.status == null && vm.message == null) {
|
||||
return const Scaffold(
|
||||
@@ -79,45 +82,46 @@ class _ReceivePageState extends State<ReceivePage> with Refena {
|
||||
final senderFavoriteEntry = ref.watch(favoritesProvider.select((state) => state.findDevice(vm.sender)));
|
||||
|
||||
return ViewModelBuilder(
|
||||
provider: (ref) => widget.vm,
|
||||
onFirstFrame: (context, vm) {
|
||||
ref.notifier(selectedReceivingFilesProvider).setFiles(vm.files);
|
||||
},
|
||||
dispose: (ref) {
|
||||
ref.dispose(widget.vm);
|
||||
unawaited(TaskbarHelper.clearProgressBar());
|
||||
},
|
||||
builder: (context, vm) {
|
||||
return PopScope(
|
||||
onPopInvokedWithResult: (didPop, result) {
|
||||
if (didPop) {
|
||||
vm.onDecline();
|
||||
}
|
||||
},
|
||||
canPop: true,
|
||||
child: Scaffold(
|
||||
body: SafeArea(
|
||||
child: Center(
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: ResponsiveListView.defaultMaxWidth),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
final height = MediaQuery.of(context).size.height;
|
||||
final smallUi = vm.message != null && height < 600;
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 20, vertical: smallUi ? 20 : 30),
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
if (vm.showSenderInfo && !smallUi)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 10),
|
||||
child: Icon(vm.sender.deviceType.icon, size: 64),
|
||||
),
|
||||
Builder(builder: (context) {
|
||||
provider: (ref) => widget.vm,
|
||||
onFirstFrame: (context, vm) {
|
||||
ref.notifier(selectedReceivingFilesProvider).setFiles(vm.files);
|
||||
},
|
||||
dispose: (ref) {
|
||||
ref.dispose(widget.vm);
|
||||
unawaited(TaskbarHelper.clearProgressBar());
|
||||
},
|
||||
builder: (context, vm) {
|
||||
return PopScope(
|
||||
onPopInvokedWithResult: (didPop, result) {
|
||||
if (didPop) {
|
||||
vm.onDecline();
|
||||
}
|
||||
},
|
||||
canPop: true,
|
||||
child: Scaffold(
|
||||
body: SafeArea(
|
||||
child: Center(
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: ResponsiveListView.defaultMaxWidth),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
final height = MediaQuery.of(context).size.height;
|
||||
final smallUi = vm.message != null && height < 600;
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 20, vertical: smallUi ? 20 : 30),
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
if (vm.showSenderInfo && !smallUi)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 10),
|
||||
child: Icon(vm.sender.deviceType.icon, size: 64),
|
||||
),
|
||||
Builder(
|
||||
builder: (context) {
|
||||
final alias = senderFavoriteEntry?.alias ?? vm.sender.alias;
|
||||
if (alias.isEmpty) {
|
||||
return Text('', style: TextStyle(fontSize: smallUi ? 32 : 48));
|
||||
@@ -129,119 +133,121 @@ class _ReceivePageState extends State<ReceivePage> with Refena {
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
);
|
||||
}),
|
||||
if (vm.showSenderInfo) ...[
|
||||
const SizedBox(height: 10),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
_showFullIp = !_showFullIp;
|
||||
});
|
||||
},
|
||||
),
|
||||
if (vm.showSenderInfo) ...[
|
||||
const SizedBox(height: 10),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
_showFullIp = !_showFullIp;
|
||||
});
|
||||
},
|
||||
child: DeviceBadge(
|
||||
backgroundColor: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||
foregroundColor: Theme.of(context).colorScheme.onInverseSurface,
|
||||
label: switch (vm.sender.ip) {
|
||||
String ip => _showFullIp ? ip : '#${ip.visualId}',
|
||||
null => 'WebRTC',
|
||||
},
|
||||
child: DeviceBadge(
|
||||
backgroundColor: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||
foregroundColor: Theme.of(context).colorScheme.onInverseSurface,
|
||||
label: switch (vm.sender.ip) {
|
||||
String ip => _showFullIp ? ip : '#${ip.visualId}',
|
||||
null => 'WebRTC',
|
||||
},
|
||||
),
|
||||
),
|
||||
if (vm.sender.deviceModel != null) ...[
|
||||
const SizedBox(width: 10),
|
||||
DeviceBadge(
|
||||
backgroundColor: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||
foregroundColor: Theme.of(context).colorScheme.onInverseSurface,
|
||||
label: vm.sender.deviceModel!,
|
||||
),
|
||||
],
|
||||
),
|
||||
if (vm.sender.deviceModel != null) ...[
|
||||
const SizedBox(width: 10),
|
||||
DeviceBadge(
|
||||
backgroundColor: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||
foregroundColor: Theme.of(context).colorScheme.onInverseSurface,
|
||||
label: vm.sender.deviceModel!,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
const SizedBox(height: 40),
|
||||
Text(
|
||||
vm.message != null
|
||||
? (vm.isLink ? t.receivePage.subTitleLink : t.receivePage.subTitleMessage)
|
||||
: t.receivePage.subTitle(n: vm.files.length),
|
||||
style: smallUi ? null : Theme.of(context).textTheme.titleLarge,
|
||||
textAlign: TextAlign.center,
|
||||
],
|
||||
),
|
||||
if (vm.message != null)
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 20),
|
||||
child: SizedBox(
|
||||
height: 100,
|
||||
child: Card(
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: SelectableText(
|
||||
vm.message!,
|
||||
),
|
||||
],
|
||||
const SizedBox(height: 40),
|
||||
Text(
|
||||
vm.message != null
|
||||
? (vm.isLink ? t.receivePage.subTitleLink : t.receivePage.subTitleMessage)
|
||||
: t.receivePage.subTitle(n: vm.files.length),
|
||||
style: smallUi ? null : Theme.of(context).textTheme.titleLarge,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
if (vm.message != null)
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 20),
|
||||
child: SizedBox(
|
||||
height: 100,
|
||||
child: Card(
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: SelectableText(
|
||||
vm.message!,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
unawaited(
|
||||
Clipboard.setData(ClipboardData(text: vm.message!)),
|
||||
);
|
||||
if (checkPlatformIsDesktop()) {
|
||||
context.showSnackBar(t.general.copiedToClipboard);
|
||||
}
|
||||
vm.onAccept();
|
||||
context.pop();
|
||||
},
|
||||
child: Text(t.general.copy),
|
||||
),
|
||||
if (vm.isLink)
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.only(start: 20),
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
foregroundColor: Theme.of(context).colorScheme.onPrimary,
|
||||
),
|
||||
onPressed: () {
|
||||
// ignore: discarded_futures
|
||||
launchUrl(Uri.parse(vm.message!), mode: LaunchMode.externalApplication);
|
||||
vm.onAccept();
|
||||
context.pop();
|
||||
},
|
||||
child: Text(t.general.open),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
unawaited(
|
||||
Clipboard.setData(ClipboardData(text: vm.message!)),
|
||||
);
|
||||
if (checkPlatformIsDesktop()) {
|
||||
context.showSnackBar(t.general.copiedToClipboard);
|
||||
}
|
||||
vm.onAccept();
|
||||
context.pop();
|
||||
},
|
||||
child: Text(t.general.copy),
|
||||
),
|
||||
if (vm.isLink)
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.only(start: 20),
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
foregroundColor: Theme.of(context).colorScheme.onPrimary,
|
||||
),
|
||||
onPressed: () {
|
||||
// ignore: discarded_futures
|
||||
launchUrl(Uri.parse(vm.message!), mode: LaunchMode.externalApplication);
|
||||
vm.onAccept();
|
||||
context.pop();
|
||||
},
|
||||
child: Text(t.general.open),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
_Actions(vm),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
_Actions(vm),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -106,8 +106,10 @@ class SelectedFilesPage extends StatelessWidget {
|
||||
foregroundColor: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
onPressed: () async {
|
||||
final result =
|
||||
await showDialog<String>(context: context, builder: (_) => MessageInputDialog(initialText: message));
|
||||
final result = await showDialog<String>(
|
||||
context: context,
|
||||
builder: (_) => MessageInputDialog(initialText: message),
|
||||
);
|
||||
if (result != null) {
|
||||
ref.redux(selectedSendingFilesProvider).dispatch(UpdateMessageAction(message: result, index: index));
|
||||
}
|
||||
|
||||
@@ -61,14 +61,17 @@ class _SendPageState extends State<SendPage> with Refena {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final sendState = ref.watch(sendProvider.select((state) => state[widget.sessionId]), listener: (prev, next) {
|
||||
final prevStatus = prev[widget.sessionId]?.status;
|
||||
final nextStatus = next[widget.sessionId]?.status;
|
||||
if (prevStatus != nextStatus) {
|
||||
// ignore: discarded_futures
|
||||
TaskbarHelper.visualizeStatus(nextStatus);
|
||||
}
|
||||
});
|
||||
final sendState = ref.watch(
|
||||
sendProvider.select((state) => state[widget.sessionId]),
|
||||
listener: (prev, next) {
|
||||
final prevStatus = prev[widget.sessionId]?.status;
|
||||
final nextStatus = next[widget.sessionId]?.status;
|
||||
if (prevStatus != nextStatus) {
|
||||
// ignore: discarded_futures
|
||||
TaskbarHelper.visualizeStatus(nextStatus);
|
||||
}
|
||||
},
|
||||
);
|
||||
if (sendState == null && _myDevice == null && _targetDevice == null) {
|
||||
return Scaffold(
|
||||
body: Container(),
|
||||
@@ -131,53 +134,53 @@ class _SendPageState extends State<SendPage> with Refena {
|
||||
children: [
|
||||
switch (sendState.status) {
|
||||
SessionStatus.waiting => Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: Text(t.sendPage.waiting, textAlign: TextAlign.center),
|
||||
),
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: Text(t.sendPage.waiting, textAlign: TextAlign.center),
|
||||
),
|
||||
SessionStatus.declined => Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: Text(
|
||||
t.sendPage.rejected,
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.warning),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: Text(
|
||||
t.sendPage.rejected,
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.warning),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
SessionStatus.tooManyAttempts => Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: Text(
|
||||
t.sendPage.tooManyAttempts,
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.warning),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: Text(
|
||||
t.sendPage.tooManyAttempts,
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.warning),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
SessionStatus.recipientBusy => Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: Text(
|
||||
t.sendPage.busy,
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.warning),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: Text(
|
||||
t.sendPage.busy,
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.warning),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
SessionStatus.finishedWithErrors => Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(t.general.error, style: TextStyle(color: Theme.of(context).colorScheme.warning)),
|
||||
if (sendState.errorMessage != null)
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Theme.of(context).colorScheme.warning,
|
||||
),
|
||||
onPressed: () async => showDialog(
|
||||
context: context,
|
||||
builder: (_) => ErrorDialog(error: sendState.errorMessage!),
|
||||
),
|
||||
child: const Icon(Icons.info),
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(t.general.error, style: TextStyle(color: Theme.of(context).colorScheme.warning)),
|
||||
if (sendState.errorMessage != null)
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Theme.of(context).colorScheme.warning,
|
||||
),
|
||||
],
|
||||
),
|
||||
onPressed: () async => showDialog(
|
||||
context: context,
|
||||
builder: (_) => ErrorDialog(error: sendState.errorMessage!),
|
||||
),
|
||||
child: const Icon(Icons.info),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
_ => const SizedBox(),
|
||||
},
|
||||
Center(
|
||||
|
||||
@@ -123,9 +123,9 @@ class _NetworkInterfacesPageState extends State<NetworkInterfacesPage> {
|
||||
await context.notifier(settingsProvider).setNetworkWhitelist(null);
|
||||
} else {
|
||||
await context.notifier(settingsProvider).setNetworkWhitelist(switch (currList) {
|
||||
[] => [''],
|
||||
_ => [...currList],
|
||||
});
|
||||
[] => [''],
|
||||
_ => [...currList],
|
||||
});
|
||||
if (context.mounted) {
|
||||
await context.notifier(settingsProvider).setNetworkBlacklist(null);
|
||||
}
|
||||
@@ -140,9 +140,9 @@ class _NetworkInterfacesPageState extends State<NetworkInterfacesPage> {
|
||||
await context.notifier(settingsProvider).setNetworkBlacklist(null);
|
||||
} else {
|
||||
await context.notifier(settingsProvider).setNetworkBlacklist(switch (currList) {
|
||||
[] => [''],
|
||||
_ => [...currList],
|
||||
});
|
||||
[] => [''],
|
||||
_ => [...currList],
|
||||
});
|
||||
if (context.mounted) {
|
||||
await context.notifier(settingsProvider).setNetworkWhitelist(null);
|
||||
}
|
||||
@@ -156,30 +156,31 @@ class _NetworkInterfacesPageState extends State<NetworkInterfacesPage> {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12),
|
||||
child: StringField(
|
||||
value: e,
|
||||
onChanged: (value) async {
|
||||
await updateFunction([
|
||||
...currList.sublist(0, i),
|
||||
value,
|
||||
...currList.sublist(i + 1),
|
||||
]);
|
||||
},
|
||||
builder: (context, controller) {
|
||||
return TextFieldTv(
|
||||
name: t.networkInterfacesPage.whitelist,
|
||||
controller: controller,
|
||||
onDelete: () async {
|
||||
if (currList.length == 1) {
|
||||
await updateFunction(null);
|
||||
return;
|
||||
}
|
||||
await updateFunction([
|
||||
...currList.sublist(0, i),
|
||||
...currList.sublist(i + 1),
|
||||
]);
|
||||
},
|
||||
);
|
||||
}),
|
||||
value: e,
|
||||
onChanged: (value) async {
|
||||
await updateFunction([
|
||||
...currList.sublist(0, i),
|
||||
value,
|
||||
...currList.sublist(i + 1),
|
||||
]);
|
||||
},
|
||||
builder: (context, controller) {
|
||||
return TextFieldTv(
|
||||
name: t.networkInterfacesPage.whitelist,
|
||||
controller: controller,
|
||||
onDelete: () async {
|
||||
if (currList.length == 1) {
|
||||
await updateFunction(null);
|
||||
return;
|
||||
}
|
||||
await updateFunction([
|
||||
...currList.sublist(0, i),
|
||||
...currList.sublist(i + 1),
|
||||
]);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}),
|
||||
if (settings.networkWhitelist != null || settings.networkBlacklist != null)
|
||||
|
||||
@@ -50,15 +50,17 @@ class ReceiveTab extends StatelessWidget {
|
||||
InitialFadeTransition(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
delay: const Duration(milliseconds: 200),
|
||||
child: Consumer(builder: (context, ref) {
|
||||
final animations = ref.watch(animationProvider);
|
||||
final activeTab = ref.watch(homePageControllerProvider.select((state) => state.currentTab));
|
||||
return RotatingWidget(
|
||||
duration: const Duration(seconds: 15),
|
||||
spinning: vm.serverState != null && animations && activeTab == HomeTab.receive,
|
||||
child: const LocalSendLogo(withText: false),
|
||||
);
|
||||
}),
|
||||
child: Consumer(
|
||||
builder: (context, ref) {
|
||||
final animations = ref.watch(animationProvider);
|
||||
final activeTab = ref.watch(homePageControllerProvider.select((state) => state.currentTab));
|
||||
return RotatingWidget(
|
||||
duration: const Duration(seconds: 15),
|
||||
spinning: vm.serverState != null && animations && activeTab == HomeTab.receive,
|
||||
child: const LocalSendLogo(withText: false),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
|
||||
@@ -74,10 +74,12 @@ class SendTab extends StatelessWidget {
|
||||
icon: option.icon,
|
||||
label: option.label,
|
||||
filled: false,
|
||||
onTap: () async => ref.global.dispatchAsync(PickFileAction(
|
||||
option: option,
|
||||
context: context,
|
||||
)),
|
||||
onTap: () async => ref.global.dispatchAsync(
|
||||
PickFileAction(
|
||||
option: option,
|
||||
context: context,
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
@@ -143,10 +145,12 @@ class SendTab extends StatelessWidget {
|
||||
onPressed: () async {
|
||||
if (_options.length == 1) {
|
||||
// open directly
|
||||
await ref.global.dispatchAsync(PickFileAction(
|
||||
option: _options.first,
|
||||
context: context,
|
||||
));
|
||||
await ref.global.dispatchAsync(
|
||||
PickFileAction(
|
||||
option: _options.first,
|
||||
context: context,
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
await AddFileDialog.open(
|
||||
@@ -247,9 +251,17 @@ class SendTab extends StatelessWidget {
|
||||
durationMillis: 6000,
|
||||
running: animations,
|
||||
children: [
|
||||
Text(t.sendTab.help, style: const TextStyle(color: Colors.grey), textAlign: TextAlign.center),
|
||||
Text(
|
||||
t.sendTab.help,
|
||||
style: const TextStyle(color: Colors.grey),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
if (checkPlatformCanReceiveShareIntent())
|
||||
Text(t.sendTab.shareIntentInfo, style: const TextStyle(color: Colors.grey), textAlign: TextAlign.center),
|
||||
Text(
|
||||
t.sendTab.shareIntentInfo,
|
||||
style: const TextStyle(color: Colors.grey),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
@@ -534,7 +546,9 @@ class _MultiSendDeviceListTile extends StatelessWidget {
|
||||
final files = session.files.values.where((f) => f.token != null);
|
||||
final progressNotifier = ref.watch(progressProvider);
|
||||
final currBytes = files.fold<int>(
|
||||
0, (prev, curr) => prev + ((progressNotifier.getProgress(sessionId: session.sessionId, fileId: curr.file.id) * curr.file.size).round()));
|
||||
0,
|
||||
(prev, curr) => prev + ((progressNotifier.getProgress(sessionId: session.sessionId, fileId: curr.file.id) * curr.file.size).round()),
|
||||
);
|
||||
final totalBytes = files.fold<int>(0, (prev, curr) => prev + curr.file.size);
|
||||
progress = totalBytes == 0 ? 0 : currBytes / totalBytes;
|
||||
} else {
|
||||
|
||||
@@ -76,7 +76,9 @@ final sendTabVmProvider = ViewProvider((ref) {
|
||||
builder: (_) => const AddressInputDialog(),
|
||||
);
|
||||
if (device != null && context.mounted) {
|
||||
await ref.notifier(sendProvider).startSession(
|
||||
await ref
|
||||
.notifier(sendProvider)
|
||||
.startSession(
|
||||
target: device,
|
||||
files: files,
|
||||
background: false,
|
||||
@@ -95,7 +97,9 @@ final sendTabVmProvider = ViewProvider((ref) {
|
||||
return;
|
||||
}
|
||||
|
||||
await ref.notifier(sendProvider).startSession(
|
||||
await ref
|
||||
.notifier(sendProvider)
|
||||
.startSession(
|
||||
target: device,
|
||||
files: files,
|
||||
background: false,
|
||||
@@ -129,7 +133,10 @@ final sendTabVmProvider = ViewProvider((ref) {
|
||||
await ref.redux(favoritesProvider).dispatchAsync(RemoveFavoriteAction(deviceFingerprint: device.fingerprint));
|
||||
}
|
||||
} else {
|
||||
await showDialog(context: context, builder: (_) => FavoriteEditDialog(prefilledDevice: device));
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (_) => FavoriteEditDialog(prefilledDevice: device),
|
||||
);
|
||||
}
|
||||
},
|
||||
onTapDevice: (context, device) async {
|
||||
@@ -138,7 +145,9 @@ final sendTabVmProvider = ViewProvider((ref) {
|
||||
return;
|
||||
}
|
||||
|
||||
await ref.notifier(sendProvider).startSession(
|
||||
await ref
|
||||
.notifier(sendProvider)
|
||||
.startSession(
|
||||
target: device,
|
||||
files: selectedFiles,
|
||||
background: false,
|
||||
@@ -174,7 +183,9 @@ final sendTabVmProvider = ViewProvider((ref) {
|
||||
ref.notifier(sendProvider).closeSession(session.sessionId);
|
||||
}
|
||||
|
||||
await ref.notifier(sendProvider).startSession(
|
||||
await ref
|
||||
.notifier(sendProvider)
|
||||
.startSession(
|
||||
target: device,
|
||||
files: files,
|
||||
background: true,
|
||||
|
||||
@@ -48,7 +48,8 @@ class SettingsTab extends StatelessWidget {
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
right: MediaQuery.of(context).padding.right), // So camera or 3-button navigation doesn't interfere on the right, rest is handled
|
||||
right: MediaQuery.of(context).padding.right,
|
||||
), // So camera or 3-button navigation doesn't interfere on the right, rest is handled
|
||||
child: ResponsiveListView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 40),
|
||||
children: [
|
||||
@@ -268,7 +269,8 @@ class SettingsTab extends StatelessWidget {
|
||||
title: t.settingsTab.network.title,
|
||||
children: [
|
||||
AnimatedCrossFade(
|
||||
crossFadeState: vm.serverState != null &&
|
||||
crossFadeState:
|
||||
vm.serverState != null &&
|
||||
(vm.serverState!.alias != vm.settings.alias ||
|
||||
vm.serverState!.port != vm.settings.port ||
|
||||
vm.serverState!.https != vm.settings.https)
|
||||
@@ -545,7 +547,9 @@ class SettingsTab extends StatelessWidget {
|
||||
const SizedBox(height: 20),
|
||||
const LocalSendLogo(withText: true),
|
||||
const SizedBox(height: 5),
|
||||
ref.watch(versionProvider).maybeWhen(
|
||||
ref
|
||||
.watch(versionProvider)
|
||||
.maybeWhen(
|
||||
data: (version) => Text(
|
||||
'Version: $version',
|
||||
textAlign: TextAlign.center,
|
||||
@@ -594,7 +598,7 @@ class SettingsTab extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
||||
@@ -50,12 +50,12 @@ class SettingsTabController extends ReduxNotifier<SettingsTabVm> {
|
||||
required LocalIpService localIpService,
|
||||
required DeviceInfoResult initialDeviceInfo,
|
||||
required bool supportsDynamicColors,
|
||||
}) : _settingsService = settingsService,
|
||||
_serverService = serverNotifier,
|
||||
_isolateController = isolateController,
|
||||
_localIpService = localIpService,
|
||||
_initialDeviceInfo = initialDeviceInfo,
|
||||
_supportsDynamicColors = supportsDynamicColors;
|
||||
}) : _settingsService = settingsService,
|
||||
_serverService = serverNotifier,
|
||||
_isolateController = isolateController,
|
||||
_localIpService = localIpService,
|
||||
_initialDeviceInfo = initialDeviceInfo,
|
||||
_supportsDynamicColors = supportsDynamicColors;
|
||||
|
||||
@override
|
||||
SettingsTabVm init() {
|
||||
|
||||
@@ -23,113 +23,71 @@ 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 _$timeoutController(SettingsTabVm v) =>
|
||||
v.timeoutController;
|
||||
static const Field<SettingsTabVm, TextEditingController>
|
||||
_f$timeoutController = Field('timeoutController', _$timeoutController);
|
||||
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 _$timeoutController(SettingsTabVm v) => v.timeoutController;
|
||||
static const Field<SettingsTabVm, TextEditingController> _f$timeoutController = Field('timeoutController', _$timeoutController);
|
||||
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 const Field<SettingsTabVm, List<ColorMode>> _f$colorModes = Field('colorModes', _$colorModes);
|
||||
static bool _$autoStart(SettingsTabVm v) => v.autoStart;
|
||||
static const Field<SettingsTabVm, bool> _f$autoStart =
|
||||
Field('autoStart', _$autoStart);
|
||||
static bool _$autoStartLaunchHidden(SettingsTabVm v) =>
|
||||
v.autoStartLaunchHidden;
|
||||
static const Field<SettingsTabVm, bool> _f$autoStartLaunchHidden =
|
||||
Field('autoStartLaunchHidden', _$autoStartLaunchHidden);
|
||||
static const Field<SettingsTabVm, bool> _f$autoStart = Field('autoStart', _$autoStart);
|
||||
static bool _$autoStartLaunchHidden(SettingsTabVm v) => v.autoStartLaunchHidden;
|
||||
static const Field<SettingsTabVm, bool> _f$autoStartLaunchHidden = Field('autoStartLaunchHidden', _$autoStartLaunchHidden);
|
||||
static bool _$showInContextMenu(SettingsTabVm v) => v.showInContextMenu;
|
||||
static const Field<SettingsTabVm, bool> _f$showInContextMenu =
|
||||
Field('showInContextMenu', _$showInContextMenu);
|
||||
static Function _$onChangeTheme(SettingsTabVm v) =>
|
||||
(v as dynamic).onChangeTheme as Function;
|
||||
static dynamic _arg$onChangeTheme(f) =>
|
||||
f<void Function(BuildContext, ThemeMode)>();
|
||||
static const Field<SettingsTabVm, Function> _f$onChangeTheme =
|
||||
Field('onChangeTheme', _$onChangeTheme, arg: _arg$onChangeTheme);
|
||||
static Function _$onChangeColorMode(SettingsTabVm v) =>
|
||||
(v as dynamic).onChangeColorMode as Function;
|
||||
static const Field<SettingsTabVm, bool> _f$showInContextMenu = Field('showInContextMenu', _$showInContextMenu);
|
||||
static Function _$onChangeTheme(SettingsTabVm v) => (v as dynamic).onChangeTheme as Function;
|
||||
static dynamic _arg$onChangeTheme(f) => f<void Function(BuildContext, ThemeMode)>();
|
||||
static const Field<SettingsTabVm, Function> _f$onChangeTheme = Field('onChangeTheme', _$onChangeTheme, arg: _arg$onChangeTheme);
|
||||
static Function _$onChangeColorMode(SettingsTabVm v) => (v as dynamic).onChangeColorMode as Function;
|
||||
static dynamic _arg$onChangeColorMode(f) => f<void Function(ColorMode)>();
|
||||
static const Field<SettingsTabVm, Function> _f$onChangeColorMode = Field(
|
||||
'onChangeColorMode', _$onChangeColorMode,
|
||||
arg: _arg$onChangeColorMode);
|
||||
static Function _$onTapLanguage(SettingsTabVm v) =>
|
||||
(v as dynamic).onTapLanguage as Function;
|
||||
static const Field<SettingsTabVm, Function> _f$onChangeColorMode = Field('onChangeColorMode', _$onChangeColorMode, arg: _arg$onChangeColorMode);
|
||||
static Function _$onTapLanguage(SettingsTabVm v) => (v as dynamic).onTapLanguage as Function;
|
||||
static dynamic _arg$onTapLanguage(f) => f<void Function(BuildContext)>();
|
||||
static const Field<SettingsTabVm, Function> _f$onTapLanguage =
|
||||
Field('onTapLanguage', _$onTapLanguage, arg: _arg$onTapLanguage);
|
||||
static Function _$onToggleAutoStart(SettingsTabVm v) =>
|
||||
(v as dynamic).onToggleAutoStart as Function;
|
||||
static const Field<SettingsTabVm, Function> _f$onTapLanguage = Field('onTapLanguage', _$onTapLanguage, arg: _arg$onTapLanguage);
|
||||
static Function _$onToggleAutoStart(SettingsTabVm v) => (v as dynamic).onToggleAutoStart as Function;
|
||||
static dynamic _arg$onToggleAutoStart(f) => f<void Function(BuildContext)>();
|
||||
static const Field<SettingsTabVm, Function> _f$onToggleAutoStart = Field(
|
||||
'onToggleAutoStart', _$onToggleAutoStart,
|
||||
arg: _arg$onToggleAutoStart);
|
||||
static Function _$onToggleAutoStartLaunchHidden(SettingsTabVm v) =>
|
||||
(v as dynamic).onToggleAutoStartLaunchHidden as Function;
|
||||
static dynamic _arg$onToggleAutoStartLaunchHidden(f) =>
|
||||
f<void Function(BuildContext)>();
|
||||
static const Field<SettingsTabVm, Function> _f$onToggleAutoStartLaunchHidden =
|
||||
Field('onToggleAutoStartLaunchHidden', _$onToggleAutoStartLaunchHidden,
|
||||
arg: _arg$onToggleAutoStartLaunchHidden);
|
||||
static Function _$onToggleShowInContextMenu(SettingsTabVm v) =>
|
||||
(v as dynamic).onToggleShowInContextMenu as Function;
|
||||
static dynamic _arg$onToggleShowInContextMenu(f) =>
|
||||
f<void Function(BuildContext)>();
|
||||
static const Field<SettingsTabVm, Function> _f$onToggleShowInContextMenu =
|
||||
Field('onToggleShowInContextMenu', _$onToggleShowInContextMenu,
|
||||
arg: _arg$onToggleShowInContextMenu);
|
||||
static Function _$onTapRestartServer(SettingsTabVm v) =>
|
||||
(v as dynamic).onTapRestartServer as Function;
|
||||
static const Field<SettingsTabVm, Function> _f$onToggleAutoStart = Field('onToggleAutoStart', _$onToggleAutoStart, arg: _arg$onToggleAutoStart);
|
||||
static Function _$onToggleAutoStartLaunchHidden(SettingsTabVm v) => (v as dynamic).onToggleAutoStartLaunchHidden as Function;
|
||||
static dynamic _arg$onToggleAutoStartLaunchHidden(f) => f<void Function(BuildContext)>();
|
||||
static const Field<SettingsTabVm, Function> _f$onToggleAutoStartLaunchHidden = Field(
|
||||
'onToggleAutoStartLaunchHidden',
|
||||
_$onToggleAutoStartLaunchHidden,
|
||||
arg: _arg$onToggleAutoStartLaunchHidden,
|
||||
);
|
||||
static Function _$onToggleShowInContextMenu(SettingsTabVm v) => (v as dynamic).onToggleShowInContextMenu as Function;
|
||||
static dynamic _arg$onToggleShowInContextMenu(f) => f<void Function(BuildContext)>();
|
||||
static const Field<SettingsTabVm, Function> _f$onToggleShowInContextMenu = Field(
|
||||
'onToggleShowInContextMenu',
|
||||
_$onToggleShowInContextMenu,
|
||||
arg: _arg$onToggleShowInContextMenu,
|
||||
);
|
||||
static Function _$onTapRestartServer(SettingsTabVm v) => (v as dynamic).onTapRestartServer as Function;
|
||||
static dynamic _arg$onTapRestartServer(f) => f<void Function(BuildContext)>();
|
||||
static const Field<SettingsTabVm, Function> _f$onTapRestartServer = Field(
|
||||
'onTapRestartServer', _$onTapRestartServer,
|
||||
arg: _arg$onTapRestartServer);
|
||||
static Function _$onTapStartServer(SettingsTabVm v) =>
|
||||
(v as dynamic).onTapStartServer as Function;
|
||||
static const Field<SettingsTabVm, Function> _f$onTapRestartServer = Field('onTapRestartServer', _$onTapRestartServer, arg: _arg$onTapRestartServer);
|
||||
static Function _$onTapStartServer(SettingsTabVm v) => (v as dynamic).onTapStartServer as Function;
|
||||
static dynamic _arg$onTapStartServer(f) => f<void Function(BuildContext)>();
|
||||
static const Field<SettingsTabVm, Function> _f$onTapStartServer =
|
||||
Field('onTapStartServer', _$onTapStartServer, arg: _arg$onTapStartServer);
|
||||
static Function _$onTapStopServer(SettingsTabVm v) =>
|
||||
(v as dynamic).onTapStopServer as Function;
|
||||
static const Field<SettingsTabVm, Function> _f$onTapStartServer = Field('onTapStartServer', _$onTapStartServer, arg: _arg$onTapStartServer);
|
||||
static Function _$onTapStopServer(SettingsTabVm v) => (v as dynamic).onTapStopServer as Function;
|
||||
static dynamic _arg$onTapStopServer(f) => f<void Function()>();
|
||||
static const Field<SettingsTabVm, Function> _f$onTapStopServer =
|
||||
Field('onTapStopServer', _$onTapStopServer, arg: _arg$onTapStopServer);
|
||||
static Function _$onTapAdvanced(SettingsTabVm v) =>
|
||||
(v as dynamic).onTapAdvanced as Function;
|
||||
static const Field<SettingsTabVm, Function> _f$onTapStopServer = Field('onTapStopServer', _$onTapStopServer, arg: _arg$onTapStopServer);
|
||||
static Function _$onTapAdvanced(SettingsTabVm v) => (v as dynamic).onTapAdvanced as Function;
|
||||
static dynamic _arg$onTapAdvanced(f) => f<void Function(bool)>();
|
||||
static const Field<SettingsTabVm, Function> _f$onTapAdvanced =
|
||||
Field('onTapAdvanced', _$onTapAdvanced, arg: _arg$onTapAdvanced);
|
||||
static const Field<SettingsTabVm, Function> _f$onTapAdvanced = Field('onTapAdvanced', _$onTapAdvanced, arg: _arg$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 MappableFields<SettingsTabVm> fields = const {
|
||||
@@ -161,30 +119,30 @@ class SettingsTabVmMapper extends ClassMapperBase<SettingsTabVm> {
|
||||
|
||||
static SettingsTabVm _instantiate(DecodingData data) {
|
||||
return SettingsTabVm(
|
||||
advanced: data.dec(_f$advanced),
|
||||
aliasController: data.dec(_f$aliasController),
|
||||
deviceModelController: data.dec(_f$deviceModelController),
|
||||
portController: data.dec(_f$portController),
|
||||
timeoutController: data.dec(_f$timeoutController),
|
||||
multicastController: data.dec(_f$multicastController),
|
||||
settings: data.dec(_f$settings),
|
||||
serverState: data.dec(_f$serverState),
|
||||
deviceInfo: data.dec(_f$deviceInfo),
|
||||
colorModes: data.dec(_f$colorModes),
|
||||
autoStart: data.dec(_f$autoStart),
|
||||
autoStartLaunchHidden: data.dec(_f$autoStartLaunchHidden),
|
||||
showInContextMenu: data.dec(_f$showInContextMenu),
|
||||
onChangeTheme: data.dec(_f$onChangeTheme),
|
||||
onChangeColorMode: data.dec(_f$onChangeColorMode),
|
||||
onTapLanguage: data.dec(_f$onTapLanguage),
|
||||
onToggleAutoStart: data.dec(_f$onToggleAutoStart),
|
||||
onToggleAutoStartLaunchHidden:
|
||||
data.dec(_f$onToggleAutoStartLaunchHidden),
|
||||
onToggleShowInContextMenu: data.dec(_f$onToggleShowInContextMenu),
|
||||
onTapRestartServer: data.dec(_f$onTapRestartServer),
|
||||
onTapStartServer: data.dec(_f$onTapStartServer),
|
||||
onTapStopServer: data.dec(_f$onTapStopServer),
|
||||
onTapAdvanced: data.dec(_f$onTapAdvanced));
|
||||
advanced: data.dec(_f$advanced),
|
||||
aliasController: data.dec(_f$aliasController),
|
||||
deviceModelController: data.dec(_f$deviceModelController),
|
||||
portController: data.dec(_f$portController),
|
||||
timeoutController: data.dec(_f$timeoutController),
|
||||
multicastController: data.dec(_f$multicastController),
|
||||
settings: data.dec(_f$settings),
|
||||
serverState: data.dec(_f$serverState),
|
||||
deviceInfo: data.dec(_f$deviceInfo),
|
||||
colorModes: data.dec(_f$colorModes),
|
||||
autoStart: data.dec(_f$autoStart),
|
||||
autoStartLaunchHidden: data.dec(_f$autoStartLaunchHidden),
|
||||
showInContextMenu: data.dec(_f$showInContextMenu),
|
||||
onChangeTheme: data.dec(_f$onChangeTheme),
|
||||
onChangeColorMode: data.dec(_f$onChangeColorMode),
|
||||
onTapLanguage: data.dec(_f$onTapLanguage),
|
||||
onToggleAutoStart: data.dec(_f$onToggleAutoStart),
|
||||
onToggleAutoStartLaunchHidden: data.dec(_f$onToggleAutoStartLaunchHidden),
|
||||
onToggleShowInContextMenu: data.dec(_f$onToggleShowInContextMenu),
|
||||
onTapRestartServer: data.dec(_f$onTapRestartServer),
|
||||
onTapStartServer: data.dec(_f$onTapStartServer),
|
||||
onTapStopServer: data.dec(_f$onTapStopServer),
|
||||
onTapAdvanced: data.dec(_f$onTapAdvanced),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -201,190 +159,159 @@ 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 SettingsTabVmMapper.ensureInitialized()
|
||||
.equalsValue(this as SettingsTabVm, other);
|
||||
return SettingsTabVmMapper.ensureInitialized().equalsValue(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;
|
||||
$R call(
|
||||
{bool? advanced,
|
||||
TextEditingController? aliasController,
|
||||
TextEditingController? deviceModelController,
|
||||
TextEditingController? portController,
|
||||
TextEditingController? timeoutController,
|
||||
TextEditingController? multicastController,
|
||||
SettingsState? settings,
|
||||
ServerState? serverState,
|
||||
DeviceInfoResult? deviceInfo,
|
||||
List<ColorMode>? colorModes,
|
||||
bool? autoStart,
|
||||
bool? autoStartLaunchHidden,
|
||||
bool? showInContextMenu,
|
||||
void Function(BuildContext, ThemeMode)? onChangeTheme,
|
||||
void Function(ColorMode)? onChangeColorMode,
|
||||
void Function(BuildContext)? onTapLanguage,
|
||||
void Function(BuildContext)? onToggleAutoStart,
|
||||
void Function(BuildContext)? onToggleAutoStartLaunchHidden,
|
||||
void Function(BuildContext)? onToggleShowInContextMenu,
|
||||
void Function(BuildContext)? onTapRestartServer,
|
||||
void Function(BuildContext)? onTapStartServer,
|
||||
void Function()? onTapStopServer,
|
||||
void Function(bool)? onTapAdvanced});
|
||||
ListCopyWith<$R, ColorMode, ObjectCopyWith<$R, ColorMode, ColorMode>> get colorModes;
|
||||
$R call({
|
||||
bool? advanced,
|
||||
TextEditingController? aliasController,
|
||||
TextEditingController? deviceModelController,
|
||||
TextEditingController? portController,
|
||||
TextEditingController? timeoutController,
|
||||
TextEditingController? multicastController,
|
||||
SettingsState? settings,
|
||||
ServerState? serverState,
|
||||
DeviceInfoResult? deviceInfo,
|
||||
List<ColorMode>? colorModes,
|
||||
bool? autoStart,
|
||||
bool? autoStartLaunchHidden,
|
||||
bool? showInContextMenu,
|
||||
void Function(BuildContext, ThemeMode)? onChangeTheme,
|
||||
void Function(ColorMode)? onChangeColorMode,
|
||||
void Function(BuildContext)? onTapLanguage,
|
||||
void Function(BuildContext)? onToggleAutoStart,
|
||||
void Function(BuildContext)? onToggleAutoStartLaunchHidden,
|
||||
void Function(BuildContext)? onToggleShowInContextMenu,
|
||||
void Function(BuildContext)? onTapRestartServer,
|
||||
void Function(BuildContext)? onTapStartServer,
|
||||
void Function()? onTapStopServer,
|
||||
void Function(bool)? onTapAdvanced,
|
||||
});
|
||||
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,
|
||||
TextEditingController? aliasController,
|
||||
TextEditingController? deviceModelController,
|
||||
TextEditingController? portController,
|
||||
TextEditingController? timeoutController,
|
||||
TextEditingController? multicastController,
|
||||
SettingsState? settings,
|
||||
Object? serverState = $none,
|
||||
DeviceInfoResult? deviceInfo,
|
||||
List<ColorMode>? colorModes,
|
||||
bool? autoStart,
|
||||
bool? autoStartLaunchHidden,
|
||||
bool? showInContextMenu,
|
||||
void Function(BuildContext, ThemeMode)? onChangeTheme,
|
||||
void Function(ColorMode)? onChangeColorMode,
|
||||
void Function(BuildContext)? onTapLanguage,
|
||||
void Function(BuildContext)? onToggleAutoStart,
|
||||
void Function(BuildContext)? onToggleAutoStartLaunchHidden,
|
||||
void Function(BuildContext)? onToggleShowInContextMenu,
|
||||
void Function(BuildContext)? onTapRestartServer,
|
||||
void Function(BuildContext)? onTapStartServer,
|
||||
void Function()? onTapStopServer,
|
||||
void Function(bool)? onTapAdvanced}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (advanced != null) #advanced: advanced,
|
||||
if (aliasController != null) #aliasController: aliasController,
|
||||
if (deviceModelController != null)
|
||||
#deviceModelController: deviceModelController,
|
||||
if (portController != null) #portController: portController,
|
||||
if (timeoutController != null) #timeoutController: timeoutController,
|
||||
if (multicastController != null)
|
||||
#multicastController: multicastController,
|
||||
if (settings != null) #settings: settings,
|
||||
if (serverState != $none) #serverState: serverState,
|
||||
if (deviceInfo != null) #deviceInfo: deviceInfo,
|
||||
if (colorModes != null) #colorModes: colorModes,
|
||||
if (autoStart != null) #autoStart: autoStart,
|
||||
if (autoStartLaunchHidden != null)
|
||||
#autoStartLaunchHidden: autoStartLaunchHidden,
|
||||
if (showInContextMenu != null) #showInContextMenu: showInContextMenu,
|
||||
if (onChangeTheme != null) #onChangeTheme: onChangeTheme,
|
||||
if (onChangeColorMode != null) #onChangeColorMode: onChangeColorMode,
|
||||
if (onTapLanguage != null) #onTapLanguage: onTapLanguage,
|
||||
if (onToggleAutoStart != null) #onToggleAutoStart: onToggleAutoStart,
|
||||
if (onToggleAutoStartLaunchHidden != null)
|
||||
#onToggleAutoStartLaunchHidden: onToggleAutoStartLaunchHidden,
|
||||
if (onToggleShowInContextMenu != null)
|
||||
#onToggleShowInContextMenu: onToggleShowInContextMenu,
|
||||
if (onTapRestartServer != null) #onTapRestartServer: onTapRestartServer,
|
||||
if (onTapStartServer != null) #onTapStartServer: onTapStartServer,
|
||||
if (onTapStopServer != null) #onTapStopServer: onTapStopServer,
|
||||
if (onTapAdvanced != null) #onTapAdvanced: onTapAdvanced
|
||||
}));
|
||||
$R call({
|
||||
bool? advanced,
|
||||
TextEditingController? aliasController,
|
||||
TextEditingController? deviceModelController,
|
||||
TextEditingController? portController,
|
||||
TextEditingController? timeoutController,
|
||||
TextEditingController? multicastController,
|
||||
SettingsState? settings,
|
||||
Object? serverState = $none,
|
||||
DeviceInfoResult? deviceInfo,
|
||||
List<ColorMode>? colorModes,
|
||||
bool? autoStart,
|
||||
bool? autoStartLaunchHidden,
|
||||
bool? showInContextMenu,
|
||||
void Function(BuildContext, ThemeMode)? onChangeTheme,
|
||||
void Function(ColorMode)? onChangeColorMode,
|
||||
void Function(BuildContext)? onTapLanguage,
|
||||
void Function(BuildContext)? onToggleAutoStart,
|
||||
void Function(BuildContext)? onToggleAutoStartLaunchHidden,
|
||||
void Function(BuildContext)? onToggleShowInContextMenu,
|
||||
void Function(BuildContext)? onTapRestartServer,
|
||||
void Function(BuildContext)? onTapStartServer,
|
||||
void Function()? onTapStopServer,
|
||||
void Function(bool)? onTapAdvanced,
|
||||
}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (advanced != null) #advanced: advanced,
|
||||
if (aliasController != null) #aliasController: aliasController,
|
||||
if (deviceModelController != null) #deviceModelController: deviceModelController,
|
||||
if (portController != null) #portController: portController,
|
||||
if (timeoutController != null) #timeoutController: timeoutController,
|
||||
if (multicastController != null) #multicastController: multicastController,
|
||||
if (settings != null) #settings: settings,
|
||||
if (serverState != $none) #serverState: serverState,
|
||||
if (deviceInfo != null) #deviceInfo: deviceInfo,
|
||||
if (colorModes != null) #colorModes: colorModes,
|
||||
if (autoStart != null) #autoStart: autoStart,
|
||||
if (autoStartLaunchHidden != null) #autoStartLaunchHidden: autoStartLaunchHidden,
|
||||
if (showInContextMenu != null) #showInContextMenu: showInContextMenu,
|
||||
if (onChangeTheme != null) #onChangeTheme: onChangeTheme,
|
||||
if (onChangeColorMode != null) #onChangeColorMode: onChangeColorMode,
|
||||
if (onTapLanguage != null) #onTapLanguage: onTapLanguage,
|
||||
if (onToggleAutoStart != null) #onToggleAutoStart: onToggleAutoStart,
|
||||
if (onToggleAutoStartLaunchHidden != null) #onToggleAutoStartLaunchHidden: onToggleAutoStartLaunchHidden,
|
||||
if (onToggleShowInContextMenu != null) #onToggleShowInContextMenu: onToggleShowInContextMenu,
|
||||
if (onTapRestartServer != null) #onTapRestartServer: onTapRestartServer,
|
||||
if (onTapStartServer != null) #onTapStartServer: onTapStartServer,
|
||||
if (onTapStopServer != null) #onTapStopServer: onTapStopServer,
|
||||
if (onTapAdvanced != null) #onTapAdvanced: onTapAdvanced,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
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),
|
||||
portController: data.get(#portController, or: $value.portController),
|
||||
timeoutController:
|
||||
data.get(#timeoutController, or: $value.timeoutController),
|
||||
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),
|
||||
autoStart: data.get(#autoStart, or: $value.autoStart),
|
||||
autoStartLaunchHidden:
|
||||
data.get(#autoStartLaunchHidden, or: $value.autoStartLaunchHidden),
|
||||
showInContextMenu:
|
||||
data.get(#showInContextMenu, or: $value.showInContextMenu),
|
||||
onChangeTheme: data.get(#onChangeTheme, or: $value.onChangeTheme),
|
||||
onChangeColorMode:
|
||||
data.get(#onChangeColorMode, or: $value.onChangeColorMode),
|
||||
onTapLanguage: data.get(#onTapLanguage, or: $value.onTapLanguage),
|
||||
onToggleAutoStart:
|
||||
data.get(#onToggleAutoStart, or: $value.onToggleAutoStart),
|
||||
onToggleAutoStartLaunchHidden: data.get(#onToggleAutoStartLaunchHidden,
|
||||
or: $value.onToggleAutoStartLaunchHidden),
|
||||
onToggleShowInContextMenu: data.get(#onToggleShowInContextMenu,
|
||||
or: $value.onToggleShowInContextMenu),
|
||||
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));
|
||||
advanced: data.get(#advanced, or: $value.advanced),
|
||||
aliasController: data.get(#aliasController, or: $value.aliasController),
|
||||
deviceModelController: data.get(#deviceModelController, or: $value.deviceModelController),
|
||||
portController: data.get(#portController, or: $value.portController),
|
||||
timeoutController: data.get(#timeoutController, or: $value.timeoutController),
|
||||
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),
|
||||
autoStart: data.get(#autoStart, or: $value.autoStart),
|
||||
autoStartLaunchHidden: data.get(#autoStartLaunchHidden, or: $value.autoStartLaunchHidden),
|
||||
showInContextMenu: data.get(#showInContextMenu, or: $value.showInContextMenu),
|
||||
onChangeTheme: data.get(#onChangeTheme, or: $value.onChangeTheme),
|
||||
onChangeColorMode: data.get(#onChangeColorMode, or: $value.onChangeColorMode),
|
||||
onTapLanguage: data.get(#onTapLanguage, or: $value.onTapLanguage),
|
||||
onToggleAutoStart: data.get(#onToggleAutoStart, or: $value.onToggleAutoStart),
|
||||
onToggleAutoStartLaunchHidden: data.get(#onToggleAutoStartLaunchHidden, or: $value.onToggleAutoStartLaunchHidden),
|
||||
onToggleShowInContextMenu: data.get(#onToggleShowInContextMenu, or: $value.onToggleShowInContextMenu),
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,9 @@ class _WebSendPageState extends State<WebSendPage> with Refena {
|
||||
});
|
||||
await sleepAsync(500);
|
||||
try {
|
||||
await ref.notifier(serverProvider).restartServer(
|
||||
await ref
|
||||
.notifier(serverProvider)
|
||||
.restartServer(
|
||||
alias: settings.alias,
|
||||
port: settings.port,
|
||||
https: _encrypted,
|
||||
@@ -241,8 +243,8 @@ class _WebSendPageState extends State<WebSendPage> with Refena {
|
||||
Text(
|
||||
session.deviceInfo,
|
||||
style: Theme.of(context).textTheme.bodyLarge!.copyWith(
|
||||
color: session.responseHandler != null ? Theme.of(context).colorScheme.warning : null,
|
||||
),
|
||||
color: session.responseHandler != null ? Theme.of(context).colorScheme.warning : null,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Text(session.ip, style: Theme.of(context).textTheme.bodyMedium!.copyWith(color: Colors.grey)),
|
||||
@@ -274,8 +276,8 @@ class _WebSendPageState extends State<WebSendPage> with Refena {
|
||||
child: Text(
|
||||
t.general.accepted,
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
color: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||
),
|
||||
color: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -18,11 +18,15 @@ final apkProvider = ViewProvider<AsyncValue<List<Application>>>((ref) {
|
||||
final param = ref.watch(apkSearchParamProvider);
|
||||
|
||||
return ref
|
||||
.watch(_apkProvider(CachedApkProviderParam(
|
||||
includeSystemApps: param.includeSystemApps,
|
||||
onlyAppsWithLaunchIntent: param.onlyAppsWithLaunchIntent,
|
||||
selectMultipleApps: param.selectMultipleApps,
|
||||
)))
|
||||
.watch(
|
||||
_apkProvider(
|
||||
CachedApkProviderParam(
|
||||
includeSystemApps: param.includeSystemApps,
|
||||
onlyAppsWithLaunchIntent: param.onlyAppsWithLaunchIntent,
|
||||
selectMultipleApps: param.selectMultipleApps,
|
||||
),
|
||||
),
|
||||
)
|
||||
.maybeWhen(
|
||||
data: (apps) {
|
||||
final query = param.query.trim().toLowerCase();
|
||||
|
||||
@@ -13,18 +13,21 @@ final deviceRawInfoProvider = Provider<DeviceInfoResult>((ref) {
|
||||
throw Exception('deviceRawInfoProvider not initialized');
|
||||
});
|
||||
|
||||
final deviceInfoProvider = ViewProvider<DeviceInfoResult>((ref) {
|
||||
final (deviceType, deviceModel) = ref.watch(settingsProvider.select((state) => (state.deviceType, state.deviceModel)));
|
||||
final rawInfo = ref.watch(deviceRawInfoProvider);
|
||||
final deviceInfoProvider = ViewProvider<DeviceInfoResult>(
|
||||
(ref) {
|
||||
final (deviceType, deviceModel) = ref.watch(settingsProvider.select((state) => (state.deviceType, state.deviceModel)));
|
||||
final rawInfo = ref.watch(deviceRawInfoProvider);
|
||||
|
||||
return DeviceInfoResult(
|
||||
deviceType: deviceType ?? rawInfo.deviceType,
|
||||
deviceModel: deviceModel ?? rawInfo.deviceModel,
|
||||
androidSdkInt: rawInfo.androidSdkInt,
|
||||
);
|
||||
}, onChanged: (_, next, ref) {
|
||||
ref.redux(parentIsolateProvider).dispatch(IsolateSyncDeviceInfoAction(deviceInfo: next));
|
||||
});
|
||||
return DeviceInfoResult(
|
||||
deviceType: deviceType ?? rawInfo.deviceType,
|
||||
deviceModel: deviceModel ?? rawInfo.deviceModel,
|
||||
androidSdkInt: rawInfo.androidSdkInt,
|
||||
);
|
||||
},
|
||||
onChanged: (_, next, ref) {
|
||||
ref.redux(parentIsolateProvider).dispatch(IsolateSyncDeviceInfoAction(deviceInfo: next));
|
||||
},
|
||||
);
|
||||
|
||||
final deviceFullInfoProvider = ViewProvider((ref) {
|
||||
final networkInfo = ref.watch(localIpProvider);
|
||||
|
||||
@@ -48,9 +48,11 @@ class UpdateFavoriteAction extends AsyncReduxAction<FavoritesService, List<Favor
|
||||
await Future.microtask(() {});
|
||||
return state;
|
||||
}
|
||||
final updated = List<FavoriteDevice>.unmodifiable(<FavoriteDevice>[
|
||||
...state,
|
||||
]..replaceRange(index, index + 1, [device]));
|
||||
final updated = List<FavoriteDevice>.unmodifiable(
|
||||
<FavoriteDevice>[
|
||||
...state,
|
||||
]..replaceRange(index, index + 1, [device]),
|
||||
);
|
||||
await notifier._persistence.setFavorites(updated);
|
||||
return updated;
|
||||
}
|
||||
@@ -71,9 +73,11 @@ class RemoveFavoriteAction extends AsyncReduxAction<FavoritesService, List<Favor
|
||||
// Unknown device
|
||||
return state;
|
||||
}
|
||||
final updated = List<FavoriteDevice>.unmodifiable(<FavoriteDevice>[
|
||||
...state,
|
||||
]..removeAt(index));
|
||||
final updated = List<FavoriteDevice>.unmodifiable(
|
||||
<FavoriteDevice>[
|
||||
...state,
|
||||
]..removeAt(index),
|
||||
);
|
||||
await notifier._persistence.setFavorites(updated);
|
||||
return updated;
|
||||
}
|
||||
|
||||
@@ -91,14 +91,15 @@ Future<List<String>> _getIp({
|
||||
_logger.warning('Failed to get wifi IP', e);
|
||||
}
|
||||
|
||||
final nativeResult = (await getNetworkInterfaces(
|
||||
whitelist: whitelist,
|
||||
blacklist: blacklist,
|
||||
))
|
||||
.map((interface) => interface.addresses.map((a) => a.address).toList())
|
||||
.expand((ip) => ip)
|
||||
.where((ip) => !ip.contains(':')) // ignore IPv6 for now
|
||||
.toList();
|
||||
final nativeResult =
|
||||
(await getNetworkInterfaces(
|
||||
whitelist: whitelist,
|
||||
blacklist: blacklist,
|
||||
))
|
||||
.map((interface) => interface.addresses.map((a) => a.address).toList())
|
||||
.expand((ip) => ip)
|
||||
.where((ip) => !ip.contains(':')) // ignore IPv6 for now
|
||||
.toList();
|
||||
|
||||
final addresses = rankIpAddresses(nativeResult, ip);
|
||||
_logger.info('Network state: $addresses');
|
||||
|
||||
@@ -31,17 +31,17 @@ class NearbyDevicesService extends ReduxNotifier<NearbyDevicesState> {
|
||||
required IsolateController isolateController,
|
||||
required FavoritesService favoriteService,
|
||||
required DiscoveryLogger discoveryLogs,
|
||||
}) : _discoveryLogger = discoveryLogs,
|
||||
_isolateController = isolateController,
|
||||
_favoriteService = favoriteService;
|
||||
}) : _discoveryLogger = discoveryLogs,
|
||||
_isolateController = isolateController,
|
||||
_favoriteService = favoriteService;
|
||||
|
||||
@override
|
||||
NearbyDevicesState init() => const NearbyDevicesState(
|
||||
runningFavoriteScan: false,
|
||||
runningIps: {},
|
||||
devices: {},
|
||||
signalingDevices: {},
|
||||
);
|
||||
runningFavoriteScan: false,
|
||||
runningIps: {},
|
||||
devices: {},
|
||||
signalingDevices: {},
|
||||
);
|
||||
}
|
||||
|
||||
/// Binds the UDP port and listens for incoming announcements.
|
||||
@@ -166,11 +166,13 @@ class StartLegacyScan extends AsyncReduxAction<NearbyDevicesService, NearbyDevic
|
||||
|
||||
dispatch(_SetRunningIpsAction({...state.runningIps, localIp}));
|
||||
|
||||
final stream = external(notifier._isolateController).dispatchTakeResult(IsolateInterfaceHttpDiscoveryAction(
|
||||
networkInterface: localIp,
|
||||
port: port,
|
||||
https: https,
|
||||
));
|
||||
final stream = external(notifier._isolateController).dispatchTakeResult(
|
||||
IsolateInterfaceHttpDiscoveryAction(
|
||||
networkInterface: localIp,
|
||||
port: port,
|
||||
https: https,
|
||||
),
|
||||
);
|
||||
|
||||
await for (final device in stream) {
|
||||
notifier._discoveryLogger.addLog('[DISCOVER/TCP] ${device.alias} (${device.ip}, model: ${device.deviceModel})');
|
||||
@@ -199,10 +201,12 @@ class StartFavoriteScan extends AsyncReduxAction<NearbyDevicesService, NearbyDev
|
||||
}
|
||||
dispatch(_SetRunningFavoriteScanAction(true));
|
||||
|
||||
final stream = external(notifier._isolateController).dispatchTakeResult(IsolateFavoriteHttpDiscoveryAction(
|
||||
favorites: devices.map((e) => (e.ip, e.port)).toList(),
|
||||
https: https,
|
||||
));
|
||||
final stream = external(notifier._isolateController).dispatchTakeResult(
|
||||
IsolateFavoriteHttpDiscoveryAction(
|
||||
favorites: devices.map((e) => (e.ip, e.port)).toList(),
|
||||
https: https,
|
||||
),
|
||||
);
|
||||
|
||||
await for (final device in stream) {
|
||||
notifier._discoveryLogger.addLog('[DISCOVER/TCP] ${device.alias} (${device.ip}, model: ${device.deviceModel})');
|
||||
|
||||
@@ -72,38 +72,42 @@ class SendNotifier extends Notifier<Map<String, SendSessionState>> {
|
||||
background: background,
|
||||
status: SessionStatus.waiting,
|
||||
target: target,
|
||||
files: Map.fromEntries(await Future.wait(files.map((file) async {
|
||||
final id = _uuid.v4();
|
||||
return MapEntry(
|
||||
id,
|
||||
SendingFile(
|
||||
file: FileDto(
|
||||
id: id,
|
||||
fileName: file.name,
|
||||
size: file.size,
|
||||
fileType: file.fileType,
|
||||
hash: null,
|
||||
preview: files.length == 1 && files.first.fileType == FileType.text && files.first.bytes != null
|
||||
? utf8.decode(files.first.bytes!) // send simple message by embedding it into the preview
|
||||
: null,
|
||||
metadata: file.lastModified != null || file.lastAccessed != null
|
||||
? FileMetadata(
|
||||
lastModified: file.lastModified,
|
||||
lastAccessed: file.lastAccessed,
|
||||
)
|
||||
: null,
|
||||
legacy: target.version == '1.0',
|
||||
),
|
||||
status: FileStatus.queue,
|
||||
token: null,
|
||||
thumbnail: file.thumbnail,
|
||||
asset: file.asset,
|
||||
path: file.path,
|
||||
bytes: file.bytes,
|
||||
errorMessage: null,
|
||||
),
|
||||
);
|
||||
}))),
|
||||
files: Map.fromEntries(
|
||||
await Future.wait(
|
||||
files.map((file) async {
|
||||
final id = _uuid.v4();
|
||||
return MapEntry(
|
||||
id,
|
||||
SendingFile(
|
||||
file: FileDto(
|
||||
id: id,
|
||||
fileName: file.name,
|
||||
size: file.size,
|
||||
fileType: file.fileType,
|
||||
hash: null,
|
||||
preview: files.length == 1 && files.first.fileType == FileType.text && files.first.bytes != null
|
||||
? utf8.decode(files.first.bytes!) // send simple message by embedding it into the preview
|
||||
: null,
|
||||
metadata: file.lastModified != null || file.lastAccessed != null
|
||||
? FileMetadata(
|
||||
lastModified: file.lastModified,
|
||||
lastAccessed: file.lastAccessed,
|
||||
)
|
||||
: null,
|
||||
legacy: target.version == '1.0',
|
||||
),
|
||||
status: FileStatus.queue,
|
||||
token: null,
|
||||
thumbnail: file.thumbnail,
|
||||
asset: file.asset,
|
||||
path: file.path,
|
||||
bytes: file.bytes,
|
||||
errorMessage: null,
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
sendingTasks: [],
|
||||
@@ -430,33 +434,41 @@ class SendNotifier extends Notifier<Map<String, SendSessionState>> {
|
||||
state: (s) => s?.withFileStatus(file.file.id, FileStatus.sending, null),
|
||||
);
|
||||
|
||||
final taskResult = ref.redux(parentIsolateProvider).dispatchTakeResult(IsolateHttpUploadAction(
|
||||
isolateIndex: isolateIndex,
|
||||
remoteSessionId: remoteSessionId,
|
||||
remoteFileToken: token,
|
||||
fileId: file.file.id,
|
||||
filePath: file.path,
|
||||
fileBytes: file.bytes,
|
||||
mime: file.file.lookupMime(),
|
||||
fileSize: file.file.size,
|
||||
device: target,
|
||||
));
|
||||
final taskResult = ref
|
||||
.redux(parentIsolateProvider)
|
||||
.dispatchTakeResult(
|
||||
IsolateHttpUploadAction(
|
||||
isolateIndex: isolateIndex,
|
||||
remoteSessionId: remoteSessionId,
|
||||
remoteFileToken: token,
|
||||
fileId: file.file.id,
|
||||
filePath: file.path,
|
||||
fileBytes: file.bytes,
|
||||
mime: file.file.lookupMime(),
|
||||
fileSize: file.file.size,
|
||||
device: target,
|
||||
),
|
||||
);
|
||||
|
||||
String? fileError;
|
||||
try {
|
||||
state = state.updateSession(
|
||||
sessionId: sessionId,
|
||||
state: (s) => s?.copyWith(sendingTasks: [
|
||||
...?s.sendingTasks,
|
||||
SendingTask(
|
||||
isolateIndex: isolateIndex,
|
||||
taskId: taskResult.taskId,
|
||||
),
|
||||
]),
|
||||
state: (s) => s?.copyWith(
|
||||
sendingTasks: [
|
||||
...?s.sendingTasks,
|
||||
SendingTask(
|
||||
isolateIndex: isolateIndex,
|
||||
taskId: taskResult.taskId,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
await for (final progress in taskResult.progress) {
|
||||
ref.notifier(progressProvider).setProgress(
|
||||
ref
|
||||
.notifier(progressProvider)
|
||||
.setProgress(
|
||||
sessionId: sessionId,
|
||||
fileId: file.file.id,
|
||||
progress: progress,
|
||||
@@ -464,7 +476,9 @@ class SendNotifier extends Notifier<Map<String, SendSessionState>> {
|
||||
}
|
||||
|
||||
// set progress to 100% when successfully finished
|
||||
ref.notifier(progressProvider).setProgress(
|
||||
ref
|
||||
.notifier(progressProvider)
|
||||
.setProgress(
|
||||
sessionId: sessionId,
|
||||
fileId: file.file.id,
|
||||
progress: 1,
|
||||
@@ -476,7 +490,8 @@ class SendNotifier extends Notifier<Map<String, SendSessionState>> {
|
||||
state = state.updateSession(
|
||||
sessionId: sessionId,
|
||||
state: (s) => s?.copyWith(
|
||||
sendingTasks: s.sendingTasks?.where((task) => !(task.isolateIndex == isolateIndex && task.taskId == taskResult.taskId)).toList()),
|
||||
sendingTasks: s.sendingTasks?.where((task) => !(task.isolateIndex == isolateIndex && task.taskId == taskResult.taskId)).toList(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -539,10 +554,14 @@ class SendNotifier extends Notifier<Map<String, SendSessionState>> {
|
||||
|
||||
void _cancelRunningRequests(SendSessionState state) {
|
||||
for (final task in state.sendingTasks ?? <SendingTask>[]) {
|
||||
ref.redux(parentIsolateProvider).dispatch(IsolateHttpUploadCancelAction(
|
||||
isolateIndex: task.isolateIndex,
|
||||
taskId: task.taskId,
|
||||
));
|
||||
ref
|
||||
.redux(parentIsolateProvider)
|
||||
.dispatch(
|
||||
IsolateHttpUploadCancelAction(
|
||||
isolateIndex: task.isolateIndex,
|
||||
taskId: task.taskId,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,7 +584,10 @@ class SendNotifier extends Notifier<Map<String, SendSessionState>> {
|
||||
}
|
||||
|
||||
void setBackground(String sessionId, bool background) {
|
||||
state = state.updateSession(sessionId: sessionId, state: (s) => s?.copyWith(background: background));
|
||||
state = state.updateSession(
|
||||
sessionId: sessionId,
|
||||
state: (s) => s?.copyWith(background: background),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -594,7 +616,8 @@ extension on Map<String, SendSessionState> {
|
||||
extension on SendSessionState {
|
||||
SendSessionState withFileStatus(String fileId, FileStatus status, String? errorMessage) {
|
||||
return copyWith(
|
||||
files: {...files}..update(
|
||||
files: {...files}
|
||||
..update(
|
||||
fileId,
|
||||
(file) => file.copyWith(
|
||||
status: status,
|
||||
|
||||
@@ -280,17 +280,21 @@ class ReceiveController {
|
||||
final message = server.getState().session?.message;
|
||||
if (message != null) {
|
||||
// Message already received
|
||||
await server.ref.redux(receiveHistoryProvider).dispatchAsync(AddHistoryEntryAction(
|
||||
entryId: const Uuid().v4(),
|
||||
fileName: message,
|
||||
fileType: FileType.text,
|
||||
path: null,
|
||||
savedToGallery: false,
|
||||
isMessage: true,
|
||||
fileSize: utf8.encode(message).length,
|
||||
senderAlias: server.getState().session!.senderAlias,
|
||||
timestamp: DateTime.now().toUtc(),
|
||||
));
|
||||
await server.ref
|
||||
.redux(receiveHistoryProvider)
|
||||
.dispatchAsync(
|
||||
AddHistoryEntryAction(
|
||||
entryId: const Uuid().v4(),
|
||||
fileName: message,
|
||||
fileType: FileType.text,
|
||||
path: null,
|
||||
savedToGallery: false,
|
||||
isMessage: true,
|
||||
fileSize: utf8.encode(message).length,
|
||||
senderAlias: server.getState().session!.senderAlias,
|
||||
timestamp: DateTime.now().toUtc(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
final receiveProvider = ViewProvider((ref) {
|
||||
@@ -389,11 +393,13 @@ class ReceiveController {
|
||||
|
||||
if (quickSave) {
|
||||
// ignore: use_build_context_synchronously, unawaited_futures
|
||||
Routerino.context.pushImmediately(() => ProgressPage(
|
||||
showAppBar: false,
|
||||
closeSessionOnClose: true,
|
||||
sessionId: sessionId,
|
||||
));
|
||||
Routerino.context.pushImmediately(
|
||||
() => ProgressPage(
|
||||
showAppBar: false,
|
||||
closeSessionOnClose: true,
|
||||
sessionId: sessionId,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
final files = {
|
||||
@@ -418,11 +424,13 @@ class ReceiveController {
|
||||
}
|
||||
|
||||
if (v2) {
|
||||
return await request.respondJson(200,
|
||||
body: PrepareUploadResponseDto(
|
||||
sessionId: sessionId,
|
||||
files: files.cast(),
|
||||
).toJson());
|
||||
return await request.respondJson(
|
||||
200,
|
||||
body: PrepareUploadResponseDto(
|
||||
sessionId: sessionId,
|
||||
files: files.cast(),
|
||||
).toJson(),
|
||||
);
|
||||
}
|
||||
|
||||
return await request.respondJson(200, body: files);
|
||||
@@ -474,7 +482,8 @@ class ReceiveController {
|
||||
server.setState(
|
||||
(oldState) => oldState?.copyWith(
|
||||
session: receiveState.copyWith(
|
||||
files: {...receiveState.files}..update(
|
||||
files: {...receiveState.files}
|
||||
..update(
|
||||
fileId,
|
||||
(_) => receivingFile.copyWith(
|
||||
status: FileStatus.sending,
|
||||
@@ -512,7 +521,9 @@ class ReceiveController {
|
||||
lastAccessed: receivingFile.file.metadata?.lastAccessed,
|
||||
onProgress: (savedBytes) {
|
||||
if (receivingFile.file.size != 0) {
|
||||
server.ref.notifier(progressProvider).setProgress(
|
||||
server.ref
|
||||
.notifier(progressProvider)
|
||||
.setProgress(
|
||||
sessionId: receiveState.sessionId,
|
||||
fileId: fileId,
|
||||
progress: savedBytes / receivingFile.file.size,
|
||||
@@ -536,17 +547,21 @@ class ReceiveController {
|
||||
);
|
||||
|
||||
// Track it in history
|
||||
await server.ref.redux(receiveHistoryProvider).dispatchAsync(AddHistoryEntryAction(
|
||||
entryId: fileId,
|
||||
fileName: receivingFile.desiredName!,
|
||||
fileType: receivingFile.file.fileType,
|
||||
path: saveToGallery ? null : destinationPath,
|
||||
savedToGallery: saveToGallery,
|
||||
isMessage: false,
|
||||
fileSize: receivingFile.file.size,
|
||||
senderAlias: receiveState.senderAlias,
|
||||
timestamp: DateTime.now().toUtc(),
|
||||
));
|
||||
await server.ref
|
||||
.redux(receiveHistoryProvider)
|
||||
.dispatchAsync(
|
||||
AddHistoryEntryAction(
|
||||
entryId: fileId,
|
||||
fileName: receivingFile.desiredName!,
|
||||
fileType: receivingFile.file.fileType,
|
||||
path: saveToGallery ? null : destinationPath,
|
||||
savedToGallery: saveToGallery,
|
||||
isMessage: false,
|
||||
fileSize: receivingFile.file.size,
|
||||
senderAlias: receiveState.senderAlias,
|
||||
timestamp: DateTime.now().toUtc(),
|
||||
),
|
||||
);
|
||||
|
||||
_logger.info('Saved ${receivingFile.file.fileName}.');
|
||||
} catch (e, st) {
|
||||
@@ -564,7 +579,9 @@ class ReceiveController {
|
||||
_logger.severe('Failed to save file', e, st);
|
||||
}
|
||||
|
||||
server.ref.notifier(progressProvider).setProgress(
|
||||
server.ref
|
||||
.notifier(progressProvider)
|
||||
.setProgress(
|
||||
sessionId: receiveState.sessionId,
|
||||
fileId: fileId,
|
||||
progress: 1,
|
||||
@@ -694,7 +711,9 @@ class ReceiveController {
|
||||
return await request.respondJson(403, message: 'No permission');
|
||||
}
|
||||
|
||||
server.ref.notifier(sendProvider).cancelSessionByReceiver(
|
||||
server.ref
|
||||
.notifier(sendProvider)
|
||||
.cancelSessionByReceiver(
|
||||
sendState.sessionId,
|
||||
);
|
||||
return await request.respondJson(200);
|
||||
@@ -826,12 +845,14 @@ void _cancelBySender(ServerUtils server) {
|
||||
Routerino.context.popUntil(ReceivePage);
|
||||
}
|
||||
|
||||
server.setState((oldState) => oldState?.copyWith(
|
||||
session: oldState.session?.copyWith(
|
||||
status: SessionStatus.canceledBySender,
|
||||
endTime: DateTime.now().millisecondsSinceEpoch,
|
||||
),
|
||||
));
|
||||
server.setState(
|
||||
(oldState) => oldState?.copyWith(
|
||||
session: oldState.session?.copyWith(
|
||||
status: SessionStatus.canceledBySender,
|
||||
endTime: DateTime.now().millisecondsSinceEpoch,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
extension on ReceiveSessionState {
|
||||
@@ -843,7 +864,8 @@ extension on ReceiveSessionState {
|
||||
required String? errorMessage,
|
||||
}) {
|
||||
return copyWith(
|
||||
files: {...files}..update(
|
||||
files: {...files}
|
||||
..update(
|
||||
fileId,
|
||||
(file) => file.copyWith(
|
||||
status: status,
|
||||
|
||||
@@ -64,16 +64,19 @@ class SendController {
|
||||
return await request.respondJson(403, message: 'Web send not initialized.');
|
||||
}
|
||||
|
||||
return await request.respondJson(200, body: {
|
||||
'waiting': t.web.waiting,
|
||||
'enterPin': t.web.enterPin,
|
||||
'invalidPin': t.web.invalidPin,
|
||||
'tooManyAttempts': t.web.tooManyAttempts,
|
||||
'rejected': t.web.rejected,
|
||||
'files': t.web.files,
|
||||
'fileName': t.web.fileName,
|
||||
'size': t.web.size,
|
||||
});
|
||||
return await request.respondJson(
|
||||
200,
|
||||
body: {
|
||||
'waiting': t.web.waiting,
|
||||
'enterPin': t.web.enterPin,
|
||||
'invalidPin': t.web.invalidPin,
|
||||
'tooManyAttempts': t.web.tooManyAttempts,
|
||||
'rejected': t.web.rejected,
|
||||
'files': t.web.files,
|
||||
'fileName': t.web.fileName,
|
||||
'size': t.web.size,
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
router.post(ApiRoute.prepareDownload.v2, (HttpRequest request) async {
|
||||
@@ -89,21 +92,23 @@ class SendController {
|
||||
final session = server.getState().webSendState?.sessions[requestSessionId];
|
||||
if (session != null && session.responseHandler == null && session.ip == request.ip) {
|
||||
final deviceInfo = server.ref.read(deviceInfoProvider);
|
||||
return await request.respondJson(200,
|
||||
body: ReceiveRequestResponseDto(
|
||||
info: InfoDto(
|
||||
alias: alias,
|
||||
version: protocolVersion,
|
||||
deviceModel: deviceInfo.deviceModel,
|
||||
deviceType: deviceInfo.deviceType,
|
||||
fingerprint: fingerprint,
|
||||
download: true,
|
||||
),
|
||||
sessionId: session.sessionId,
|
||||
files: {
|
||||
for (final entry in state.webSendState!.files.entries) entry.key: entry.value.file,
|
||||
},
|
||||
).toJson());
|
||||
return await request.respondJson(
|
||||
200,
|
||||
body: ReceiveRequestResponseDto(
|
||||
info: InfoDto(
|
||||
alias: alias,
|
||||
version: protocolVersion,
|
||||
deviceModel: deviceInfo.deviceModel,
|
||||
deviceType: deviceInfo.deviceType,
|
||||
fingerprint: fingerprint,
|
||||
download: true,
|
||||
),
|
||||
sessionId: session.sessionId,
|
||||
files: {
|
||||
for (final entry in state.webSendState!.files.entries) entry.key: entry.value.file,
|
||||
},
|
||||
).toJson(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,21 +169,23 @@ class SendController {
|
||||
),
|
||||
);
|
||||
final deviceInfo = server.ref.read(deviceInfoProvider);
|
||||
return await request.respondJson(200,
|
||||
body: ReceiveRequestResponseDto(
|
||||
info: InfoDto(
|
||||
alias: alias,
|
||||
version: protocolVersion,
|
||||
deviceModel: deviceInfo.deviceModel,
|
||||
deviceType: deviceInfo.deviceType,
|
||||
fingerprint: fingerprint,
|
||||
download: true,
|
||||
),
|
||||
sessionId: sessionId,
|
||||
files: {
|
||||
for (final entry in state.webSendState!.files.entries) entry.key: entry.value.file,
|
||||
},
|
||||
).toJson());
|
||||
return await request.respondJson(
|
||||
200,
|
||||
body: ReceiveRequestResponseDto(
|
||||
info: InfoDto(
|
||||
alias: alias,
|
||||
version: protocolVersion,
|
||||
deviceModel: deviceInfo.deviceModel,
|
||||
deviceType: deviceInfo.deviceType,
|
||||
fingerprint: fingerprint,
|
||||
download: true,
|
||||
),
|
||||
sessionId: sessionId,
|
||||
files: {
|
||||
for (final entry in state.webSendState!.files.entries) entry.key: entry.value.file,
|
||||
},
|
||||
).toJson(),
|
||||
);
|
||||
});
|
||||
|
||||
router.get(ApiRoute.download.v2, (HttpRequest request) async {
|
||||
@@ -244,34 +251,38 @@ class SendController {
|
||||
Future<void> initializeWebSend({required List<CrossFile> files}) async {
|
||||
final webSendState = WebSendState(
|
||||
sessions: {},
|
||||
files: Map.fromEntries(await Future.wait(files.map((file) async {
|
||||
final id = _uuid.v4();
|
||||
return MapEntry(
|
||||
id,
|
||||
WebSendFile(
|
||||
file: FileDto(
|
||||
id: id,
|
||||
fileName: file.name,
|
||||
size: file.size,
|
||||
fileType: file.fileType,
|
||||
hash: null,
|
||||
preview: files.first.fileType == FileType.text && files.first.bytes != null
|
||||
? utf8.decode(files.first.bytes!) // send simple message by embedding it into the preview
|
||||
: null,
|
||||
metadata: file.lastModified != null || file.lastAccessed != null
|
||||
? FileMetadata(
|
||||
lastModified: file.lastModified,
|
||||
lastAccessed: file.lastAccessed,
|
||||
)
|
||||
: null,
|
||||
legacy: false,
|
||||
),
|
||||
asset: file.asset,
|
||||
path: file.path,
|
||||
bytes: file.bytes,
|
||||
),
|
||||
);
|
||||
}))),
|
||||
files: Map.fromEntries(
|
||||
await Future.wait(
|
||||
files.map((file) async {
|
||||
final id = _uuid.v4();
|
||||
return MapEntry(
|
||||
id,
|
||||
WebSendFile(
|
||||
file: FileDto(
|
||||
id: id,
|
||||
fileName: file.name,
|
||||
size: file.size,
|
||||
fileType: file.fileType,
|
||||
hash: null,
|
||||
preview: files.first.fileType == FileType.text && files.first.bytes != null
|
||||
? utf8.decode(files.first.bytes!) // send simple message by embedding it into the preview
|
||||
: null,
|
||||
metadata: file.lastModified != null || file.lastAccessed != null
|
||||
? FileMetadata(
|
||||
lastModified: file.lastModified,
|
||||
lastAccessed: file.lastAccessed,
|
||||
)
|
||||
: null,
|
||||
legacy: false,
|
||||
),
|
||||
asset: file.asset,
|
||||
path: file.path,
|
||||
bytes: file.bytes,
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
autoAccept: server.ref.read(settingsProvider).shareViaLinkAutoAccept,
|
||||
pin: null,
|
||||
pinAttempts: {},
|
||||
@@ -309,7 +320,8 @@ extension on WebSendState {
|
||||
required WebSendSession Function(WebSendSession oldSession) update,
|
||||
}) {
|
||||
return copyWith(
|
||||
sessions: {...sessions}..update(
|
||||
sessions: {...sessions}
|
||||
..update(
|
||||
sessionId,
|
||||
(session) => update(session),
|
||||
),
|
||||
|
||||
@@ -22,32 +22,39 @@ final _logger = Logger('Server');
|
||||
/// It is a singleton provider, so only one server can be running at a time.
|
||||
/// The server state is null if the server is not running.
|
||||
/// The server can receive files (since v1) and send files (since v2).
|
||||
final serverProvider = NotifierProvider<ServerService, ServerState?>((ref) {
|
||||
return ServerService();
|
||||
}, onChanged: (_, next, ref) {
|
||||
final settings = ref.read(settingsProvider);
|
||||
final syncState = ref.read(parentIsolateProvider).syncState;
|
||||
final syncStatePrev = (syncState.alias, syncState.port, syncState.protocol, syncState.serverRunning, syncState.download);
|
||||
final syncStateNext = (
|
||||
next?.alias ?? settings.alias,
|
||||
next?.port ?? settings.port,
|
||||
(next?.https ?? settings.https) ? ProtocolType.https : ProtocolType.http,
|
||||
next != null,
|
||||
next?.webSendState != null,
|
||||
);
|
||||
final serverProvider = NotifierProvider<ServerService, ServerState?>(
|
||||
(ref) {
|
||||
return ServerService();
|
||||
},
|
||||
onChanged: (_, next, ref) {
|
||||
final settings = ref.read(settingsProvider);
|
||||
final syncState = ref.read(parentIsolateProvider).syncState;
|
||||
final syncStatePrev = (syncState.alias, syncState.port, syncState.protocol, syncState.serverRunning, syncState.download);
|
||||
final syncStateNext = (
|
||||
next?.alias ?? settings.alias,
|
||||
next?.port ?? settings.port,
|
||||
(next?.https ?? settings.https) ? ProtocolType.https : ProtocolType.http,
|
||||
next != null,
|
||||
next?.webSendState != null,
|
||||
);
|
||||
|
||||
if (syncStatePrev == syncStateNext) {
|
||||
return;
|
||||
}
|
||||
if (syncStatePrev == syncStateNext) {
|
||||
return;
|
||||
}
|
||||
|
||||
ref.redux(parentIsolateProvider).dispatch(IsolateSyncServerStateAction(
|
||||
alias: syncStateNext.$1,
|
||||
port: syncStateNext.$2,
|
||||
protocol: syncStateNext.$3,
|
||||
serverRunning: syncStateNext.$4,
|
||||
download: syncStateNext.$5,
|
||||
));
|
||||
});
|
||||
ref
|
||||
.redux(parentIsolateProvider)
|
||||
.dispatch(
|
||||
IsolateSyncServerStateAction(
|
||||
alias: syncStateNext.$1,
|
||||
port: syncStateNext.$2,
|
||||
protocol: syncStateNext.$3,
|
||||
serverRunning: syncStateNext.$4,
|
||||
download: syncStateNext.$5,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
class ServerService extends Notifier<ServerState?> {
|
||||
late final _serverUtils = ServerUtils(
|
||||
|
||||
@@ -93,10 +93,14 @@ class _SetupSignalingConnection extends AsyncGlobalAction {
|
||||
onConnection: (c) {
|
||||
connection = c;
|
||||
|
||||
ref.redux(signalingProvider).dispatch(_SetConnectionAction(
|
||||
signalingServer: signalingServer,
|
||||
connection: c,
|
||||
));
|
||||
ref
|
||||
.redux(signalingProvider)
|
||||
.dispatch(
|
||||
_SetConnectionAction(
|
||||
signalingServer: signalingServer,
|
||||
connection: c,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -105,21 +109,33 @@ class _SetupSignalingConnection extends AsyncGlobalAction {
|
||||
switch (message) {
|
||||
case WsServerMessage_Hello():
|
||||
for (final d in message.peers) {
|
||||
ref.redux(nearbyDevicesProvider).dispatch(RegisterSignalingDeviceAction(
|
||||
d.toDevice(signalingServer),
|
||||
));
|
||||
ref
|
||||
.redux(nearbyDevicesProvider)
|
||||
.dispatch(
|
||||
RegisterSignalingDeviceAction(
|
||||
d.toDevice(signalingServer),
|
||||
),
|
||||
);
|
||||
}
|
||||
break;
|
||||
case WsServerMessage_Join(peer: final peer):
|
||||
case WsServerMessage_Update(peer: final peer):
|
||||
ref.redux(nearbyDevicesProvider).dispatch(RegisterSignalingDeviceAction(
|
||||
peer.toDevice(signalingServer),
|
||||
));
|
||||
ref
|
||||
.redux(nearbyDevicesProvider)
|
||||
.dispatch(
|
||||
RegisterSignalingDeviceAction(
|
||||
peer.toDevice(signalingServer),
|
||||
),
|
||||
);
|
||||
break;
|
||||
case WsServerMessage_Left():
|
||||
ref.redux(nearbyDevicesProvider).dispatch(UnregisterSignalingDeviceAction(
|
||||
message.peerId.uuid,
|
||||
));
|
||||
ref
|
||||
.redux(nearbyDevicesProvider)
|
||||
.dispatch(
|
||||
UnregisterSignalingDeviceAction(
|
||||
message.peerId.uuid,
|
||||
),
|
||||
);
|
||||
break;
|
||||
case WsServerMessage_Offer():
|
||||
final provider = ReduxProvider<WebRTCReceiveService, WebRTCReceiveState>((ref) {
|
||||
|
||||
@@ -20,17 +20,12 @@ class SignalingStateMapper extends ClassMapperBase<SignalingState> {
|
||||
@override
|
||||
final String id = 'SignalingState';
|
||||
|
||||
static List<String> _$signalingServers(SignalingState v) =>
|
||||
v.signalingServers;
|
||||
static const Field<SignalingState, List<String>> _f$signalingServers =
|
||||
Field('signalingServers', _$signalingServers);
|
||||
static List<String> _$signalingServers(SignalingState v) => v.signalingServers;
|
||||
static const Field<SignalingState, List<String>> _f$signalingServers = Field('signalingServers', _$signalingServers);
|
||||
static List<String> _$stunServers(SignalingState v) => v.stunServers;
|
||||
static const Field<SignalingState, List<String>> _f$stunServers =
|
||||
Field('stunServers', _$stunServers);
|
||||
static Map<String, LsSignalingConnection> _$connections(SignalingState v) =>
|
||||
v.connections;
|
||||
static const Field<SignalingState, Map<String, LsSignalingConnection>>
|
||||
_f$connections = Field('connections', _$connections);
|
||||
static const Field<SignalingState, List<String>> _f$stunServers = Field('stunServers', _$stunServers);
|
||||
static Map<String, LsSignalingConnection> _$connections(SignalingState v) => v.connections;
|
||||
static const Field<SignalingState, Map<String, LsSignalingConnection>> _f$connections = Field('connections', _$connections);
|
||||
|
||||
@override
|
||||
final MappableFields<SignalingState> fields = const {
|
||||
@@ -41,9 +36,10 @@ class SignalingStateMapper extends ClassMapperBase<SignalingState> {
|
||||
|
||||
static SignalingState _instantiate(DecodingData data) {
|
||||
return SignalingState(
|
||||
signalingServers: data.dec(_f$signalingServers),
|
||||
stunServers: data.dec(_f$stunServers),
|
||||
connections: data.dec(_f$connections));
|
||||
signalingServers: data.dec(_f$signalingServers),
|
||||
stunServers: data.dec(_f$stunServers),
|
||||
connections: data.dec(_f$connections),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -60,105 +56,73 @@ class SignalingStateMapper extends ClassMapperBase<SignalingState> {
|
||||
|
||||
mixin SignalingStateMappable {
|
||||
String serialize() {
|
||||
return SignalingStateMapper.ensureInitialized()
|
||||
.encodeJson<SignalingState>(this as SignalingState);
|
||||
return SignalingStateMapper.ensureInitialized().encodeJson<SignalingState>(this as SignalingState);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return SignalingStateMapper.ensureInitialized()
|
||||
.encodeMap<SignalingState>(this as SignalingState);
|
||||
return SignalingStateMapper.ensureInitialized().encodeMap<SignalingState>(this as SignalingState);
|
||||
}
|
||||
|
||||
SignalingStateCopyWith<SignalingState, SignalingState, SignalingState>
|
||||
get copyWith => _SignalingStateCopyWithImpl(
|
||||
this as SignalingState, $identity, $identity);
|
||||
SignalingStateCopyWith<SignalingState, SignalingState, SignalingState> get copyWith =>
|
||||
_SignalingStateCopyWithImpl(this as SignalingState, $identity, $identity);
|
||||
@override
|
||||
String toString() {
|
||||
return SignalingStateMapper.ensureInitialized()
|
||||
.stringifyValue(this as SignalingState);
|
||||
return SignalingStateMapper.ensureInitialized().stringifyValue(this as SignalingState);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return SignalingStateMapper.ensureInitialized()
|
||||
.equalsValue(this as SignalingState, other);
|
||||
return SignalingStateMapper.ensureInitialized().equalsValue(this as SignalingState, other);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return SignalingStateMapper.ensureInitialized()
|
||||
.hashValue(this as SignalingState);
|
||||
return SignalingStateMapper.ensureInitialized().hashValue(this as SignalingState);
|
||||
}
|
||||
}
|
||||
|
||||
extension SignalingStateValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, SignalingState, $Out> {
|
||||
SignalingStateCopyWith<$R, SignalingState, $Out> get $asSignalingState =>
|
||||
$base.as((v, t, t2) => _SignalingStateCopyWithImpl(v, t, t2));
|
||||
extension SignalingStateValueCopy<$R, $Out> on ObjectCopyWith<$R, SignalingState, $Out> {
|
||||
SignalingStateCopyWith<$R, SignalingState, $Out> get $asSignalingState => $base.as((v, t, t2) => _SignalingStateCopyWithImpl(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class SignalingStateCopyWith<$R, $In extends SignalingState, $Out>
|
||||
implements ClassCopyWith<$R, $In, $Out> {
|
||||
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>>
|
||||
get signalingServers;
|
||||
abstract class SignalingStateCopyWith<$R, $In extends SignalingState, $Out> implements ClassCopyWith<$R, $In, $Out> {
|
||||
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>> get signalingServers;
|
||||
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>> get stunServers;
|
||||
MapCopyWith<$R, String, LsSignalingConnection,
|
||||
ObjectCopyWith<$R, LsSignalingConnection, LsSignalingConnection>>
|
||||
get connections;
|
||||
$R call(
|
||||
{List<String>? signalingServers,
|
||||
List<String>? stunServers,
|
||||
Map<String, LsSignalingConnection>? connections});
|
||||
SignalingStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t);
|
||||
MapCopyWith<$R, String, LsSignalingConnection, ObjectCopyWith<$R, LsSignalingConnection, LsSignalingConnection>> get connections;
|
||||
$R call({List<String>? signalingServers, List<String>? stunServers, Map<String, LsSignalingConnection>? connections});
|
||||
SignalingStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
|
||||
}
|
||||
|
||||
class _SignalingStateCopyWithImpl<$R, $Out>
|
||||
extends ClassCopyWithBase<$R, SignalingState, $Out>
|
||||
class _SignalingStateCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, SignalingState, $Out>
|
||||
implements SignalingStateCopyWith<$R, SignalingState, $Out> {
|
||||
_SignalingStateCopyWithImpl(super.value, super.then, super.then2);
|
||||
|
||||
@override
|
||||
late final ClassMapperBase<SignalingState> $mapper =
|
||||
SignalingStateMapper.ensureInitialized();
|
||||
late final ClassMapperBase<SignalingState> $mapper = SignalingStateMapper.ensureInitialized();
|
||||
@override
|
||||
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>>
|
||||
get signalingServers => ListCopyWith(
|
||||
$value.signalingServers,
|
||||
(v, t) => ObjectCopyWith(v, $identity, t),
|
||||
(v) => call(signalingServers: v));
|
||||
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>> get signalingServers =>
|
||||
ListCopyWith($value.signalingServers, (v, t) => ObjectCopyWith(v, $identity, t), (v) => call(signalingServers: v));
|
||||
@override
|
||||
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>>
|
||||
get stunServers => ListCopyWith(
|
||||
$value.stunServers,
|
||||
(v, t) => ObjectCopyWith(v, $identity, t),
|
||||
(v) => call(stunServers: v));
|
||||
ListCopyWith<$R, String, ObjectCopyWith<$R, String, String>> get stunServers =>
|
||||
ListCopyWith($value.stunServers, (v, t) => ObjectCopyWith(v, $identity, t), (v) => call(stunServers: v));
|
||||
@override
|
||||
MapCopyWith<$R, String, LsSignalingConnection,
|
||||
ObjectCopyWith<$R, LsSignalingConnection, LsSignalingConnection>>
|
||||
get connections => MapCopyWith(
|
||||
$value.connections,
|
||||
(v, t) => ObjectCopyWith(v, $identity, t),
|
||||
(v) => call(connections: v));
|
||||
MapCopyWith<$R, String, LsSignalingConnection, ObjectCopyWith<$R, LsSignalingConnection, LsSignalingConnection>> get connections =>
|
||||
MapCopyWith($value.connections, (v, t) => ObjectCopyWith(v, $identity, t), (v) => call(connections: v));
|
||||
@override
|
||||
$R call(
|
||||
{List<String>? signalingServers,
|
||||
List<String>? stunServers,
|
||||
Map<String, LsSignalingConnection>? connections}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (signalingServers != null) #signalingServers: signalingServers,
|
||||
if (stunServers != null) #stunServers: stunServers,
|
||||
if (connections != null) #connections: connections
|
||||
}));
|
||||
$R call({List<String>? signalingServers, List<String>? stunServers, Map<String, LsSignalingConnection>? connections}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (signalingServers != null) #signalingServers: signalingServers,
|
||||
if (stunServers != null) #stunServers: stunServers,
|
||||
if (connections != null) #connections: connections,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
SignalingState $make(CopyWithData data) => SignalingState(
|
||||
signalingServers:
|
||||
data.get(#signalingServers, or: $value.signalingServers),
|
||||
stunServers: data.get(#stunServers, or: $value.stunServers),
|
||||
connections: data.get(#connections, or: $value.connections));
|
||||
signalingServers: data.get(#signalingServers, or: $value.signalingServers),
|
||||
stunServers: data.get(#stunServers, or: $value.stunServers),
|
||||
connections: data.get(#connections, or: $value.connections),
|
||||
);
|
||||
|
||||
@override
|
||||
SignalingStateCopyWith<$R2, SignalingState, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_SignalingStateCopyWithImpl($value, $cast, t);
|
||||
SignalingStateCopyWith<$R2, SignalingState, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _SignalingStateCopyWithImpl($value, $cast, t);
|
||||
}
|
||||
|
||||
@@ -51,13 +51,13 @@ class WebRTCReceiveService extends ReduxNotifier<WebRTCReceiveState> {
|
||||
required SettingsState settings,
|
||||
required List<FavoriteDevice> favorites,
|
||||
required StoredSecurityContext key,
|
||||
}) : _signalingServer = signalingServer,
|
||||
_stunServers = stunServers,
|
||||
_connection = connection,
|
||||
_offer = offer,
|
||||
_settings = settings,
|
||||
_favorites = favorites,
|
||||
_key = key;
|
||||
}) : _signalingServer = signalingServer,
|
||||
_stunServers = stunServers,
|
||||
_connection = connection,
|
||||
_offer = offer,
|
||||
_settings = settings,
|
||||
_favorites = favorites,
|
||||
_key = key;
|
||||
|
||||
@override
|
||||
WebRTCReceiveState init() {
|
||||
|
||||
@@ -21,24 +21,16 @@ class WebRTCReceiveStateMapper extends ClassMapperBase<WebRTCReceiveState> {
|
||||
@override
|
||||
final String id = 'WebRTCReceiveState';
|
||||
|
||||
static LsSignalingConnection _$connection(WebRTCReceiveState v) =>
|
||||
v.connection;
|
||||
static const Field<WebRTCReceiveState, LsSignalingConnection> _f$connection =
|
||||
Field('connection', _$connection);
|
||||
static LsSignalingConnection _$connection(WebRTCReceiveState v) => v.connection;
|
||||
static const Field<WebRTCReceiveState, LsSignalingConnection> _f$connection = Field('connection', _$connection);
|
||||
static WsServerSdpMessage _$offer(WebRTCReceiveState v) => v.offer;
|
||||
static const Field<WebRTCReceiveState, WsServerSdpMessage> _f$offer =
|
||||
Field('offer', _$offer);
|
||||
static const Field<WebRTCReceiveState, WsServerSdpMessage> _f$offer = Field('offer', _$offer);
|
||||
static RTCStatus? _$status(WebRTCReceiveState v) => v.status;
|
||||
static const Field<WebRTCReceiveState, RTCStatus> _f$status =
|
||||
Field('status', _$status);
|
||||
static RtcReceiveController? _$controller(WebRTCReceiveState v) =>
|
||||
v.controller;
|
||||
static const Field<WebRTCReceiveState, RtcReceiveController> _f$controller =
|
||||
Field('controller', _$controller);
|
||||
static ReceiveSessionState? _$sessionState(WebRTCReceiveState v) =>
|
||||
v.sessionState;
|
||||
static const Field<WebRTCReceiveState, ReceiveSessionState> _f$sessionState =
|
||||
Field('sessionState', _$sessionState);
|
||||
static const Field<WebRTCReceiveState, RTCStatus> _f$status = Field('status', _$status);
|
||||
static RtcReceiveController? _$controller(WebRTCReceiveState v) => v.controller;
|
||||
static const Field<WebRTCReceiveState, RtcReceiveController> _f$controller = Field('controller', _$controller);
|
||||
static ReceiveSessionState? _$sessionState(WebRTCReceiveState v) => v.sessionState;
|
||||
static const Field<WebRTCReceiveState, ReceiveSessionState> _f$sessionState = Field('sessionState', _$sessionState);
|
||||
|
||||
@override
|
||||
final MappableFields<WebRTCReceiveState> fields = const {
|
||||
@@ -51,11 +43,12 @@ class WebRTCReceiveStateMapper extends ClassMapperBase<WebRTCReceiveState> {
|
||||
|
||||
static WebRTCReceiveState _instantiate(DecodingData data) {
|
||||
return WebRTCReceiveState(
|
||||
connection: data.dec(_f$connection),
|
||||
offer: data.dec(_f$offer),
|
||||
status: data.dec(_f$status),
|
||||
controller: data.dec(_f$controller),
|
||||
sessionState: data.dec(_f$sessionState));
|
||||
connection: data.dec(_f$connection),
|
||||
offer: data.dec(_f$offer),
|
||||
status: data.dec(_f$status),
|
||||
controller: data.dec(_f$controller),
|
||||
sessionState: data.dec(_f$sessionState),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -72,95 +65,83 @@ class WebRTCReceiveStateMapper extends ClassMapperBase<WebRTCReceiveState> {
|
||||
|
||||
mixin WebRTCReceiveStateMappable {
|
||||
String serialize() {
|
||||
return WebRTCReceiveStateMapper.ensureInitialized()
|
||||
.encodeJson<WebRTCReceiveState>(this as WebRTCReceiveState);
|
||||
return WebRTCReceiveStateMapper.ensureInitialized().encodeJson<WebRTCReceiveState>(this as WebRTCReceiveState);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return WebRTCReceiveStateMapper.ensureInitialized()
|
||||
.encodeMap<WebRTCReceiveState>(this as WebRTCReceiveState);
|
||||
return WebRTCReceiveStateMapper.ensureInitialized().encodeMap<WebRTCReceiveState>(this as WebRTCReceiveState);
|
||||
}
|
||||
|
||||
WebRTCReceiveStateCopyWith<WebRTCReceiveState, WebRTCReceiveState,
|
||||
WebRTCReceiveState>
|
||||
get copyWith => _WebRTCReceiveStateCopyWithImpl(
|
||||
this as WebRTCReceiveState, $identity, $identity);
|
||||
WebRTCReceiveStateCopyWith<WebRTCReceiveState, WebRTCReceiveState, WebRTCReceiveState> get copyWith =>
|
||||
_WebRTCReceiveStateCopyWithImpl(this as WebRTCReceiveState, $identity, $identity);
|
||||
@override
|
||||
String toString() {
|
||||
return WebRTCReceiveStateMapper.ensureInitialized()
|
||||
.stringifyValue(this as WebRTCReceiveState);
|
||||
return WebRTCReceiveStateMapper.ensureInitialized().stringifyValue(this as WebRTCReceiveState);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return WebRTCReceiveStateMapper.ensureInitialized()
|
||||
.equalsValue(this as WebRTCReceiveState, other);
|
||||
return WebRTCReceiveStateMapper.ensureInitialized().equalsValue(this as WebRTCReceiveState, other);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return WebRTCReceiveStateMapper.ensureInitialized()
|
||||
.hashValue(this as WebRTCReceiveState);
|
||||
return WebRTCReceiveStateMapper.ensureInitialized().hashValue(this as WebRTCReceiveState);
|
||||
}
|
||||
}
|
||||
|
||||
extension WebRTCReceiveStateValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, WebRTCReceiveState, $Out> {
|
||||
WebRTCReceiveStateCopyWith<$R, WebRTCReceiveState, $Out>
|
||||
get $asWebRTCReceiveState =>
|
||||
$base.as((v, t, t2) => _WebRTCReceiveStateCopyWithImpl(v, t, t2));
|
||||
extension WebRTCReceiveStateValueCopy<$R, $Out> on ObjectCopyWith<$R, WebRTCReceiveState, $Out> {
|
||||
WebRTCReceiveStateCopyWith<$R, WebRTCReceiveState, $Out> get $asWebRTCReceiveState =>
|
||||
$base.as((v, t, t2) => _WebRTCReceiveStateCopyWithImpl(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class WebRTCReceiveStateCopyWith<$R, $In extends WebRTCReceiveState,
|
||||
$Out> implements ClassCopyWith<$R, $In, $Out> {
|
||||
ReceiveSessionStateCopyWith<$R, ReceiveSessionState, ReceiveSessionState>?
|
||||
get sessionState;
|
||||
$R call(
|
||||
{LsSignalingConnection? connection,
|
||||
WsServerSdpMessage? offer,
|
||||
RTCStatus? status,
|
||||
RtcReceiveController? controller,
|
||||
ReceiveSessionState? sessionState});
|
||||
WebRTCReceiveStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t);
|
||||
abstract class WebRTCReceiveStateCopyWith<$R, $In extends WebRTCReceiveState, $Out> implements ClassCopyWith<$R, $In, $Out> {
|
||||
ReceiveSessionStateCopyWith<$R, ReceiveSessionState, ReceiveSessionState>? get sessionState;
|
||||
$R call({
|
||||
LsSignalingConnection? connection,
|
||||
WsServerSdpMessage? offer,
|
||||
RTCStatus? status,
|
||||
RtcReceiveController? controller,
|
||||
ReceiveSessionState? sessionState,
|
||||
});
|
||||
WebRTCReceiveStateCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
|
||||
}
|
||||
|
||||
class _WebRTCReceiveStateCopyWithImpl<$R, $Out>
|
||||
extends ClassCopyWithBase<$R, WebRTCReceiveState, $Out>
|
||||
class _WebRTCReceiveStateCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, WebRTCReceiveState, $Out>
|
||||
implements WebRTCReceiveStateCopyWith<$R, WebRTCReceiveState, $Out> {
|
||||
_WebRTCReceiveStateCopyWithImpl(super.value, super.then, super.then2);
|
||||
|
||||
@override
|
||||
late final ClassMapperBase<WebRTCReceiveState> $mapper =
|
||||
WebRTCReceiveStateMapper.ensureInitialized();
|
||||
late final ClassMapperBase<WebRTCReceiveState> $mapper = WebRTCReceiveStateMapper.ensureInitialized();
|
||||
@override
|
||||
ReceiveSessionStateCopyWith<$R, ReceiveSessionState, ReceiveSessionState>?
|
||||
get sessionState =>
|
||||
$value.sessionState?.copyWith.$chain((v) => call(sessionState: v));
|
||||
ReceiveSessionStateCopyWith<$R, ReceiveSessionState, ReceiveSessionState>? get sessionState =>
|
||||
$value.sessionState?.copyWith.$chain((v) => call(sessionState: v));
|
||||
@override
|
||||
$R call(
|
||||
{LsSignalingConnection? connection,
|
||||
WsServerSdpMessage? offer,
|
||||
Object? status = $none,
|
||||
Object? controller = $none,
|
||||
Object? sessionState = $none}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (connection != null) #connection: connection,
|
||||
if (offer != null) #offer: offer,
|
||||
if (status != $none) #status: status,
|
||||
if (controller != $none) #controller: controller,
|
||||
if (sessionState != $none) #sessionState: sessionState
|
||||
}));
|
||||
$R call({
|
||||
LsSignalingConnection? connection,
|
||||
WsServerSdpMessage? offer,
|
||||
Object? status = $none,
|
||||
Object? controller = $none,
|
||||
Object? sessionState = $none,
|
||||
}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (connection != null) #connection: connection,
|
||||
if (offer != null) #offer: offer,
|
||||
if (status != $none) #status: status,
|
||||
if (controller != $none) #controller: controller,
|
||||
if (sessionState != $none) #sessionState: sessionState,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
WebRTCReceiveState $make(CopyWithData data) => WebRTCReceiveState(
|
||||
connection: data.get(#connection, or: $value.connection),
|
||||
offer: data.get(#offer, or: $value.offer),
|
||||
status: data.get(#status, or: $value.status),
|
||||
controller: data.get(#controller, or: $value.controller),
|
||||
sessionState: data.get(#sessionState, or: $value.sessionState));
|
||||
connection: data.get(#connection, or: $value.connection),
|
||||
offer: data.get(#offer, or: $value.offer),
|
||||
status: data.get(#status, or: $value.status),
|
||||
controller: data.get(#controller, or: $value.controller),
|
||||
sessionState: data.get(#sessionState, or: $value.sessionState),
|
||||
);
|
||||
|
||||
@override
|
||||
WebRTCReceiveStateCopyWith<$R2, WebRTCReceiveState, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
WebRTCReceiveStateCopyWith<$R2, WebRTCReceiveState, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) =>
|
||||
_WebRTCReceiveStateCopyWithImpl($value, $cast, t);
|
||||
}
|
||||
|
||||
@@ -21,18 +21,13 @@ 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);
|
||||
static bool _$selectMultipleApps(ApkProviderParam v) => v.selectMultipleApps;
|
||||
static const Field<ApkProviderParam, bool> _f$selectMultipleApps =
|
||||
Field('selectMultipleApps', _$selectMultipleApps, opt: true, def: false);
|
||||
static const Field<ApkProviderParam, bool> _f$selectMultipleApps = Field('selectMultipleApps', _$selectMultipleApps, opt: true, def: false);
|
||||
|
||||
@override
|
||||
final MappableFields<ApkProviderParam> fields = const {
|
||||
@@ -44,10 +39,11 @@ class ApkProviderParamMapper extends ClassMapperBase<ApkProviderParam> {
|
||||
|
||||
static ApkProviderParam _instantiate(DecodingData data) {
|
||||
return ApkProviderParam(
|
||||
query: data.dec(_f$query),
|
||||
includeSystemApps: data.dec(_f$includeSystemApps),
|
||||
onlyAppsWithLaunchIntent: data.dec(_f$onlyAppsWithLaunchIntent),
|
||||
selectMultipleApps: data.dec(_f$selectMultipleApps));
|
||||
query: data.dec(_f$query),
|
||||
includeSystemApps: data.dec(_f$includeSystemApps),
|
||||
onlyAppsWithLaunchIntent: data.dec(_f$onlyAppsWithLaunchIntent),
|
||||
selectMultipleApps: data.dec(_f$selectMultipleApps),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -64,88 +60,63 @@ 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 ApkProviderParamMapper.ensureInitialized()
|
||||
.equalsValue(this as ApkProviderParam, other);
|
||||
return ApkProviderParamMapper.ensureInitialized().equalsValue(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,
|
||||
bool? selectMultipleApps});
|
||||
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, bool? selectMultipleApps});
|
||||
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,
|
||||
bool? selectMultipleApps}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (query != null) #query: query,
|
||||
if (includeSystemApps != null) #includeSystemApps: includeSystemApps,
|
||||
if (onlyAppsWithLaunchIntent != null)
|
||||
#onlyAppsWithLaunchIntent: onlyAppsWithLaunchIntent,
|
||||
if (selectMultipleApps != null) #selectMultipleApps: selectMultipleApps
|
||||
}));
|
||||
$R call({String? query, bool? includeSystemApps, bool? onlyAppsWithLaunchIntent, bool? selectMultipleApps}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (query != null) #query: query,
|
||||
if (includeSystemApps != null) #includeSystemApps: includeSystemApps,
|
||||
if (onlyAppsWithLaunchIntent != null) #onlyAppsWithLaunchIntent: onlyAppsWithLaunchIntent,
|
||||
if (selectMultipleApps != null) #selectMultipleApps: selectMultipleApps,
|
||||
}),
|
||||
);
|
||||
@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),
|
||||
selectMultipleApps:
|
||||
data.get(#selectMultipleApps, or: $value.selectMultipleApps));
|
||||
query: data.get(#query, or: $value.query),
|
||||
includeSystemApps: data.get(#includeSystemApps, or: $value.includeSystemApps),
|
||||
onlyAppsWithLaunchIntent: data.get(#onlyAppsWithLaunchIntent, or: $value.onlyAppsWithLaunchIntent),
|
||||
selectMultipleApps: data.get(#selectMultipleApps, or: $value.selectMultipleApps),
|
||||
);
|
||||
|
||||
@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,18 +20,12 @@ 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 _$selectMultipleApps(CachedApkProviderParam v) =>
|
||||
v.selectMultipleApps;
|
||||
static const Field<CachedApkProviderParam, bool> _f$selectMultipleApps =
|
||||
Field('selectMultipleApps', _$selectMultipleApps, opt: true, def: false);
|
||||
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 _$selectMultipleApps(CachedApkProviderParam v) => v.selectMultipleApps;
|
||||
static const Field<CachedApkProviderParam, bool> _f$selectMultipleApps = Field('selectMultipleApps', _$selectMultipleApps, opt: true, def: false);
|
||||
|
||||
@override
|
||||
final MappableFields<CachedApkProviderParam> fields = const {
|
||||
@@ -43,9 +36,10 @@ class CachedApkProviderParamMapper
|
||||
|
||||
static CachedApkProviderParam _instantiate(DecodingData data) {
|
||||
return CachedApkProviderParam(
|
||||
includeSystemApps: data.dec(_f$includeSystemApps),
|
||||
onlyAppsWithLaunchIntent: data.dec(_f$onlyAppsWithLaunchIntent),
|
||||
selectMultipleApps: data.dec(_f$selectMultipleApps));
|
||||
includeSystemApps: data.dec(_f$includeSystemApps),
|
||||
onlyAppsWithLaunchIntent: data.dec(_f$onlyAppsWithLaunchIntent),
|
||||
selectMultipleApps: data.dec(_f$selectMultipleApps),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -62,88 +56,63 @@ 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 CachedApkProviderParamMapper.ensureInitialized()
|
||||
.equalsValue(this as CachedApkProviderParam, other);
|
||||
return CachedApkProviderParamMapper.ensureInitialized().equalsValue(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> {
|
||||
$R call(
|
||||
{bool? includeSystemApps,
|
||||
bool? onlyAppsWithLaunchIntent,
|
||||
bool? selectMultipleApps});
|
||||
CachedApkProviderParamCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t);
|
||||
abstract class CachedApkProviderParamCopyWith<$R, $In extends CachedApkProviderParam, $Out> implements ClassCopyWith<$R, $In, $Out> {
|
||||
$R call({bool? includeSystemApps, bool? onlyAppsWithLaunchIntent, bool? selectMultipleApps});
|
||||
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,
|
||||
bool? selectMultipleApps}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (includeSystemApps != null) #includeSystemApps: includeSystemApps,
|
||||
if (onlyAppsWithLaunchIntent != null)
|
||||
#onlyAppsWithLaunchIntent: onlyAppsWithLaunchIntent,
|
||||
if (selectMultipleApps != null) #selectMultipleApps: selectMultipleApps
|
||||
}));
|
||||
$R call({bool? includeSystemApps, bool? onlyAppsWithLaunchIntent, bool? selectMultipleApps}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (includeSystemApps != null) #includeSystemApps: includeSystemApps,
|
||||
if (onlyAppsWithLaunchIntent != null) #onlyAppsWithLaunchIntent: onlyAppsWithLaunchIntent,
|
||||
if (selectMultipleApps != null) #selectMultipleApps: selectMultipleApps,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
CachedApkProviderParam $make(CopyWithData data) => CachedApkProviderParam(
|
||||
includeSystemApps:
|
||||
data.get(#includeSystemApps, or: $value.includeSystemApps),
|
||||
onlyAppsWithLaunchIntent: data.get(#onlyAppsWithLaunchIntent,
|
||||
or: $value.onlyAppsWithLaunchIntent),
|
||||
selectMultipleApps:
|
||||
data.get(#selectMultipleApps, or: $value.selectMultipleApps));
|
||||
includeSystemApps: data.get(#includeSystemApps, or: $value.includeSystemApps),
|
||||
onlyAppsWithLaunchIntent: data.get(#onlyAppsWithLaunchIntent, or: $value.onlyAppsWithLaunchIntent),
|
||||
selectMultipleApps: data.get(#selectMultipleApps, or: $value.selectMultipleApps),
|
||||
);
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@@ -13,10 +13,10 @@ final purchaseProvider = ReduxProvider<PurchaseService, PurchaseState>((ref) {
|
||||
class PurchaseService extends ReduxNotifier<PurchaseState> {
|
||||
@override
|
||||
PurchaseState init() => const PurchaseState(
|
||||
prices: {},
|
||||
purchases: {},
|
||||
pending: false,
|
||||
);
|
||||
prices: {},
|
||||
purchases: {},
|
||||
pending: false,
|
||||
);
|
||||
}
|
||||
|
||||
class InitPurchaseStream extends AsyncReduxAction<PurchaseService, PurchaseState> {
|
||||
@@ -161,9 +161,9 @@ class PurchaseRestoreAction extends AsyncReduxAction<PurchaseService, PurchaseSt
|
||||
class PurchaseResetAction extends ReduxAction<PurchaseService, PurchaseState> {
|
||||
@override
|
||||
PurchaseState reduce() => state.copyWith(
|
||||
purchases: {},
|
||||
pending: false,
|
||||
);
|
||||
purchases: {},
|
||||
pending: false,
|
||||
);
|
||||
}
|
||||
|
||||
/// Initiate the purchase flow for a product.
|
||||
|
||||
@@ -6,11 +6,14 @@ import 'package:refena_flutter/refena_flutter.dart';
|
||||
|
||||
/// This provider manages the [StoredSecurityContext].
|
||||
/// It contains all the security related data for HTTPS communication.
|
||||
final securityProvider = ReduxProvider<SecurityService, StoredSecurityContext>((ref) {
|
||||
return SecurityService(ref.read(persistenceProvider));
|
||||
}, onChanged: (_, next, ref) {
|
||||
ref.redux(parentIsolateProvider).dispatch(IsolateSyncSecurityContextAction(securityContext: next));
|
||||
});
|
||||
final securityProvider = ReduxProvider<SecurityService, StoredSecurityContext>(
|
||||
(ref) {
|
||||
return SecurityService(ref.read(persistenceProvider));
|
||||
},
|
||||
onChanged: (_, next, ref) {
|
||||
ref.redux(parentIsolateProvider).dispatch(IsolateSyncSecurityContextAction(securityContext: next));
|
||||
},
|
||||
);
|
||||
|
||||
class SecurityService extends ReduxNotifier<StoredSecurityContext> {
|
||||
final PersistenceService _persistence;
|
||||
|
||||
@@ -58,12 +58,14 @@ class SelectedReceivingFilesNotifier extends Notifier<Map<String, String>> {
|
||||
files.sort((a, b) => a.value.compareTo(b.value));
|
||||
}
|
||||
final maxKeyStringLength = files.length.toString().length;
|
||||
state = Map.fromEntries(files.mapIndexed((index, element) {
|
||||
String number = (index + 1).toString();
|
||||
if (padZero) {
|
||||
number.padLeft(maxKeyStringLength, '0');
|
||||
}
|
||||
return MapEntry(element.key, element.value.withFileNameKeepExtension('$prefix$number'));
|
||||
}));
|
||||
state = Map.fromEntries(
|
||||
files.mapIndexed((index, element) {
|
||||
String number = (index + 1).toString();
|
||||
if (padZero) {
|
||||
number.padLeft(maxKeyStringLength, '0');
|
||||
}
|
||||
return MapEntry(element.key, element.value.withFileNameKeepExtension('$prefix$number'));
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,9 +55,11 @@ class AddMessageAction extends ReduxAction<SelectedSendingFilesNotifier, List<Cr
|
||||
lastAccessed: null,
|
||||
);
|
||||
|
||||
return List.unmodifiable([
|
||||
...state,
|
||||
]..insert(index ?? state.length, file));
|
||||
return List.unmodifiable(
|
||||
[
|
||||
...state,
|
||||
]..insert(index ?? state.length, file),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,10 +304,12 @@ class LoadSelectionFromArgsAction extends AsyncReduxActionWithResult<SelectedSen
|
||||
if (message != null && message.trim().isNotEmpty) {
|
||||
dispatch(AddMessageAction(message: message));
|
||||
}
|
||||
await dispatchAsync(AddFilesAction(
|
||||
files: payload.attachments?.where((a) => a != null).cast<SharedAttachment>() ?? <SharedAttachment>[],
|
||||
converter: CrossFileConverters.convertSharedAttachment,
|
||||
));
|
||||
await dispatchAsync(
|
||||
AddFilesAction(
|
||||
files: payload.attachments?.where((a) => a != null).cast<SharedAttachment>() ?? <SharedAttachment>[],
|
||||
converter: CrossFileConverters.convertSharedAttachment,
|
||||
),
|
||||
);
|
||||
filesAdded = true;
|
||||
continue;
|
||||
}
|
||||
@@ -317,10 +321,12 @@ class LoadSelectionFromArgsAction extends AsyncReduxActionWithResult<SelectedSen
|
||||
final directory = Directory(arg);
|
||||
|
||||
if (file.existsSync()) {
|
||||
await dispatchAsync(AddFilesAction(
|
||||
files: [file],
|
||||
converter: CrossFileConverters.convertFile,
|
||||
));
|
||||
await dispatchAsync(
|
||||
AddFilesAction(
|
||||
files: [file],
|
||||
converter: CrossFileConverters.convertFile,
|
||||
),
|
||||
);
|
||||
filesAdded = true;
|
||||
} else if (directory.existsSync()) {
|
||||
await dispatchAsync(AddDirectoryAction(arg));
|
||||
|
||||
@@ -11,24 +11,31 @@ import 'package:refena_flutter/refena_flutter.dart';
|
||||
|
||||
final _listEq = const ListEquality().equals;
|
||||
|
||||
final settingsProvider = NotifierProvider<SettingsService, SettingsState>((ref) {
|
||||
return SettingsService(ref.read(persistenceProvider));
|
||||
}, onChanged: (_, next, ref) {
|
||||
final syncState = ref.read(parentIsolateProvider).syncState;
|
||||
if (_listEq(syncState.networkWhitelist, next.networkWhitelist) &&
|
||||
_listEq(syncState.networkBlacklist, next.networkBlacklist) &&
|
||||
syncState.multicastGroup == next.multicastGroup &&
|
||||
syncState.discoveryTimeout == next.discoveryTimeout) {
|
||||
return;
|
||||
}
|
||||
final settingsProvider = NotifierProvider<SettingsService, SettingsState>(
|
||||
(ref) {
|
||||
return SettingsService(ref.read(persistenceProvider));
|
||||
},
|
||||
onChanged: (_, next, ref) {
|
||||
final syncState = ref.read(parentIsolateProvider).syncState;
|
||||
if (_listEq(syncState.networkWhitelist, next.networkWhitelist) &&
|
||||
_listEq(syncState.networkBlacklist, next.networkBlacklist) &&
|
||||
syncState.multicastGroup == next.multicastGroup &&
|
||||
syncState.discoveryTimeout == next.discoveryTimeout) {
|
||||
return;
|
||||
}
|
||||
|
||||
ref.redux(parentIsolateProvider).dispatch(IsolateSyncSettingsAction(
|
||||
networkWhitelist: next.networkWhitelist,
|
||||
networkBlacklist: next.networkBlacklist,
|
||||
multicastGroup: next.multicastGroup,
|
||||
discoveryTimeout: next.discoveryTimeout,
|
||||
));
|
||||
});
|
||||
ref
|
||||
.redux(parentIsolateProvider)
|
||||
.dispatch(
|
||||
IsolateSyncSettingsAction(
|
||||
networkWhitelist: next.networkWhitelist,
|
||||
networkBlacklist: next.networkBlacklist,
|
||||
multicastGroup: next.multicastGroup,
|
||||
discoveryTimeout: next.discoveryTimeout,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
class SettingsService extends PureNotifier<SettingsState> {
|
||||
final PersistenceService _persistence;
|
||||
@@ -37,33 +44,33 @@ class SettingsService extends PureNotifier<SettingsState> {
|
||||
|
||||
@override
|
||||
SettingsState init() => SettingsState(
|
||||
showToken: _persistence.getShowToken(),
|
||||
alias: _persistence.getAlias(),
|
||||
theme: _persistence.getTheme(),
|
||||
colorMode: _persistence.getColorMode(),
|
||||
locale: _persistence.getLocale(),
|
||||
port: _persistence.getPort(),
|
||||
networkWhitelist: _persistence.getNetworkWhitelist(),
|
||||
networkBlacklist: _persistence.getNetworkBlacklist(),
|
||||
multicastGroup: _persistence.getMulticastGroup(),
|
||||
destination: _persistence.getDestination(),
|
||||
saveToGallery: _persistence.isSaveToGallery(),
|
||||
saveToHistory: _persistence.isSaveToHistory(),
|
||||
quickSave: _persistence.isQuickSave(),
|
||||
quickSaveFromFavorites: _persistence.isQuickSaveFromFavorites(),
|
||||
receivePin: _persistence.getReceivePin(),
|
||||
autoFinish: _persistence.isAutoFinish(),
|
||||
minimizeToTray: _persistence.isMinimizeToTray(),
|
||||
https: _persistence.isHttps(),
|
||||
sendMode: _persistence.getSendMode(),
|
||||
saveWindowPlacement: _persistence.getSaveWindowPlacement(),
|
||||
enableAnimations: _persistence.getEnableAnimations(),
|
||||
deviceType: _persistence.getDeviceType(),
|
||||
deviceModel: _persistence.getDeviceModel(),
|
||||
shareViaLinkAutoAccept: _persistence.getShareViaLinkAutoAccept(),
|
||||
discoveryTimeout: _persistence.getDiscoveryTimeout(),
|
||||
advancedSettings: _persistence.getAdvancedSettingsEnabled(),
|
||||
);
|
||||
showToken: _persistence.getShowToken(),
|
||||
alias: _persistence.getAlias(),
|
||||
theme: _persistence.getTheme(),
|
||||
colorMode: _persistence.getColorMode(),
|
||||
locale: _persistence.getLocale(),
|
||||
port: _persistence.getPort(),
|
||||
networkWhitelist: _persistence.getNetworkWhitelist(),
|
||||
networkBlacklist: _persistence.getNetworkBlacklist(),
|
||||
multicastGroup: _persistence.getMulticastGroup(),
|
||||
destination: _persistence.getDestination(),
|
||||
saveToGallery: _persistence.isSaveToGallery(),
|
||||
saveToHistory: _persistence.isSaveToHistory(),
|
||||
quickSave: _persistence.isQuickSave(),
|
||||
quickSaveFromFavorites: _persistence.isQuickSaveFromFavorites(),
|
||||
receivePin: _persistence.getReceivePin(),
|
||||
autoFinish: _persistence.isAutoFinish(),
|
||||
minimizeToTray: _persistence.isMinimizeToTray(),
|
||||
https: _persistence.isHttps(),
|
||||
sendMode: _persistence.getSendMode(),
|
||||
saveWindowPlacement: _persistence.getSaveWindowPlacement(),
|
||||
enableAnimations: _persistence.getEnableAnimations(),
|
||||
deviceType: _persistence.getDeviceType(),
|
||||
deviceModel: _persistence.getDeviceModel(),
|
||||
shareViaLinkAutoAccept: _persistence.getShareViaLinkAutoAccept(),
|
||||
discoveryTimeout: _persistence.getDiscoveryTimeout(),
|
||||
advancedSettings: _persistence.getAdvancedSettingsEnabled(),
|
||||
);
|
||||
|
||||
Future<void> setAlias(String alias) async {
|
||||
await _persistence.setAlias(alias);
|
||||
|
||||
@@ -7,11 +7,9 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||
import 'package:localsend_app/rust/frb_generated.dart';
|
||||
|
||||
Future<void> verifyCert({required String cert, required String publicKey}) =>
|
||||
RustLib.instance.api
|
||||
.crateApiCryptoVerifyCert(cert: cert, publicKey: publicKey);
|
||||
RustLib.instance.api.crateApiCryptoVerifyCert(cert: cert, publicKey: publicKey);
|
||||
|
||||
Future<KeyPair> generateKeyPair() =>
|
||||
RustLib.instance.api.crateApiCryptoGenerateKeyPair();
|
||||
Future<KeyPair> generateKeyPair() => RustLib.instance.api.crateApiCryptoGenerateKeyPair();
|
||||
|
||||
class KeyPair {
|
||||
final String privateKey;
|
||||
@@ -28,8 +26,5 @@ class KeyPair {
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is KeyPair &&
|
||||
runtimeType == other.runtimeType &&
|
||||
privateKey == other.privateKey &&
|
||||
publicKey == other.publicKey;
|
||||
other is KeyPair && runtimeType == other.runtimeType && privateKey == other.privateKey && publicKey == other.publicKey;
|
||||
}
|
||||
|
||||
@@ -6,5 +6,4 @@
|
||||
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||
import 'package:localsend_app/rust/frb_generated.dart';
|
||||
|
||||
Future<void> enableDebugLogging() =>
|
||||
RustLib.instance.api.crateApiLoggingEnableDebugLogging();
|
||||
Future<void> enableDebugLogging() => RustLib.instance.api.crateApiLoggingEnableDebugLogging();
|
||||
|
||||
@@ -14,7 +14,6 @@ enum DeviceType {
|
||||
web,
|
||||
headless,
|
||||
server,
|
||||
;
|
||||
}
|
||||
|
||||
class FileDto {
|
||||
@@ -37,14 +36,7 @@ class FileDto {
|
||||
});
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
id.hashCode ^
|
||||
fileName.hashCode ^
|
||||
size.hashCode ^
|
||||
fileType.hashCode ^
|
||||
sha256.hashCode ^
|
||||
preview.hashCode ^
|
||||
metadata.hashCode;
|
||||
int get hashCode => id.hashCode ^ fileName.hashCode ^ size.hashCode ^ fileType.hashCode ^ sha256.hashCode ^ preview.hashCode ^ metadata.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
@@ -74,9 +66,5 @@ class FileMetadata {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is FileMetadata &&
|
||||
runtimeType == other.runtimeType &&
|
||||
modified == other.modified &&
|
||||
accessed == other.accessed;
|
||||
identical(this, other) || other is FileMetadata && runtimeType == other.runtimeType && modified == other.modified && accessed == other.accessed;
|
||||
}
|
||||
|
||||
@@ -13,34 +13,31 @@ part 'webrtc.freezed.dart';
|
||||
|
||||
// These functions are ignored because they are not marked as `pub`: `sign`
|
||||
|
||||
Stream<WsServerMessage> connect(
|
||||
{required String uri,
|
||||
required ProposingClientInfo info,
|
||||
required String privateKey,
|
||||
required FutureOr<void> Function(LsSignalingConnection)
|
||||
onConnection}) =>
|
||||
RustLib.instance.api.crateApiWebrtcConnect(
|
||||
uri: uri,
|
||||
info: info,
|
||||
privateKey: privateKey,
|
||||
onConnection: onConnection);
|
||||
Stream<WsServerMessage> connect({
|
||||
required String uri,
|
||||
required ProposingClientInfo info,
|
||||
required String privateKey,
|
||||
required FutureOr<void> Function(LsSignalingConnection) onConnection,
|
||||
}) => RustLib.instance.api.crateApiWebrtcConnect(uri: uri, info: info, privateKey: privateKey, onConnection: onConnection);
|
||||
|
||||
// Rust type: RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<LsSignalingConnection>>
|
||||
abstract class LsSignalingConnection implements RustOpaqueInterface {
|
||||
Future<RtcReceiveController> acceptOffer(
|
||||
{required List<String> stunServers,
|
||||
required WsServerSdpMessage offer,
|
||||
required String privateKey,
|
||||
ExpectingPublicKey? expectingPublicKey,
|
||||
PinConfig? pin});
|
||||
Future<RtcReceiveController> acceptOffer({
|
||||
required List<String> stunServers,
|
||||
required WsServerSdpMessage offer,
|
||||
required String privateKey,
|
||||
ExpectingPublicKey? expectingPublicKey,
|
||||
PinConfig? pin,
|
||||
});
|
||||
|
||||
Future<RtcSendController> sendOffer(
|
||||
{required List<String> stunServers,
|
||||
required UuidValue target,
|
||||
required String privateKey,
|
||||
ExpectingPublicKey? expectingPublicKey,
|
||||
PinConfig? pin,
|
||||
required List<FileDto> files});
|
||||
Future<RtcSendController> sendOffer({
|
||||
required List<String> stunServers,
|
||||
required UuidValue target,
|
||||
required String privateKey,
|
||||
ExpectingPublicKey? expectingPublicKey,
|
||||
PinConfig? pin,
|
||||
required List<FileDto> files,
|
||||
});
|
||||
|
||||
Future<void> updateInfo({required ClientInfoWithoutId info});
|
||||
}
|
||||
@@ -107,13 +104,7 @@ class ClientInfo {
|
||||
});
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
id.hashCode ^
|
||||
alias.hashCode ^
|
||||
version.hashCode ^
|
||||
deviceModel.hashCode ^
|
||||
deviceType.hashCode ^
|
||||
token.hashCode;
|
||||
int get hashCode => id.hashCode ^ alias.hashCode ^ version.hashCode ^ deviceModel.hashCode ^ deviceType.hashCode ^ token.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
@@ -144,12 +135,7 @@ class ClientInfoWithoutId {
|
||||
});
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
alias.hashCode ^
|
||||
version.hashCode ^
|
||||
deviceModel.hashCode ^
|
||||
deviceType.hashCode ^
|
||||
token.hashCode;
|
||||
int get hashCode => alias.hashCode ^ version.hashCode ^ deviceModel.hashCode ^ deviceType.hashCode ^ token.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
@@ -179,11 +165,7 @@ class ExpectingPublicKey {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is ExpectingPublicKey &&
|
||||
runtimeType == other.runtimeType &&
|
||||
publicKey == other.publicKey &&
|
||||
kind == other.kind;
|
||||
identical(this, other) || other is ExpectingPublicKey && runtimeType == other.runtimeType && publicKey == other.publicKey && kind == other.kind;
|
||||
}
|
||||
|
||||
class PinConfig {
|
||||
@@ -200,11 +182,7 @@ class PinConfig {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is PinConfig &&
|
||||
runtimeType == other.runtimeType &&
|
||||
pin == other.pin &&
|
||||
maxTries == other.maxTries;
|
||||
identical(this, other) || other is PinConfig && runtimeType == other.runtimeType && pin == other.pin && maxTries == other.maxTries;
|
||||
}
|
||||
|
||||
class ProposingClientInfo {
|
||||
@@ -221,11 +199,7 @@ class ProposingClientInfo {
|
||||
});
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
alias.hashCode ^
|
||||
version.hashCode ^
|
||||
deviceModel.hashCode ^
|
||||
deviceType.hashCode;
|
||||
int get hashCode => alias.hashCode ^ version.hashCode ^ deviceModel.hashCode ^ deviceType.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
@@ -252,11 +226,7 @@ class RTCFileError {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is RTCFileError &&
|
||||
runtimeType == other.runtimeType &&
|
||||
fileId == other.fileId &&
|
||||
error == other.error;
|
||||
identical(this, other) || other is RTCFileError && runtimeType == other.runtimeType && fileId == other.fileId && error == other.error;
|
||||
}
|
||||
|
||||
class RTCSendFileResponse {
|
||||
@@ -276,11 +246,7 @@ class RTCSendFileResponse {
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is RTCSendFileResponse &&
|
||||
runtimeType == other.runtimeType &&
|
||||
id == other.id &&
|
||||
success == other.success &&
|
||||
error == other.error;
|
||||
other is RTCSendFileResponse && runtimeType == other.runtimeType && id == other.id && success == other.success && error == other.error;
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -344,9 +310,5 @@ class WsServerSdpMessage {
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is WsServerSdpMessage &&
|
||||
runtimeType == other.runtimeType &&
|
||||
peer == other.peer &&
|
||||
sessionId == other.sessionId &&
|
||||
sdp == other.sdp;
|
||||
other is WsServerSdpMessage && runtimeType == other.runtimeType && peer == other.peer && sessionId == other.sessionId && sdp == other.sdp;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+1011
-1325
File diff suppressed because it is too large
Load Diff
+229
-333
@@ -23,139 +23,100 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
required super.portManager,
|
||||
});
|
||||
|
||||
CrossPlatformFinalizerArg
|
||||
get rust_arc_decrement_strong_count_LsSignalingConnectionPtr => wire
|
||||
._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnectionPtr;
|
||||
CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_LsSignalingConnectionPtr =>
|
||||
wire._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnectionPtr;
|
||||
|
||||
CrossPlatformFinalizerArg
|
||||
get rust_arc_decrement_strong_count_RtcFileReceiverPtr => wire
|
||||
._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiverPtr;
|
||||
CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_RtcFileReceiverPtr =>
|
||||
wire._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiverPtr;
|
||||
|
||||
CrossPlatformFinalizerArg
|
||||
get rust_arc_decrement_strong_count_RtcFileSenderPtr => wire
|
||||
._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSenderPtr;
|
||||
CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_RtcFileSenderPtr =>
|
||||
wire._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSenderPtr;
|
||||
|
||||
CrossPlatformFinalizerArg
|
||||
get rust_arc_decrement_strong_count_RtcReceiveControllerPtr => wire
|
||||
._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveControllerPtr;
|
||||
CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_RtcReceiveControllerPtr =>
|
||||
wire._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveControllerPtr;
|
||||
|
||||
CrossPlatformFinalizerArg
|
||||
get rust_arc_decrement_strong_count_RtcSendControllerPtr => wire
|
||||
._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendControllerPtr;
|
||||
CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_RtcSendControllerPtr =>
|
||||
wire._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendControllerPtr;
|
||||
|
||||
@protected
|
||||
AnyhowException dco_decode_AnyhowException(dynamic raw);
|
||||
|
||||
@protected
|
||||
LsSignalingConnection
|
||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
dynamic raw);
|
||||
LsSignalingConnection dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcFileReceiver
|
||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
dynamic raw);
|
||||
RtcFileReceiver dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcFileSender
|
||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
dynamic raw);
|
||||
RtcFileSender dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcReceiveController
|
||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
dynamic raw);
|
||||
RtcReceiveController dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
dynamic raw);
|
||||
RtcSendController dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
dynamic raw);
|
||||
RtcSendController dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(dynamic raw);
|
||||
|
||||
@protected
|
||||
LsSignalingConnection
|
||||
dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
dynamic raw);
|
||||
LsSignalingConnection dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcFileReceiver
|
||||
dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
dynamic raw);
|
||||
RtcFileReceiver dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcFileSender
|
||||
dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
dynamic raw);
|
||||
RtcFileSender dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcReceiveController
|
||||
dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
dynamic raw);
|
||||
RtcReceiveController dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
dynamic raw);
|
||||
RtcSendController dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(dynamic raw);
|
||||
|
||||
@protected
|
||||
FutureOr<void> Function(LsSignalingConnection)
|
||||
dco_decode_DartFn_Inputs_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection_Output_unit_AnyhowException(
|
||||
dynamic raw);
|
||||
dco_decode_DartFn_Inputs_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection_Output_unit_AnyhowException(
|
||||
dynamic raw,
|
||||
);
|
||||
|
||||
@protected
|
||||
Object dco_decode_DartOpaque(dynamic raw);
|
||||
|
||||
@protected
|
||||
LsSignalingConnection
|
||||
dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
dynamic raw);
|
||||
LsSignalingConnection dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcFileReceiver
|
||||
dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
dynamic raw);
|
||||
RtcFileReceiver dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcFileSender
|
||||
dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
dynamic raw);
|
||||
RtcFileSender dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcReceiveController
|
||||
dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
dynamic raw);
|
||||
RtcReceiveController dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
dynamic raw);
|
||||
RtcSendController dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(dynamic raw);
|
||||
|
||||
@protected
|
||||
Set<String> dco_decode_Set_String_None(dynamic raw);
|
||||
|
||||
@protected
|
||||
RustStreamSink<RtcFileReceiver>
|
||||
dco_decode_StreamSink_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver_Sse(
|
||||
dynamic raw);
|
||||
RustStreamSink<RtcFileReceiver> dco_decode_StreamSink_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver_Sse(
|
||||
dynamic raw,
|
||||
);
|
||||
|
||||
@protected
|
||||
RustStreamSink<Uint8List> dco_decode_StreamSink_list_prim_u_8_strict_Sse(
|
||||
dynamic raw);
|
||||
RustStreamSink<Uint8List> dco_decode_StreamSink_list_prim_u_8_strict_Sse(dynamic raw);
|
||||
|
||||
@protected
|
||||
RustStreamSink<RTCFileError> dco_decode_StreamSink_rtc_file_error_Sse(
|
||||
dynamic raw);
|
||||
RustStreamSink<RTCFileError> dco_decode_StreamSink_rtc_file_error_Sse(dynamic raw);
|
||||
|
||||
@protected
|
||||
RustStreamSink<RTCStatus> dco_decode_StreamSink_rtc_status_Sse(dynamic raw);
|
||||
|
||||
@protected
|
||||
RustStreamSink<WsServerMessage> dco_decode_StreamSink_ws_server_message_Sse(
|
||||
dynamic raw);
|
||||
RustStreamSink<WsServerMessage> dco_decode_StreamSink_ws_server_message_Sse(dynamic raw);
|
||||
|
||||
@protected
|
||||
String dco_decode_String(dynamic raw);
|
||||
@@ -170,8 +131,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
ClientInfo dco_decode_box_autoadd_client_info(dynamic raw);
|
||||
|
||||
@protected
|
||||
ClientInfoWithoutId dco_decode_box_autoadd_client_info_without_id(
|
||||
dynamic raw);
|
||||
ClientInfoWithoutId dco_decode_box_autoadd_client_info_without_id(dynamic raw);
|
||||
|
||||
@protected
|
||||
DeviceType dco_decode_box_autoadd_device_type(dynamic raw);
|
||||
@@ -189,8 +149,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
ProposingClientInfo dco_decode_box_autoadd_proposing_client_info(dynamic raw);
|
||||
|
||||
@protected
|
||||
RTCSendFileResponse dco_decode_box_autoadd_rtc_send_file_response(
|
||||
dynamic raw);
|
||||
RTCSendFileResponse dco_decode_box_autoadd_rtc_send_file_response(dynamic raw);
|
||||
|
||||
@protected
|
||||
WsServerSdpMessage dco_decode_box_autoadd_ws_server_sdp_message(dynamic raw);
|
||||
@@ -244,8 +203,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
DeviceType? dco_decode_opt_box_autoadd_device_type(dynamic raw);
|
||||
|
||||
@protected
|
||||
ExpectingPublicKey? dco_decode_opt_box_autoadd_expecting_public_key(
|
||||
dynamic raw);
|
||||
ExpectingPublicKey? dco_decode_opt_box_autoadd_expecting_public_key(dynamic raw);
|
||||
|
||||
@protected
|
||||
FileMetadata? dco_decode_opt_box_autoadd_file_metadata(dynamic raw);
|
||||
@@ -293,111 +251,87 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
LsSignalingConnection
|
||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
SseDeserializer deserializer);
|
||||
LsSignalingConnection sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
RtcFileReceiver
|
||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
SseDeserializer deserializer);
|
||||
RtcFileReceiver sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcFileSender
|
||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
SseDeserializer deserializer);
|
||||
RtcFileSender sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcReceiveController
|
||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
SseDeserializer deserializer);
|
||||
RtcReceiveController sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
SseDeserializer deserializer);
|
||||
RtcSendController sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
SseDeserializer deserializer);
|
||||
RtcSendController sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
LsSignalingConnection
|
||||
sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
SseDeserializer deserializer);
|
||||
LsSignalingConnection sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
RtcFileReceiver
|
||||
sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
SseDeserializer deserializer);
|
||||
RtcFileReceiver sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcFileSender
|
||||
sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
SseDeserializer deserializer);
|
||||
RtcFileSender sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcReceiveController
|
||||
sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
SseDeserializer deserializer);
|
||||
RtcReceiveController sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
SseDeserializer deserializer);
|
||||
RtcSendController sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
Object sse_decode_DartOpaque(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
LsSignalingConnection
|
||||
sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
SseDeserializer deserializer);
|
||||
LsSignalingConnection sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcFileReceiver
|
||||
sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
SseDeserializer deserializer);
|
||||
RtcFileReceiver sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcFileSender
|
||||
sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
SseDeserializer deserializer);
|
||||
RtcFileSender sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcReceiveController
|
||||
sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
SseDeserializer deserializer);
|
||||
RtcReceiveController sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
SseDeserializer deserializer);
|
||||
RtcSendController sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
Set<String> sse_decode_Set_String_None(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RustStreamSink<RtcFileReceiver>
|
||||
sse_decode_StreamSink_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver_Sse(
|
||||
SseDeserializer deserializer);
|
||||
RustStreamSink<RtcFileReceiver> sse_decode_StreamSink_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver_Sse(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
RustStreamSink<Uint8List> sse_decode_StreamSink_list_prim_u_8_strict_Sse(
|
||||
SseDeserializer deserializer);
|
||||
RustStreamSink<Uint8List> sse_decode_StreamSink_list_prim_u_8_strict_Sse(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RustStreamSink<RTCFileError> sse_decode_StreamSink_rtc_file_error_Sse(
|
||||
SseDeserializer deserializer);
|
||||
RustStreamSink<RTCFileError> sse_decode_StreamSink_rtc_file_error_Sse(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RustStreamSink<RTCStatus> sse_decode_StreamSink_rtc_status_Sse(
|
||||
SseDeserializer deserializer);
|
||||
RustStreamSink<RTCStatus> sse_decode_StreamSink_rtc_status_Sse(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RustStreamSink<WsServerMessage> sse_decode_StreamSink_ws_server_message_Sse(
|
||||
SseDeserializer deserializer);
|
||||
RustStreamSink<WsServerMessage> sse_decode_StreamSink_ws_server_message_Sse(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
String sse_decode_String(SseDeserializer deserializer);
|
||||
@@ -412,48 +346,40 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
ClientInfo sse_decode_box_autoadd_client_info(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ClientInfoWithoutId sse_decode_box_autoadd_client_info_without_id(
|
||||
SseDeserializer deserializer);
|
||||
ClientInfoWithoutId sse_decode_box_autoadd_client_info_without_id(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
DeviceType sse_decode_box_autoadd_device_type(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ExpectingPublicKey sse_decode_box_autoadd_expecting_public_key(
|
||||
SseDeserializer deserializer);
|
||||
ExpectingPublicKey sse_decode_box_autoadd_expecting_public_key(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
FileMetadata sse_decode_box_autoadd_file_metadata(
|
||||
SseDeserializer deserializer);
|
||||
FileMetadata sse_decode_box_autoadd_file_metadata(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
PinConfig sse_decode_box_autoadd_pin_config(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ProposingClientInfo sse_decode_box_autoadd_proposing_client_info(
|
||||
SseDeserializer deserializer);
|
||||
ProposingClientInfo sse_decode_box_autoadd_proposing_client_info(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RTCSendFileResponse sse_decode_box_autoadd_rtc_send_file_response(
|
||||
SseDeserializer deserializer);
|
||||
RTCSendFileResponse sse_decode_box_autoadd_rtc_send_file_response(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
WsServerSdpMessage sse_decode_box_autoadd_ws_server_sdp_message(
|
||||
SseDeserializer deserializer);
|
||||
WsServerSdpMessage sse_decode_box_autoadd_ws_server_sdp_message(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ClientInfo sse_decode_client_info(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ClientInfoWithoutId sse_decode_client_info_without_id(
|
||||
SseDeserializer deserializer);
|
||||
ClientInfoWithoutId sse_decode_client_info_without_id(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
DeviceType sse_decode_device_type(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ExpectingPublicKey sse_decode_expecting_public_key(
|
||||
SseDeserializer deserializer);
|
||||
ExpectingPublicKey sse_decode_expecting_public_key(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
FileDto sse_decode_file_dto(SseDeserializer deserializer);
|
||||
@@ -489,34 +415,28 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
String? sse_decode_opt_String(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
DeviceType? sse_decode_opt_box_autoadd_device_type(
|
||||
SseDeserializer deserializer);
|
||||
DeviceType? sse_decode_opt_box_autoadd_device_type(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ExpectingPublicKey? sse_decode_opt_box_autoadd_expecting_public_key(
|
||||
SseDeserializer deserializer);
|
||||
ExpectingPublicKey? sse_decode_opt_box_autoadd_expecting_public_key(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
FileMetadata? sse_decode_opt_box_autoadd_file_metadata(
|
||||
SseDeserializer deserializer);
|
||||
FileMetadata? sse_decode_opt_box_autoadd_file_metadata(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
PinConfig? sse_decode_opt_box_autoadd_pin_config(
|
||||
SseDeserializer deserializer);
|
||||
PinConfig? sse_decode_opt_box_autoadd_pin_config(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
PinConfig sse_decode_pin_config(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ProposingClientInfo sse_decode_proposing_client_info(
|
||||
SseDeserializer deserializer);
|
||||
ProposingClientInfo sse_decode_proposing_client_info(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RTCFileError sse_decode_rtc_file_error(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RTCSendFileResponse sse_decode_rtc_send_file_response(
|
||||
SseDeserializer deserializer);
|
||||
RTCSendFileResponse sse_decode_rtc_send_file_response(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RTCStatus sse_decode_rtc_status(SseDeserializer deserializer);
|
||||
@@ -540,125 +460,125 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
WsServerMessage sse_decode_ws_server_message(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
WsServerSdpMessage sse_decode_ws_server_sdp_message(
|
||||
SseDeserializer deserializer);
|
||||
WsServerSdpMessage sse_decode_ws_server_sdp_message(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_AnyhowException(
|
||||
AnyhowException self, SseSerializer serializer);
|
||||
void sse_encode_AnyhowException(AnyhowException self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
LsSignalingConnection self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
RtcFileReceiver self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
RtcFileSender self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
RtcReceiveController self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
RtcSendController self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
RtcSendController self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
LsSignalingConnection self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
RtcFileReceiver self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(RtcFileSender self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
RtcReceiveController self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
RtcSendController self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
LsSignalingConnection self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
RtcFileReceiver self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
RtcFileSender self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
RtcReceiveController self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
RtcSendController self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
RtcSendController self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
LsSignalingConnection self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
RtcFileReceiver self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
RtcFileSender self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
RtcReceiveController self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
RtcSendController self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_DartFn_Inputs_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection_Output_unit_AnyhowException(
|
||||
FutureOr<void> Function(LsSignalingConnection) self,
|
||||
SseSerializer serializer);
|
||||
sse_encode_DartFn_Inputs_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection_Output_unit_AnyhowException(
|
||||
FutureOr<void> Function(LsSignalingConnection) self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_DartOpaque(Object self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
LsSignalingConnection self, SseSerializer serializer);
|
||||
void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
LsSignalingConnection self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
RtcFileReceiver self, SseSerializer serializer);
|
||||
void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(RtcFileReceiver self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
RtcFileSender self, SseSerializer serializer);
|
||||
void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(RtcFileSender self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
RtcReceiveController self, SseSerializer serializer);
|
||||
void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
RtcReceiveController self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
RtcSendController self, SseSerializer serializer);
|
||||
void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(RtcSendController self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_Set_String_None(Set<String> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_StreamSink_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver_Sse(
|
||||
RustStreamSink<RtcFileReceiver> self, SseSerializer serializer);
|
||||
void sse_encode_StreamSink_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver_Sse(
|
||||
RustStreamSink<RtcFileReceiver> self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_StreamSink_list_prim_u_8_strict_Sse(
|
||||
RustStreamSink<Uint8List> self, SseSerializer serializer);
|
||||
void sse_encode_StreamSink_list_prim_u_8_strict_Sse(RustStreamSink<Uint8List> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_StreamSink_rtc_file_error_Sse(
|
||||
RustStreamSink<RTCFileError> self, SseSerializer serializer);
|
||||
void sse_encode_StreamSink_rtc_file_error_Sse(RustStreamSink<RTCFileError> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_StreamSink_rtc_status_Sse(
|
||||
RustStreamSink<RTCStatus> self, SseSerializer serializer);
|
||||
void sse_encode_StreamSink_rtc_status_Sse(RustStreamSink<RTCStatus> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_StreamSink_ws_server_message_Sse(
|
||||
RustStreamSink<WsServerMessage> self, SseSerializer serializer);
|
||||
void sse_encode_StreamSink_ws_server_message_Sse(RustStreamSink<WsServerMessage> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_String(String self, SseSerializer serializer);
|
||||
@@ -670,54 +590,43 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
void sse_encode_bool(bool self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_client_info(
|
||||
ClientInfo self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_client_info(ClientInfo self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_client_info_without_id(
|
||||
ClientInfoWithoutId self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_client_info_without_id(ClientInfoWithoutId self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_device_type(
|
||||
DeviceType self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_device_type(DeviceType self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_expecting_public_key(
|
||||
ExpectingPublicKey self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_expecting_public_key(ExpectingPublicKey self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_file_metadata(
|
||||
FileMetadata self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_file_metadata(FileMetadata self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_pin_config(
|
||||
PinConfig self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_pin_config(PinConfig self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_proposing_client_info(
|
||||
ProposingClientInfo self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_proposing_client_info(ProposingClientInfo self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_rtc_send_file_response(
|
||||
RTCSendFileResponse self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_rtc_send_file_response(RTCSendFileResponse self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_ws_server_sdp_message(
|
||||
WsServerSdpMessage self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_ws_server_sdp_message(WsServerSdpMessage self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_client_info(ClientInfo self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_client_info_without_id(
|
||||
ClientInfoWithoutId self, SseSerializer serializer);
|
||||
void sse_encode_client_info_without_id(ClientInfoWithoutId self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_device_type(DeviceType self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_expecting_public_key(
|
||||
ExpectingPublicKey self, SseSerializer serializer);
|
||||
void sse_encode_expecting_public_key(ExpectingPublicKey self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_file_dto(FileDto self, SseSerializer serializer);
|
||||
@@ -738,8 +647,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
void sse_encode_list_String(List<String> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_list_client_info(
|
||||
List<ClientInfo> self, SseSerializer serializer);
|
||||
void sse_encode_list_client_info(List<ClientInfo> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_list_file_dto(List<FileDto> self, SseSerializer serializer);
|
||||
@@ -748,41 +656,34 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
void sse_encode_list_prim_u_8_loose(List<int> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_list_prim_u_8_strict(
|
||||
Uint8List self, SseSerializer serializer);
|
||||
void sse_encode_list_prim_u_8_strict(Uint8List self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_opt_String(String? self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_opt_box_autoadd_device_type(
|
||||
DeviceType? self, SseSerializer serializer);
|
||||
void sse_encode_opt_box_autoadd_device_type(DeviceType? self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_opt_box_autoadd_expecting_public_key(
|
||||
ExpectingPublicKey? self, SseSerializer serializer);
|
||||
void sse_encode_opt_box_autoadd_expecting_public_key(ExpectingPublicKey? self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_opt_box_autoadd_file_metadata(
|
||||
FileMetadata? self, SseSerializer serializer);
|
||||
void sse_encode_opt_box_autoadd_file_metadata(FileMetadata? self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_opt_box_autoadd_pin_config(
|
||||
PinConfig? self, SseSerializer serializer);
|
||||
void sse_encode_opt_box_autoadd_pin_config(PinConfig? self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_pin_config(PinConfig self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_proposing_client_info(
|
||||
ProposingClientInfo self, SseSerializer serializer);
|
||||
void sse_encode_proposing_client_info(ProposingClientInfo self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_rtc_file_error(RTCFileError self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_rtc_send_file_response(
|
||||
RTCSendFileResponse self, SseSerializer serializer);
|
||||
void sse_encode_rtc_send_file_response(RTCSendFileResponse self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_rtc_status(RTCStatus self, SseSerializer serializer);
|
||||
@@ -803,30 +704,24 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
void sse_encode_usize(BigInt self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_ws_server_message(
|
||||
WsServerMessage self, SseSerializer serializer);
|
||||
void sse_encode_ws_server_message(WsServerMessage self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_ws_server_sdp_message(
|
||||
WsServerSdpMessage self, SseSerializer serializer);
|
||||
void sse_encode_ws_server_sdp_message(WsServerSdpMessage self, SseSerializer serializer);
|
||||
}
|
||||
|
||||
// Section: wire_class
|
||||
|
||||
class RustLibWire implements BaseWire {
|
||||
factory RustLibWire.fromExternalLibrary(ExternalLibrary lib) =>
|
||||
RustLibWire(lib.ffiDynamicLibrary);
|
||||
factory RustLibWire.fromExternalLibrary(ExternalLibrary lib) => RustLibWire(lib.ffiDynamicLibrary);
|
||||
|
||||
/// Holds the symbol lookup function.
|
||||
final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
|
||||
_lookup;
|
||||
final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName) _lookup;
|
||||
|
||||
/// The symbols are looked up in [dynamicLibrary].
|
||||
RustLibWire(ffi.DynamicLibrary dynamicLibrary)
|
||||
: _lookup = dynamicLibrary.lookup;
|
||||
RustLibWire(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup;
|
||||
|
||||
void
|
||||
rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
ffi.Pointer<ffi.Void> ptr,
|
||||
) {
|
||||
return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
@@ -836,13 +731,13 @@ class RustLibWire implements BaseWire {
|
||||
|
||||
late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnectionPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'frbgen_localsend_app_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection');
|
||||
'frbgen_localsend_app_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection',
|
||||
);
|
||||
late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection =
|
||||
_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnectionPtr
|
||||
.asFunction<void Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
void
|
||||
rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
ffi.Pointer<ffi.Void> ptr,
|
||||
) {
|
||||
return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
@@ -852,13 +747,13 @@ class RustLibWire implements BaseWire {
|
||||
|
||||
late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnectionPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'frbgen_localsend_app_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection');
|
||||
'frbgen_localsend_app_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection',
|
||||
);
|
||||
late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection =
|
||||
_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnectionPtr
|
||||
.asFunction<void Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
void
|
||||
rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
ffi.Pointer<ffi.Void> ptr,
|
||||
) {
|
||||
return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
@@ -868,13 +763,13 @@ class RustLibWire implements BaseWire {
|
||||
|
||||
late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiverPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'frbgen_localsend_app_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver');
|
||||
'frbgen_localsend_app_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver',
|
||||
);
|
||||
late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver =
|
||||
_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiverPtr
|
||||
.asFunction<void Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
void
|
||||
rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
ffi.Pointer<ffi.Void> ptr,
|
||||
) {
|
||||
return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
@@ -884,13 +779,13 @@ class RustLibWire implements BaseWire {
|
||||
|
||||
late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiverPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'frbgen_localsend_app_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver');
|
||||
'frbgen_localsend_app_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver',
|
||||
);
|
||||
late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver =
|
||||
_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiverPtr
|
||||
.asFunction<void Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
void
|
||||
rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
ffi.Pointer<ffi.Void> ptr,
|
||||
) {
|
||||
return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
@@ -900,13 +795,13 @@ class RustLibWire implements BaseWire {
|
||||
|
||||
late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSenderPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'frbgen_localsend_app_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender');
|
||||
'frbgen_localsend_app_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender',
|
||||
);
|
||||
late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender =
|
||||
_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSenderPtr
|
||||
.asFunction<void Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
void
|
||||
rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
ffi.Pointer<ffi.Void> ptr,
|
||||
) {
|
||||
return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
@@ -916,13 +811,13 @@ class RustLibWire implements BaseWire {
|
||||
|
||||
late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSenderPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'frbgen_localsend_app_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender');
|
||||
'frbgen_localsend_app_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender',
|
||||
);
|
||||
late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender =
|
||||
_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSenderPtr
|
||||
.asFunction<void Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
void
|
||||
rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
ffi.Pointer<ffi.Void> ptr,
|
||||
) {
|
||||
return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
@@ -932,13 +827,13 @@ class RustLibWire implements BaseWire {
|
||||
|
||||
late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveControllerPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'frbgen_localsend_app_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController');
|
||||
'frbgen_localsend_app_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController',
|
||||
);
|
||||
late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController =
|
||||
_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveControllerPtr
|
||||
.asFunction<void Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
void
|
||||
rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
ffi.Pointer<ffi.Void> ptr,
|
||||
) {
|
||||
return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
@@ -948,13 +843,13 @@ class RustLibWire implements BaseWire {
|
||||
|
||||
late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveControllerPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'frbgen_localsend_app_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController');
|
||||
'frbgen_localsend_app_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController',
|
||||
);
|
||||
late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController =
|
||||
_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveControllerPtr
|
||||
.asFunction<void Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
void
|
||||
rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
ffi.Pointer<ffi.Void> ptr,
|
||||
) {
|
||||
return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
@@ -964,13 +859,13 @@ class RustLibWire implements BaseWire {
|
||||
|
||||
late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendControllerPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'frbgen_localsend_app_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController');
|
||||
'frbgen_localsend_app_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController',
|
||||
);
|
||||
late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController =
|
||||
_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendControllerPtr
|
||||
.asFunction<void Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
void
|
||||
rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
ffi.Pointer<ffi.Void> ptr,
|
||||
) {
|
||||
return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
@@ -980,7 +875,8 @@ class RustLibWire implements BaseWire {
|
||||
|
||||
late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendControllerPtr =
|
||||
_lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
|
||||
'frbgen_localsend_app_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController');
|
||||
'frbgen_localsend_app_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController',
|
||||
);
|
||||
late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController =
|
||||
_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendControllerPtr
|
||||
.asFunction<void Function(ffi.Pointer<ffi.Void>)>();
|
||||
|
||||
+226
-377
@@ -25,139 +25,100 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
required super.portManager,
|
||||
});
|
||||
|
||||
CrossPlatformFinalizerArg
|
||||
get rust_arc_decrement_strong_count_LsSignalingConnectionPtr => wire
|
||||
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection;
|
||||
CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_LsSignalingConnectionPtr =>
|
||||
wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection;
|
||||
|
||||
CrossPlatformFinalizerArg
|
||||
get rust_arc_decrement_strong_count_RtcFileReceiverPtr => wire
|
||||
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver;
|
||||
CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_RtcFileReceiverPtr =>
|
||||
wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver;
|
||||
|
||||
CrossPlatformFinalizerArg
|
||||
get rust_arc_decrement_strong_count_RtcFileSenderPtr => wire
|
||||
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender;
|
||||
CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_RtcFileSenderPtr =>
|
||||
wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender;
|
||||
|
||||
CrossPlatformFinalizerArg
|
||||
get rust_arc_decrement_strong_count_RtcReceiveControllerPtr => wire
|
||||
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController;
|
||||
CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_RtcReceiveControllerPtr =>
|
||||
wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController;
|
||||
|
||||
CrossPlatformFinalizerArg
|
||||
get rust_arc_decrement_strong_count_RtcSendControllerPtr => wire
|
||||
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController;
|
||||
CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_RtcSendControllerPtr =>
|
||||
wire.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController;
|
||||
|
||||
@protected
|
||||
AnyhowException dco_decode_AnyhowException(dynamic raw);
|
||||
|
||||
@protected
|
||||
LsSignalingConnection
|
||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
dynamic raw);
|
||||
LsSignalingConnection dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcFileReceiver
|
||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
dynamic raw);
|
||||
RtcFileReceiver dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcFileSender
|
||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
dynamic raw);
|
||||
RtcFileSender dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcReceiveController
|
||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
dynamic raw);
|
||||
RtcReceiveController dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
dynamic raw);
|
||||
RtcSendController dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
dynamic raw);
|
||||
RtcSendController dco_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(dynamic raw);
|
||||
|
||||
@protected
|
||||
LsSignalingConnection
|
||||
dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
dynamic raw);
|
||||
LsSignalingConnection dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcFileReceiver
|
||||
dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
dynamic raw);
|
||||
RtcFileReceiver dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcFileSender
|
||||
dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
dynamic raw);
|
||||
RtcFileSender dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcReceiveController
|
||||
dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
dynamic raw);
|
||||
RtcReceiveController dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
dynamic raw);
|
||||
RtcSendController dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(dynamic raw);
|
||||
|
||||
@protected
|
||||
FutureOr<void> Function(LsSignalingConnection)
|
||||
dco_decode_DartFn_Inputs_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection_Output_unit_AnyhowException(
|
||||
dynamic raw);
|
||||
dco_decode_DartFn_Inputs_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection_Output_unit_AnyhowException(
|
||||
dynamic raw,
|
||||
);
|
||||
|
||||
@protected
|
||||
Object dco_decode_DartOpaque(dynamic raw);
|
||||
|
||||
@protected
|
||||
LsSignalingConnection
|
||||
dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
dynamic raw);
|
||||
LsSignalingConnection dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcFileReceiver
|
||||
dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
dynamic raw);
|
||||
RtcFileReceiver dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcFileSender
|
||||
dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
dynamic raw);
|
||||
RtcFileSender dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcReceiveController
|
||||
dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
dynamic raw);
|
||||
RtcReceiveController dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(dynamic raw);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
dynamic raw);
|
||||
RtcSendController dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(dynamic raw);
|
||||
|
||||
@protected
|
||||
Set<String> dco_decode_Set_String_None(dynamic raw);
|
||||
|
||||
@protected
|
||||
RustStreamSink<RtcFileReceiver>
|
||||
dco_decode_StreamSink_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver_Sse(
|
||||
dynamic raw);
|
||||
RustStreamSink<RtcFileReceiver> dco_decode_StreamSink_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver_Sse(
|
||||
dynamic raw,
|
||||
);
|
||||
|
||||
@protected
|
||||
RustStreamSink<Uint8List> dco_decode_StreamSink_list_prim_u_8_strict_Sse(
|
||||
dynamic raw);
|
||||
RustStreamSink<Uint8List> dco_decode_StreamSink_list_prim_u_8_strict_Sse(dynamic raw);
|
||||
|
||||
@protected
|
||||
RustStreamSink<RTCFileError> dco_decode_StreamSink_rtc_file_error_Sse(
|
||||
dynamic raw);
|
||||
RustStreamSink<RTCFileError> dco_decode_StreamSink_rtc_file_error_Sse(dynamic raw);
|
||||
|
||||
@protected
|
||||
RustStreamSink<RTCStatus> dco_decode_StreamSink_rtc_status_Sse(dynamic raw);
|
||||
|
||||
@protected
|
||||
RustStreamSink<WsServerMessage> dco_decode_StreamSink_ws_server_message_Sse(
|
||||
dynamic raw);
|
||||
RustStreamSink<WsServerMessage> dco_decode_StreamSink_ws_server_message_Sse(dynamic raw);
|
||||
|
||||
@protected
|
||||
String dco_decode_String(dynamic raw);
|
||||
@@ -172,8 +133,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
ClientInfo dco_decode_box_autoadd_client_info(dynamic raw);
|
||||
|
||||
@protected
|
||||
ClientInfoWithoutId dco_decode_box_autoadd_client_info_without_id(
|
||||
dynamic raw);
|
||||
ClientInfoWithoutId dco_decode_box_autoadd_client_info_without_id(dynamic raw);
|
||||
|
||||
@protected
|
||||
DeviceType dco_decode_box_autoadd_device_type(dynamic raw);
|
||||
@@ -191,8 +151,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
ProposingClientInfo dco_decode_box_autoadd_proposing_client_info(dynamic raw);
|
||||
|
||||
@protected
|
||||
RTCSendFileResponse dco_decode_box_autoadd_rtc_send_file_response(
|
||||
dynamic raw);
|
||||
RTCSendFileResponse dco_decode_box_autoadd_rtc_send_file_response(dynamic raw);
|
||||
|
||||
@protected
|
||||
WsServerSdpMessage dco_decode_box_autoadd_ws_server_sdp_message(dynamic raw);
|
||||
@@ -246,8 +205,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
DeviceType? dco_decode_opt_box_autoadd_device_type(dynamic raw);
|
||||
|
||||
@protected
|
||||
ExpectingPublicKey? dco_decode_opt_box_autoadd_expecting_public_key(
|
||||
dynamic raw);
|
||||
ExpectingPublicKey? dco_decode_opt_box_autoadd_expecting_public_key(dynamic raw);
|
||||
|
||||
@protected
|
||||
FileMetadata? dco_decode_opt_box_autoadd_file_metadata(dynamic raw);
|
||||
@@ -295,111 +253,87 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
LsSignalingConnection
|
||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
SseDeserializer deserializer);
|
||||
LsSignalingConnection sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
RtcFileReceiver
|
||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
SseDeserializer deserializer);
|
||||
RtcFileReceiver sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcFileSender
|
||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
SseDeserializer deserializer);
|
||||
RtcFileSender sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcReceiveController
|
||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
SseDeserializer deserializer);
|
||||
RtcReceiveController sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
SseDeserializer deserializer);
|
||||
RtcSendController sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
SseDeserializer deserializer);
|
||||
RtcSendController sse_decode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
LsSignalingConnection
|
||||
sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
SseDeserializer deserializer);
|
||||
LsSignalingConnection sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
RtcFileReceiver
|
||||
sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
SseDeserializer deserializer);
|
||||
RtcFileReceiver sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcFileSender
|
||||
sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
SseDeserializer deserializer);
|
||||
RtcFileSender sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcReceiveController
|
||||
sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
SseDeserializer deserializer);
|
||||
RtcReceiveController sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
SseDeserializer deserializer);
|
||||
RtcSendController sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
Object sse_decode_DartOpaque(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
LsSignalingConnection
|
||||
sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
SseDeserializer deserializer);
|
||||
LsSignalingConnection sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcFileReceiver
|
||||
sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
SseDeserializer deserializer);
|
||||
RtcFileReceiver sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcFileSender
|
||||
sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
SseDeserializer deserializer);
|
||||
RtcFileSender sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcReceiveController
|
||||
sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
SseDeserializer deserializer);
|
||||
RtcReceiveController sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RtcSendController
|
||||
sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
SseDeserializer deserializer);
|
||||
RtcSendController sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
Set<String> sse_decode_Set_String_None(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RustStreamSink<RtcFileReceiver>
|
||||
sse_decode_StreamSink_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver_Sse(
|
||||
SseDeserializer deserializer);
|
||||
RustStreamSink<RtcFileReceiver> sse_decode_StreamSink_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver_Sse(
|
||||
SseDeserializer deserializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
RustStreamSink<Uint8List> sse_decode_StreamSink_list_prim_u_8_strict_Sse(
|
||||
SseDeserializer deserializer);
|
||||
RustStreamSink<Uint8List> sse_decode_StreamSink_list_prim_u_8_strict_Sse(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RustStreamSink<RTCFileError> sse_decode_StreamSink_rtc_file_error_Sse(
|
||||
SseDeserializer deserializer);
|
||||
RustStreamSink<RTCFileError> sse_decode_StreamSink_rtc_file_error_Sse(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RustStreamSink<RTCStatus> sse_decode_StreamSink_rtc_status_Sse(
|
||||
SseDeserializer deserializer);
|
||||
RustStreamSink<RTCStatus> sse_decode_StreamSink_rtc_status_Sse(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RustStreamSink<WsServerMessage> sse_decode_StreamSink_ws_server_message_Sse(
|
||||
SseDeserializer deserializer);
|
||||
RustStreamSink<WsServerMessage> sse_decode_StreamSink_ws_server_message_Sse(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
String sse_decode_String(SseDeserializer deserializer);
|
||||
@@ -414,48 +348,40 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
ClientInfo sse_decode_box_autoadd_client_info(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ClientInfoWithoutId sse_decode_box_autoadd_client_info_without_id(
|
||||
SseDeserializer deserializer);
|
||||
ClientInfoWithoutId sse_decode_box_autoadd_client_info_without_id(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
DeviceType sse_decode_box_autoadd_device_type(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ExpectingPublicKey sse_decode_box_autoadd_expecting_public_key(
|
||||
SseDeserializer deserializer);
|
||||
ExpectingPublicKey sse_decode_box_autoadd_expecting_public_key(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
FileMetadata sse_decode_box_autoadd_file_metadata(
|
||||
SseDeserializer deserializer);
|
||||
FileMetadata sse_decode_box_autoadd_file_metadata(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
PinConfig sse_decode_box_autoadd_pin_config(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ProposingClientInfo sse_decode_box_autoadd_proposing_client_info(
|
||||
SseDeserializer deserializer);
|
||||
ProposingClientInfo sse_decode_box_autoadd_proposing_client_info(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RTCSendFileResponse sse_decode_box_autoadd_rtc_send_file_response(
|
||||
SseDeserializer deserializer);
|
||||
RTCSendFileResponse sse_decode_box_autoadd_rtc_send_file_response(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
WsServerSdpMessage sse_decode_box_autoadd_ws_server_sdp_message(
|
||||
SseDeserializer deserializer);
|
||||
WsServerSdpMessage sse_decode_box_autoadd_ws_server_sdp_message(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ClientInfo sse_decode_client_info(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ClientInfoWithoutId sse_decode_client_info_without_id(
|
||||
SseDeserializer deserializer);
|
||||
ClientInfoWithoutId sse_decode_client_info_without_id(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
DeviceType sse_decode_device_type(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ExpectingPublicKey sse_decode_expecting_public_key(
|
||||
SseDeserializer deserializer);
|
||||
ExpectingPublicKey sse_decode_expecting_public_key(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
FileDto sse_decode_file_dto(SseDeserializer deserializer);
|
||||
@@ -491,34 +417,28 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
String? sse_decode_opt_String(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
DeviceType? sse_decode_opt_box_autoadd_device_type(
|
||||
SseDeserializer deserializer);
|
||||
DeviceType? sse_decode_opt_box_autoadd_device_type(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ExpectingPublicKey? sse_decode_opt_box_autoadd_expecting_public_key(
|
||||
SseDeserializer deserializer);
|
||||
ExpectingPublicKey? sse_decode_opt_box_autoadd_expecting_public_key(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
FileMetadata? sse_decode_opt_box_autoadd_file_metadata(
|
||||
SseDeserializer deserializer);
|
||||
FileMetadata? sse_decode_opt_box_autoadd_file_metadata(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
PinConfig? sse_decode_opt_box_autoadd_pin_config(
|
||||
SseDeserializer deserializer);
|
||||
PinConfig? sse_decode_opt_box_autoadd_pin_config(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
PinConfig sse_decode_pin_config(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
ProposingClientInfo sse_decode_proposing_client_info(
|
||||
SseDeserializer deserializer);
|
||||
ProposingClientInfo sse_decode_proposing_client_info(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RTCFileError sse_decode_rtc_file_error(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RTCSendFileResponse sse_decode_rtc_send_file_response(
|
||||
SseDeserializer deserializer);
|
||||
RTCSendFileResponse sse_decode_rtc_send_file_response(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
RTCStatus sse_decode_rtc_status(SseDeserializer deserializer);
|
||||
@@ -542,125 +462,125 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
WsServerMessage sse_decode_ws_server_message(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
WsServerSdpMessage sse_decode_ws_server_sdp_message(
|
||||
SseDeserializer deserializer);
|
||||
WsServerSdpMessage sse_decode_ws_server_sdp_message(SseDeserializer deserializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_AnyhowException(
|
||||
AnyhowException self, SseSerializer serializer);
|
||||
void sse_encode_AnyhowException(AnyhowException self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
LsSignalingConnection self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
RtcFileReceiver self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
RtcFileSender self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
RtcReceiveController self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
RtcSendController self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
RtcSendController self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
LsSignalingConnection self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
RtcFileReceiver self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(RtcFileSender self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
RtcReceiveController self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
RtcSendController self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
LsSignalingConnection self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
RtcFileReceiver self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
RtcFileSender self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
RtcReceiveController self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
RtcSendController self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
RtcSendController self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
LsSignalingConnection self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
RtcFileReceiver self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
RtcFileSender self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
RtcReceiveController self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
RtcSendController self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_DartFn_Inputs_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection_Output_unit_AnyhowException(
|
||||
FutureOr<void> Function(LsSignalingConnection) self,
|
||||
SseSerializer serializer);
|
||||
sse_encode_DartFn_Inputs_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection_Output_unit_AnyhowException(
|
||||
FutureOr<void> Function(LsSignalingConnection) self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_DartOpaque(Object self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
LsSignalingConnection self, SseSerializer serializer);
|
||||
void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
LsSignalingConnection self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
RtcFileReceiver self, SseSerializer serializer);
|
||||
void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(RtcFileReceiver self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
RtcFileSender self, SseSerializer serializer);
|
||||
void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(RtcFileSender self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
RtcReceiveController self, SseSerializer serializer);
|
||||
void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
RtcReceiveController self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
RtcSendController self, SseSerializer serializer);
|
||||
void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(RtcSendController self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_Set_String_None(Set<String> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void
|
||||
sse_encode_StreamSink_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver_Sse(
|
||||
RustStreamSink<RtcFileReceiver> self, SseSerializer serializer);
|
||||
void sse_encode_StreamSink_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver_Sse(
|
||||
RustStreamSink<RtcFileReceiver> self,
|
||||
SseSerializer serializer,
|
||||
);
|
||||
|
||||
@protected
|
||||
void sse_encode_StreamSink_list_prim_u_8_strict_Sse(
|
||||
RustStreamSink<Uint8List> self, SseSerializer serializer);
|
||||
void sse_encode_StreamSink_list_prim_u_8_strict_Sse(RustStreamSink<Uint8List> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_StreamSink_rtc_file_error_Sse(
|
||||
RustStreamSink<RTCFileError> self, SseSerializer serializer);
|
||||
void sse_encode_StreamSink_rtc_file_error_Sse(RustStreamSink<RTCFileError> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_StreamSink_rtc_status_Sse(
|
||||
RustStreamSink<RTCStatus> self, SseSerializer serializer);
|
||||
void sse_encode_StreamSink_rtc_status_Sse(RustStreamSink<RTCStatus> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_StreamSink_ws_server_message_Sse(
|
||||
RustStreamSink<WsServerMessage> self, SseSerializer serializer);
|
||||
void sse_encode_StreamSink_ws_server_message_Sse(RustStreamSink<WsServerMessage> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_String(String self, SseSerializer serializer);
|
||||
@@ -672,54 +592,43 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
void sse_encode_bool(bool self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_client_info(
|
||||
ClientInfo self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_client_info(ClientInfo self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_client_info_without_id(
|
||||
ClientInfoWithoutId self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_client_info_without_id(ClientInfoWithoutId self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_device_type(
|
||||
DeviceType self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_device_type(DeviceType self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_expecting_public_key(
|
||||
ExpectingPublicKey self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_expecting_public_key(ExpectingPublicKey self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_file_metadata(
|
||||
FileMetadata self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_file_metadata(FileMetadata self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_pin_config(
|
||||
PinConfig self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_pin_config(PinConfig self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_proposing_client_info(
|
||||
ProposingClientInfo self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_proposing_client_info(ProposingClientInfo self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_rtc_send_file_response(
|
||||
RTCSendFileResponse self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_rtc_send_file_response(RTCSendFileResponse self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_box_autoadd_ws_server_sdp_message(
|
||||
WsServerSdpMessage self, SseSerializer serializer);
|
||||
void sse_encode_box_autoadd_ws_server_sdp_message(WsServerSdpMessage self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_client_info(ClientInfo self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_client_info_without_id(
|
||||
ClientInfoWithoutId self, SseSerializer serializer);
|
||||
void sse_encode_client_info_without_id(ClientInfoWithoutId self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_device_type(DeviceType self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_expecting_public_key(
|
||||
ExpectingPublicKey self, SseSerializer serializer);
|
||||
void sse_encode_expecting_public_key(ExpectingPublicKey self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_file_dto(FileDto self, SseSerializer serializer);
|
||||
@@ -740,8 +649,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
void sse_encode_list_String(List<String> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_list_client_info(
|
||||
List<ClientInfo> self, SseSerializer serializer);
|
||||
void sse_encode_list_client_info(List<ClientInfo> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_list_file_dto(List<FileDto> self, SseSerializer serializer);
|
||||
@@ -750,41 +658,34 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
void sse_encode_list_prim_u_8_loose(List<int> self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_list_prim_u_8_strict(
|
||||
Uint8List self, SseSerializer serializer);
|
||||
void sse_encode_list_prim_u_8_strict(Uint8List self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_opt_String(String? self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_opt_box_autoadd_device_type(
|
||||
DeviceType? self, SseSerializer serializer);
|
||||
void sse_encode_opt_box_autoadd_device_type(DeviceType? self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_opt_box_autoadd_expecting_public_key(
|
||||
ExpectingPublicKey? self, SseSerializer serializer);
|
||||
void sse_encode_opt_box_autoadd_expecting_public_key(ExpectingPublicKey? self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_opt_box_autoadd_file_metadata(
|
||||
FileMetadata? self, SseSerializer serializer);
|
||||
void sse_encode_opt_box_autoadd_file_metadata(FileMetadata? self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_opt_box_autoadd_pin_config(
|
||||
PinConfig? self, SseSerializer serializer);
|
||||
void sse_encode_opt_box_autoadd_pin_config(PinConfig? self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_pin_config(PinConfig self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_proposing_client_info(
|
||||
ProposingClientInfo self, SseSerializer serializer);
|
||||
void sse_encode_proposing_client_info(ProposingClientInfo self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_rtc_file_error(RTCFileError self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_rtc_send_file_response(
|
||||
RTCSendFileResponse self, SseSerializer serializer);
|
||||
void sse_encode_rtc_send_file_response(RTCSendFileResponse self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_rtc_status(RTCStatus self, SseSerializer serializer);
|
||||
@@ -805,12 +706,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
void sse_encode_usize(BigInt self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_ws_server_message(
|
||||
WsServerMessage self, SseSerializer serializer);
|
||||
void sse_encode_ws_server_message(WsServerMessage self, SseSerializer serializer);
|
||||
|
||||
@protected
|
||||
void sse_encode_ws_server_sdp_message(
|
||||
WsServerSdpMessage self, SseSerializer serializer);
|
||||
void sse_encode_ws_server_sdp_message(WsServerSdpMessage self, SseSerializer serializer);
|
||||
}
|
||||
|
||||
// Section: wire_class
|
||||
@@ -818,65 +717,35 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
|
||||
class RustLibWire implements BaseWire {
|
||||
RustLibWire.fromExternalLibrary(ExternalLibrary lib);
|
||||
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
int ptr) =>
|
||||
wasmModule
|
||||
.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
ptr);
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(int ptr) =>
|
||||
wasmModule.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(ptr);
|
||||
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
int ptr) =>
|
||||
wasmModule
|
||||
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
ptr);
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(int ptr) =>
|
||||
wasmModule.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(ptr);
|
||||
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
int ptr) =>
|
||||
wasmModule
|
||||
.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
ptr);
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(int ptr) =>
|
||||
wasmModule.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(ptr);
|
||||
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
int ptr) =>
|
||||
wasmModule
|
||||
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
ptr);
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(int ptr) =>
|
||||
wasmModule.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(ptr);
|
||||
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
int ptr) =>
|
||||
wasmModule
|
||||
.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
ptr);
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(int ptr) =>
|
||||
wasmModule.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(ptr);
|
||||
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
int ptr) =>
|
||||
wasmModule
|
||||
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
ptr);
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(int ptr) =>
|
||||
wasmModule.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(ptr);
|
||||
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
int ptr) =>
|
||||
wasmModule
|
||||
.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
ptr);
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(int ptr) =>
|
||||
wasmModule.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(ptr);
|
||||
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
int ptr) =>
|
||||
wasmModule
|
||||
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
ptr);
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(int ptr) =>
|
||||
wasmModule.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(ptr);
|
||||
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
int ptr) =>
|
||||
wasmModule
|
||||
.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
ptr);
|
||||
void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(int ptr) =>
|
||||
wasmModule.rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(ptr);
|
||||
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
int ptr) =>
|
||||
wasmModule
|
||||
.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
ptr);
|
||||
void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(int ptr) =>
|
||||
wasmModule.rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(ptr);
|
||||
}
|
||||
|
||||
@JS('wasm_bindgen')
|
||||
@@ -885,43 +754,23 @@ external RustLibWasmModule get wasmModule;
|
||||
@JS()
|
||||
@anonymous
|
||||
extension type RustLibWasmModule._(JSObject _) implements JSObject {
|
||||
external void
|
||||
rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
int ptr);
|
||||
external void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(int ptr);
|
||||
|
||||
external void
|
||||
rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(
|
||||
int ptr);
|
||||
external void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLsSignalingConnection(int ptr);
|
||||
|
||||
external void
|
||||
rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
int ptr);
|
||||
external void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(int ptr);
|
||||
|
||||
external void
|
||||
rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(
|
||||
int ptr);
|
||||
external void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileReceiver(int ptr);
|
||||
|
||||
external void
|
||||
rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
int ptr);
|
||||
external void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(int ptr);
|
||||
|
||||
external void
|
||||
rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(
|
||||
int ptr);
|
||||
external void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCFileSender(int ptr);
|
||||
|
||||
external void
|
||||
rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
int ptr);
|
||||
external void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(int ptr);
|
||||
|
||||
external void
|
||||
rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(
|
||||
int ptr);
|
||||
external void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCReceiveController(int ptr);
|
||||
|
||||
external void
|
||||
rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
int ptr);
|
||||
external void rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(int ptr);
|
||||
|
||||
external void
|
||||
rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(
|
||||
int ptr);
|
||||
external void rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRTCSendController(int ptr);
|
||||
}
|
||||
|
||||
@@ -4,10 +4,11 @@ import 'package:image/image.dart';
|
||||
|
||||
/// Converts BMP image data to PNG image data.
|
||||
Future<Uint8List> convertBmpToPng(Uint8List bmp) async {
|
||||
final pngImage = await (Command()
|
||||
..decodeBmp(bmp)
|
||||
..encodePng())
|
||||
.getBytesThread();
|
||||
final pngImage =
|
||||
await (Command()
|
||||
..decodeBmp(bmp)
|
||||
..encodePng())
|
||||
.getBytesThread();
|
||||
|
||||
if (pngImage == null) {
|
||||
throw Exception('Failed to convert BMP to PNG');
|
||||
|
||||
@@ -15,7 +15,8 @@ Future<bool> enableAutoStart({required bool startHidden}) async {
|
||||
final packageInfo = await PackageInfo.fromPlatform();
|
||||
switch (defaultTargetPlatform) {
|
||||
case TargetPlatform.linux:
|
||||
String contents = '''
|
||||
String contents =
|
||||
'''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=${packageInfo.appName}
|
||||
@@ -35,11 +36,13 @@ Terminal=false
|
||||
await setLaunchAtLoginMinimized(startHidden);
|
||||
return true;
|
||||
case TargetPlatform.windows:
|
||||
_getWindowsRegistryKey().createValue(RegistryValue(
|
||||
_windowsRegistryKeyValue,
|
||||
RegistryValueType.string,
|
||||
'"${Platform.resolvedExecutable}"${startHidden ? ' $startHiddenFlag' : ''}',
|
||||
));
|
||||
_getWindowsRegistryKey().createValue(
|
||||
RegistryValue(
|
||||
_windowsRegistryKeyValue,
|
||||
RegistryValueType.string,
|
||||
'"${Platform.resolvedExecutable}"${startHidden ? ' $startHiddenFlag' : ''}',
|
||||
),
|
||||
);
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
||||
@@ -47,25 +47,25 @@ Future<void> _clear(RootIsolateToken token) async {
|
||||
: Future.value(),
|
||||
checkPlatform([TargetPlatform.iOS])
|
||||
? PathProviderFoundation()
|
||||
.getContainerPath(
|
||||
appGroupIdentifier: 'group.org.localsend.localsendApp',
|
||||
)
|
||||
.then((directoryPath) async {
|
||||
if (directoryPath == null) {
|
||||
_logger.warning('Failed to get app group directory');
|
||||
return;
|
||||
}
|
||||
.getContainerPath(
|
||||
appGroupIdentifier: 'group.org.localsend.localsendApp',
|
||||
)
|
||||
.then((directoryPath) async {
|
||||
if (directoryPath == null) {
|
||||
_logger.warning('Failed to get app group directory');
|
||||
return;
|
||||
}
|
||||
|
||||
final directory = Directory(directoryPath);
|
||||
final directory = Directory(directoryPath);
|
||||
|
||||
// delete contents of the directory (only files, not directories)
|
||||
await for (final entry in directory.list(recursive: false, followLinks: false)) {
|
||||
if (entry is File && !entry.path.fileName.startsWith('.')) {
|
||||
_logger.info('Deleting ${entry.path}');
|
||||
entry.deleteSync();
|
||||
}
|
||||
}
|
||||
})
|
||||
// delete contents of the directory (only files, not directories)
|
||||
await for (final entry in directory.list(recursive: false, followLinks: false)) {
|
||||
if (entry is File && !entry.path.fileName.startsWith('.')) {
|
||||
_logger.info('Deleting ${entry.path}');
|
||||
entry.deleteSync();
|
||||
}
|
||||
}
|
||||
})
|
||||
: Future.value(),
|
||||
).wait;
|
||||
|
||||
|
||||
@@ -22,11 +22,9 @@ class PickDirectoryResultMapper extends ClassMapperBase<PickDirectoryResult> {
|
||||
final String id = 'PickDirectoryResult';
|
||||
|
||||
static String _$directoryUri(PickDirectoryResult v) => v.directoryUri;
|
||||
static const Field<PickDirectoryResult, String> _f$directoryUri =
|
||||
Field('directoryUri', _$directoryUri);
|
||||
static const Field<PickDirectoryResult, String> _f$directoryUri = Field('directoryUri', _$directoryUri);
|
||||
static List<FileInfo> _$files(PickDirectoryResult v) => v.files;
|
||||
static const Field<PickDirectoryResult, List<FileInfo>> _f$files =
|
||||
Field('files', _$files);
|
||||
static const Field<PickDirectoryResult, List<FileInfo>> _f$files = Field('files', _$files);
|
||||
|
||||
@override
|
||||
final MappableFields<PickDirectoryResult> fields = const {
|
||||
@@ -35,8 +33,7 @@ class PickDirectoryResultMapper extends ClassMapperBase<PickDirectoryResult> {
|
||||
};
|
||||
|
||||
static PickDirectoryResult _instantiate(DecodingData data) {
|
||||
return PickDirectoryResult(
|
||||
directoryUri: data.dec(_f$directoryUri), files: data.dec(_f$files));
|
||||
return PickDirectoryResult(directoryUri: data.dec(_f$directoryUri), files: data.dec(_f$files));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -53,81 +50,63 @@ class PickDirectoryResultMapper extends ClassMapperBase<PickDirectoryResult> {
|
||||
|
||||
mixin PickDirectoryResultMappable {
|
||||
String serialize() {
|
||||
return PickDirectoryResultMapper.ensureInitialized()
|
||||
.encodeJson<PickDirectoryResult>(this as PickDirectoryResult);
|
||||
return PickDirectoryResultMapper.ensureInitialized().encodeJson<PickDirectoryResult>(this as PickDirectoryResult);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return PickDirectoryResultMapper.ensureInitialized()
|
||||
.encodeMap<PickDirectoryResult>(this as PickDirectoryResult);
|
||||
return PickDirectoryResultMapper.ensureInitialized().encodeMap<PickDirectoryResult>(this as PickDirectoryResult);
|
||||
}
|
||||
|
||||
PickDirectoryResultCopyWith<PickDirectoryResult, PickDirectoryResult,
|
||||
PickDirectoryResult>
|
||||
get copyWith => _PickDirectoryResultCopyWithImpl(
|
||||
this as PickDirectoryResult, $identity, $identity);
|
||||
PickDirectoryResultCopyWith<PickDirectoryResult, PickDirectoryResult, PickDirectoryResult> get copyWith =>
|
||||
_PickDirectoryResultCopyWithImpl(this as PickDirectoryResult, $identity, $identity);
|
||||
@override
|
||||
String toString() {
|
||||
return PickDirectoryResultMapper.ensureInitialized()
|
||||
.stringifyValue(this as PickDirectoryResult);
|
||||
return PickDirectoryResultMapper.ensureInitialized().stringifyValue(this as PickDirectoryResult);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return PickDirectoryResultMapper.ensureInitialized()
|
||||
.equalsValue(this as PickDirectoryResult, other);
|
||||
return PickDirectoryResultMapper.ensureInitialized().equalsValue(this as PickDirectoryResult, other);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return PickDirectoryResultMapper.ensureInitialized()
|
||||
.hashValue(this as PickDirectoryResult);
|
||||
return PickDirectoryResultMapper.ensureInitialized().hashValue(this as PickDirectoryResult);
|
||||
}
|
||||
}
|
||||
|
||||
extension PickDirectoryResultValueCopy<$R, $Out>
|
||||
on ObjectCopyWith<$R, PickDirectoryResult, $Out> {
|
||||
PickDirectoryResultCopyWith<$R, PickDirectoryResult, $Out>
|
||||
get $asPickDirectoryResult =>
|
||||
$base.as((v, t, t2) => _PickDirectoryResultCopyWithImpl(v, t, t2));
|
||||
extension PickDirectoryResultValueCopy<$R, $Out> on ObjectCopyWith<$R, PickDirectoryResult, $Out> {
|
||||
PickDirectoryResultCopyWith<$R, PickDirectoryResult, $Out> get $asPickDirectoryResult =>
|
||||
$base.as((v, t, t2) => _PickDirectoryResultCopyWithImpl(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class PickDirectoryResultCopyWith<$R, $In extends PickDirectoryResult,
|
||||
$Out> implements ClassCopyWith<$R, $In, $Out> {
|
||||
ListCopyWith<$R, FileInfo, FileInfoCopyWith<$R, FileInfo, FileInfo>>
|
||||
get files;
|
||||
abstract class PickDirectoryResultCopyWith<$R, $In extends PickDirectoryResult, $Out> implements ClassCopyWith<$R, $In, $Out> {
|
||||
ListCopyWith<$R, FileInfo, FileInfoCopyWith<$R, FileInfo, FileInfo>> get files;
|
||||
$R call({String? directoryUri, List<FileInfo>? files});
|
||||
PickDirectoryResultCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t);
|
||||
PickDirectoryResultCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
|
||||
}
|
||||
|
||||
class _PickDirectoryResultCopyWithImpl<$R, $Out>
|
||||
extends ClassCopyWithBase<$R, PickDirectoryResult, $Out>
|
||||
class _PickDirectoryResultCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, PickDirectoryResult, $Out>
|
||||
implements PickDirectoryResultCopyWith<$R, PickDirectoryResult, $Out> {
|
||||
_PickDirectoryResultCopyWithImpl(super.value, super.then, super.then2);
|
||||
|
||||
@override
|
||||
late final ClassMapperBase<PickDirectoryResult> $mapper =
|
||||
PickDirectoryResultMapper.ensureInitialized();
|
||||
late final ClassMapperBase<PickDirectoryResult> $mapper = PickDirectoryResultMapper.ensureInitialized();
|
||||
@override
|
||||
ListCopyWith<$R, FileInfo, FileInfoCopyWith<$R, FileInfo, FileInfo>>
|
||||
get files => ListCopyWith(
|
||||
$value.files, (v, t) => v.copyWith.$chain(t), (v) => call(files: v));
|
||||
ListCopyWith<$R, FileInfo, FileInfoCopyWith<$R, FileInfo, FileInfo>> get files =>
|
||||
ListCopyWith($value.files, (v, t) => v.copyWith.$chain(t), (v) => call(files: v));
|
||||
@override
|
||||
$R call({String? directoryUri, List<FileInfo>? files}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (directoryUri != null) #directoryUri: directoryUri,
|
||||
if (files != null) #files: files
|
||||
}));
|
||||
$apply(FieldCopyWithData({if (directoryUri != null) #directoryUri: directoryUri, if (files != null) #files: files}));
|
||||
@override
|
||||
PickDirectoryResult $make(CopyWithData data) => PickDirectoryResult(
|
||||
directoryUri: data.get(#directoryUri, or: $value.directoryUri),
|
||||
files: data.get(#files, or: $value.files));
|
||||
directoryUri: data.get(#directoryUri, or: $value.directoryUri),
|
||||
files: data.get(#files, or: $value.files),
|
||||
);
|
||||
|
||||
@override
|
||||
PickDirectoryResultCopyWith<$R2, PickDirectoryResult, $Out2>
|
||||
$chain<$R2, $Out2>(Then<$Out2, $R2> t) =>
|
||||
_PickDirectoryResultCopyWithImpl($value, $cast, t);
|
||||
PickDirectoryResultCopyWith<$R2, PickDirectoryResult, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) =>
|
||||
_PickDirectoryResultCopyWithImpl($value, $cast, t);
|
||||
}
|
||||
|
||||
class FileInfoMapper extends ClassMapperBase<FileInfo> {
|
||||
@@ -151,8 +130,7 @@ class FileInfoMapper extends ClassMapperBase<FileInfo> {
|
||||
static String _$uri(FileInfo v) => v.uri;
|
||||
static const Field<FileInfo, String> _f$uri = Field('uri', _$uri);
|
||||
static int _$lastModified(FileInfo v) => v.lastModified;
|
||||
static const Field<FileInfo, int> _f$lastModified =
|
||||
Field('lastModified', _$lastModified);
|
||||
static const Field<FileInfo, int> _f$lastModified = Field('lastModified', _$lastModified);
|
||||
|
||||
@override
|
||||
final MappableFields<FileInfo> fields = const {
|
||||
@@ -163,11 +141,7 @@ class FileInfoMapper extends ClassMapperBase<FileInfo> {
|
||||
};
|
||||
|
||||
static FileInfo _instantiate(DecodingData data) {
|
||||
return FileInfo(
|
||||
name: data.dec(_f$name),
|
||||
size: data.dec(_f$size),
|
||||
uri: data.dec(_f$uri),
|
||||
lastModified: data.dec(_f$lastModified));
|
||||
return FileInfo(name: data.dec(_f$name), size: data.dec(_f$size), uri: data.dec(_f$uri), lastModified: data.dec(_f$lastModified));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -184,17 +158,14 @@ class FileInfoMapper extends ClassMapperBase<FileInfo> {
|
||||
|
||||
mixin FileInfoMappable {
|
||||
String serialize() {
|
||||
return FileInfoMapper.ensureInitialized()
|
||||
.encodeJson<FileInfo>(this as FileInfo);
|
||||
return FileInfoMapper.ensureInitialized().encodeJson<FileInfo>(this as FileInfo);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return FileInfoMapper.ensureInitialized()
|
||||
.encodeMap<FileInfo>(this as FileInfo);
|
||||
return FileInfoMapper.ensureInitialized().encodeMap<FileInfo>(this as FileInfo);
|
||||
}
|
||||
|
||||
FileInfoCopyWith<FileInfo, FileInfo, FileInfo> get copyWith =>
|
||||
_FileInfoCopyWithImpl(this as FileInfo, $identity, $identity);
|
||||
FileInfoCopyWith<FileInfo, FileInfo, FileInfo> get copyWith => _FileInfoCopyWithImpl(this as FileInfo, $identity, $identity);
|
||||
@override
|
||||
String toString() {
|
||||
return FileInfoMapper.ensureInitialized().stringifyValue(this as FileInfo);
|
||||
@@ -202,8 +173,7 @@ mixin FileInfoMappable {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return FileInfoMapper.ensureInitialized()
|
||||
.equalsValue(this as FileInfo, other);
|
||||
return FileInfoMapper.ensureInitialized().equalsValue(this as FileInfo, other);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -213,41 +183,36 @@ mixin FileInfoMappable {
|
||||
}
|
||||
|
||||
extension FileInfoValueCopy<$R, $Out> on ObjectCopyWith<$R, FileInfo, $Out> {
|
||||
FileInfoCopyWith<$R, FileInfo, $Out> get $asFileInfo =>
|
||||
$base.as((v, t, t2) => _FileInfoCopyWithImpl(v, t, t2));
|
||||
FileInfoCopyWith<$R, FileInfo, $Out> get $asFileInfo => $base.as((v, t, t2) => _FileInfoCopyWithImpl(v, t, t2));
|
||||
}
|
||||
|
||||
abstract class FileInfoCopyWith<$R, $In extends FileInfo, $Out>
|
||||
implements ClassCopyWith<$R, $In, $Out> {
|
||||
abstract class FileInfoCopyWith<$R, $In extends FileInfo, $Out> implements ClassCopyWith<$R, $In, $Out> {
|
||||
$R call({String? name, int? size, String? uri, int? lastModified});
|
||||
FileInfoCopyWith<$R2, $In, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t);
|
||||
}
|
||||
|
||||
class _FileInfoCopyWithImpl<$R, $Out>
|
||||
extends ClassCopyWithBase<$R, FileInfo, $Out>
|
||||
implements FileInfoCopyWith<$R, FileInfo, $Out> {
|
||||
class _FileInfoCopyWithImpl<$R, $Out> extends ClassCopyWithBase<$R, FileInfo, $Out> implements FileInfoCopyWith<$R, FileInfo, $Out> {
|
||||
_FileInfoCopyWithImpl(super.value, super.then, super.then2);
|
||||
|
||||
@override
|
||||
late final ClassMapperBase<FileInfo> $mapper =
|
||||
FileInfoMapper.ensureInitialized();
|
||||
late final ClassMapperBase<FileInfo> $mapper = FileInfoMapper.ensureInitialized();
|
||||
@override
|
||||
$R call({String? name, int? size, String? uri, int? lastModified}) =>
|
||||
$apply(FieldCopyWithData({
|
||||
if (name != null) #name: name,
|
||||
if (size != null) #size: size,
|
||||
if (uri != null) #uri: uri,
|
||||
if (lastModified != null) #lastModified: lastModified
|
||||
}));
|
||||
$R call({String? name, int? size, String? uri, int? lastModified}) => $apply(
|
||||
FieldCopyWithData({
|
||||
if (name != null) #name: name,
|
||||
if (size != null) #size: size,
|
||||
if (uri != null) #uri: uri,
|
||||
if (lastModified != null) #lastModified: lastModified,
|
||||
}),
|
||||
);
|
||||
@override
|
||||
FileInfo $make(CopyWithData data) => FileInfo(
|
||||
name: data.get(#name, or: $value.name),
|
||||
size: data.get(#size, or: $value.size),
|
||||
uri: data.get(#uri, or: $value.uri),
|
||||
lastModified: data.get(#lastModified, or: $value.lastModified));
|
||||
name: data.get(#name, or: $value.name),
|
||||
size: data.get(#size, or: $value.size),
|
||||
uri: data.get(#uri, or: $value.uri),
|
||||
lastModified: data.get(#lastModified, or: $value.lastModified),
|
||||
);
|
||||
|
||||
@override
|
||||
FileInfoCopyWith<$R2, FileInfo, $Out2> $chain<$R2, $Out2>(
|
||||
Then<$Out2, $R2> t) =>
|
||||
_FileInfoCopyWithImpl($value, $cast, t);
|
||||
FileInfoCopyWith<$R2, FileInfo, $Out2> $chain<$R2, $Out2>(Then<$Out2, $R2> t) => _FileInfoCopyWithImpl($value, $cast, t);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,8 @@ Future<bool> enableContextMenu() async {
|
||||
}
|
||||
|
||||
try {
|
||||
final String script = '''
|
||||
final String script =
|
||||
'''
|
||||
\$TargetPath = "${Platform.resolvedExecutable}"
|
||||
\$ShortcutFile = "${_getWindowsFilePath(_windowsFileName)}"
|
||||
\$WScriptShell = New-Object -ComObject WScript.Shell
|
||||
|
||||
@@ -156,17 +156,25 @@ Future<void> _pickFiles(BuildContext context, Ref ref) async {
|
||||
if (defaultTargetPlatform == TargetPlatform.android) {
|
||||
final result = await android_channel.pickFilesAndroid();
|
||||
if (result != null) {
|
||||
await ref.redux(selectedSendingFilesProvider).dispatchAsync(AddFilesAction(
|
||||
files: result,
|
||||
converter: CrossFileConverters.convertFileInfo,
|
||||
));
|
||||
await ref
|
||||
.redux(selectedSendingFilesProvider)
|
||||
.dispatchAsync(
|
||||
AddFilesAction(
|
||||
files: result,
|
||||
converter: CrossFileConverters.convertFileInfo,
|
||||
),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
final result = await openFiles();
|
||||
await ref.redux(selectedSendingFilesProvider).dispatchAsync(AddFilesAction(
|
||||
files: result,
|
||||
converter: CrossFileConverters.convertXFile,
|
||||
));
|
||||
await ref
|
||||
.redux(selectedSendingFilesProvider)
|
||||
.dispatchAsync(
|
||||
AddFilesAction(
|
||||
files: result,
|
||||
converter: CrossFileConverters.convertXFile,
|
||||
),
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
if (e is PlatformException && e.code == 'CANCELED') {
|
||||
@@ -261,10 +269,14 @@ Future<void> _pickMedia(BuildContext context, Ref ref) async {
|
||||
});
|
||||
|
||||
if (result != null) {
|
||||
await ref.redux(selectedSendingFilesProvider).dispatchAsync(AddFilesAction(
|
||||
files: result,
|
||||
converter: CrossFileConverters.convertAssetEntity,
|
||||
));
|
||||
await ref
|
||||
.redux(selectedSendingFilesProvider)
|
||||
.dispatchAsync(
|
||||
AddFilesAction(
|
||||
files: result,
|
||||
converter: CrossFileConverters.convertAssetEntity,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,17 +314,23 @@ Future<void> _pickClipboard(BuildContext context, Ref ref) async {
|
||||
final now = DateTime.now();
|
||||
final fileName =
|
||||
'clipboard_${now.year}-${now.month.twoDigitString}-${now.day.twoDigitString}_${now.hour.twoDigitString}-${now.minute.twoDigitString}.$imageType';
|
||||
ref.redux(selectedSendingFilesProvider).dispatch(AddBinaryAction(
|
||||
bytes: currImage,
|
||||
fileType: FileType.image,
|
||||
fileName: fileName,
|
||||
));
|
||||
ref
|
||||
.redux(selectedSendingFilesProvider)
|
||||
.dispatch(
|
||||
AddBinaryAction(
|
||||
bytes: currImage,
|
||||
fileType: FileType.image,
|
||||
fileName: fileName,
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
final List<String> files = await Pasteboard.files();
|
||||
if (files.isNotEmpty) {
|
||||
await ref.redux(selectedSendingFilesProvider).dispatchAsync(
|
||||
await ref
|
||||
.redux(selectedSendingFilesProvider)
|
||||
.dispatchAsync(
|
||||
AddFilesAction(
|
||||
files: files.map((e) => XFile(e)).toList(),
|
||||
converter: (file) async {
|
||||
@@ -341,9 +359,11 @@ Future<void> _pickClipboard(BuildContext context, Ref ref) async {
|
||||
return;
|
||||
}
|
||||
|
||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
||||
content: Text(t.general.noItemInClipboard),
|
||||
));
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(t.general.noItemInClipboard),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _pickApp(BuildContext context) async {
|
||||
|
||||
@@ -55,7 +55,8 @@ String extractPublicKeyFromCertificate(String certificate) {
|
||||
String _hexToSpkiPem(String hexBytes) {
|
||||
final publicBytes = hex.decode(hexBytes);
|
||||
final publicBase64 = base64Encode(publicBytes);
|
||||
final temp = '''-----BEGIN PUBLIC KEY-----
|
||||
final temp =
|
||||
'''-----BEGIN PUBLIC KEY-----
|
||||
$publicBase64
|
||||
-----END PUBLIC KEY-----''';
|
||||
return X509Utils.fixPem(temp);
|
||||
|
||||
@@ -17,17 +17,19 @@ class SendIgnore {
|
||||
required String? parentPath,
|
||||
required List<String> ignoreContents,
|
||||
}) {
|
||||
_globs.addAll(ignoreContents.map((line) {
|
||||
if (line.startsWith('/')) {
|
||||
return Glob('$parentPath$line');
|
||||
} else {
|
||||
if (parentPath == null) {
|
||||
return Glob(line);
|
||||
_globs.addAll(
|
||||
ignoreContents.map((line) {
|
||||
if (line.startsWith('/')) {
|
||||
return Glob('$parentPath$line');
|
||||
} else {
|
||||
return Glob('$parentPath/**/$line');
|
||||
if (parentPath == null) {
|
||||
return Glob(line);
|
||||
} else {
|
||||
return Glob('$parentPath/**/$line');
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
bool isIgnored(String relativePath) {
|
||||
|
||||
@@ -13,10 +13,11 @@ class SimpleServer {
|
||||
required SimpleServerRouteBuilder routes,
|
||||
}) : _server = server {
|
||||
_server.listen((request) async {
|
||||
final handler = routes._routes[Route(
|
||||
HttpMethod.values.firstWhere((e) => e.methodName == request.method),
|
||||
request.uri.path,
|
||||
)];
|
||||
final handler =
|
||||
routes._routes[Route(
|
||||
HttpMethod.values.firstWhere((e) => e.methodName == request.method),
|
||||
request.uri.path,
|
||||
)];
|
||||
|
||||
if (handler != null) {
|
||||
handler.call(request);
|
||||
@@ -38,8 +39,7 @@ typedef HttpRequestHandler = void Function(HttpRequest request);
|
||||
|
||||
enum HttpMethod {
|
||||
get('GET'),
|
||||
post('POST'),
|
||||
;
|
||||
post('POST');
|
||||
|
||||
const HttpMethod(this.methodName);
|
||||
|
||||
@@ -68,9 +68,10 @@ class SimpleServerRouteBuilder {
|
||||
|
||||
void addRoute(HttpMethod method, String path, HttpRequestHandler handler) {
|
||||
_routes[Route(
|
||||
method,
|
||||
path,
|
||||
)] = handler;
|
||||
method,
|
||||
path,
|
||||
)] =
|
||||
handler;
|
||||
}
|
||||
|
||||
void get(String path, HttpRequestHandler handler) {
|
||||
|
||||
@@ -35,35 +35,41 @@ PreferredSizeWidget basicLocalSendAppbar(String title) {
|
||||
? PreferredSize(
|
||||
preferredSize: const Size.fromHeight(kToolbarHeight),
|
||||
child: ClipRRect(
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(
|
||||
sigmaX: 20.0,
|
||||
sigmaY: 20.0,
|
||||
),
|
||||
child: MoveWindow(
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
// Padding space for macOS traffic lights
|
||||
if (!kIsWeb && Platform.isMacOS) const SizedBox(width: 60),
|
||||
// Originally leading Icon
|
||||
CustomBackButton(),
|
||||
// Center Title
|
||||
Expanded(
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(
|
||||
sigmaX: 20.0,
|
||||
sigmaY: 20.0,
|
||||
),
|
||||
child: MoveWindow(
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
// Padding space for macOS traffic lights
|
||||
if (!kIsWeb && Platform.isMacOS) const SizedBox(width: 60),
|
||||
// Originally leading Icon
|
||||
CustomBackButton(),
|
||||
// Center Title
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Center(
|
||||
child: FittedBox(fit: BoxFit.scaleDown, child: Text(title, style: TextStyle(fontSize: 100, fontWeight: FontWeight.normal))),
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Center(
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(title, style: TextStyle(fontSize: 100, fontWeight: FontWeight.normal)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
// For true centering of the icon since it shifted
|
||||
const SizedBox(width: 60),
|
||||
],
|
||||
// For true centering of the icon since it shifted
|
||||
const SizedBox(width: 60),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)))
|
||||
),
|
||||
)
|
||||
: AppBar(title: Text(title));
|
||||
}
|
||||
|
||||
@@ -36,16 +36,18 @@ class AddFileDialog extends StatelessWidget {
|
||||
context.pop();
|
||||
},
|
||||
child: Text(t.general.close),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
} else {
|
||||
await context.pushBottomSheet(() => CustomBottomSheet(
|
||||
title: t.dialogs.addFile.title,
|
||||
description: t.dialogs.addFile.content,
|
||||
child: AddFileDialog(options: options),
|
||||
));
|
||||
await context.pushBottomSheet(
|
||||
() => CustomBottomSheet(
|
||||
title: t.dialogs.addFile.title,
|
||||
description: t.dialogs.addFile.content,
|
||||
child: AddFileDialog(options: options),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,11 +67,15 @@ class _AddressInputDialogState extends State<AddressInputDialog> with Refena {
|
||||
for (final ip in candidates)
|
||||
() async {
|
||||
try {
|
||||
final device = await ref.redux(parentIsolateProvider).dispatchAsyncTakeResult(IsolateTargetHttpDiscoveryAction(
|
||||
ip: ip,
|
||||
port: port,
|
||||
https: https,
|
||||
));
|
||||
final device = await ref
|
||||
.redux(parentIsolateProvider)
|
||||
.dispatchAsyncTakeResult(
|
||||
IsolateTargetHttpDiscoveryAction(
|
||||
ip: ip,
|
||||
port: port,
|
||||
https: https,
|
||||
),
|
||||
);
|
||||
foundDevice = device;
|
||||
deviceCompleter.complete();
|
||||
return device;
|
||||
@@ -186,16 +190,18 @@ class _AddressInputDialogState extends State<AddressInputDialog> with Refena {
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(text: t.dialogs.addressInput.recentlyUsed),
|
||||
...lastDevices.mapIndexed((index, device) {
|
||||
return [
|
||||
if (index != 0) const TextSpan(text: ', '),
|
||||
TextSpan(
|
||||
text: device.ip,
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.primary),
|
||||
recognizer: TapGestureRecognizer()..onTap = () async => _submit(localIps, settings.port, device.ip),
|
||||
)
|
||||
];
|
||||
}).expand((e) => e),
|
||||
...lastDevices
|
||||
.mapIndexed((index, device) {
|
||||
return [
|
||||
if (index != 0) const TextSpan(text: ', '),
|
||||
TextSpan(
|
||||
text: device.ip,
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.primary),
|
||||
recognizer: TapGestureRecognizer()..onTap = () async => _submit(localIps, settings.port, device.ip),
|
||||
),
|
||||
];
|
||||
})
|
||||
.expand((e) => e),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -28,7 +28,7 @@ class CannotOpenFileDialog extends StatelessWidget {
|
||||
TextButton(
|
||||
onPressed: () => context.pop(),
|
||||
child: Text(t.general.close),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -18,7 +18,7 @@ class EncryptionDisabledNotice extends StatelessWidget {
|
||||
TextButton(
|
||||
onPressed: () => context.pop(),
|
||||
child: Text(t.general.close),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -16,7 +16,7 @@ class ErrorDialog extends StatelessWidget {
|
||||
TextButton(
|
||||
onPressed: () => context.pop(),
|
||||
child: Text(t.general.close),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -31,11 +31,15 @@ class _FavoritesDialogState extends State<FavoritesDialog> with Refena {
|
||||
final https = ref.read(settingsProvider).https;
|
||||
|
||||
try {
|
||||
final result = await ref.redux(parentIsolateProvider).dispatchAsyncTakeResult(IsolateTargetHttpDiscoveryAction(
|
||||
ip: favorite.ip,
|
||||
port: favorite.port,
|
||||
https: https,
|
||||
));
|
||||
final result = await ref
|
||||
.redux(parentIsolateProvider)
|
||||
.dispatchAsyncTakeResult(
|
||||
IsolateTargetHttpDiscoveryAction(
|
||||
ip: favorite.ip,
|
||||
port: favorite.port,
|
||||
https: https,
|
||||
),
|
||||
);
|
||||
|
||||
if (mounted) {
|
||||
context.pop(result);
|
||||
@@ -49,7 +53,10 @@ class _FavoritesDialogState extends State<FavoritesDialog> with Refena {
|
||||
}
|
||||
|
||||
Future<void> _showDeviceDialog([FavoriteDevice? favorite]) async {
|
||||
await showDialog(context: context, builder: (_) => FavoriteEditDialog(favorite: favorite));
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (_) => FavoriteEditDialog(favorite: favorite),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -163,12 +163,18 @@ class _FavoriteEditDialogState extends State<FavoriteEditDialog> with Refena {
|
||||
return;
|
||||
}
|
||||
|
||||
await ref.redux(favoritesProvider).dispatchAsync(UpdateFavoriteAction(existingFavorite.copyWith(
|
||||
ip: _ipController.text,
|
||||
port: int.parse(_portController.text),
|
||||
alias: trimmedNewAlias,
|
||||
customAlias: existingFavorite.customAlias || trimmedNewAlias != existingFavorite.alias,
|
||||
)));
|
||||
await ref
|
||||
.redux(favoritesProvider)
|
||||
.dispatchAsync(
|
||||
UpdateFavoriteAction(
|
||||
existingFavorite.copyWith(
|
||||
ip: _ipController.text,
|
||||
port: int.parse(_portController.text),
|
||||
alias: trimmedNewAlias,
|
||||
customAlias: existingFavorite.customAlias || trimmedNewAlias != existingFavorite.alias,
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
// Add new favorite
|
||||
final ip = _ipController.text;
|
||||
@@ -179,20 +185,30 @@ class _FavoriteEditDialogState extends State<FavoriteEditDialog> with Refena {
|
||||
});
|
||||
|
||||
try {
|
||||
final result = await ref.redux(parentIsolateProvider).dispatchAsyncTakeResult(IsolateTargetHttpDiscoveryAction(
|
||||
ip: ip,
|
||||
port: port,
|
||||
https: https,
|
||||
));
|
||||
final result = await ref
|
||||
.redux(parentIsolateProvider)
|
||||
.dispatchAsyncTakeResult(
|
||||
IsolateTargetHttpDiscoveryAction(
|
||||
ip: ip,
|
||||
port: port,
|
||||
https: https,
|
||||
),
|
||||
);
|
||||
|
||||
final name = _aliasController.text.trim();
|
||||
|
||||
await ref.redux(favoritesProvider).dispatchAsync(AddFavoriteAction(FavoriteDevice.fromValues(
|
||||
fingerprint: result.fingerprint,
|
||||
ip: _ipController.text,
|
||||
port: int.parse(_portController.text),
|
||||
alias: name.isEmpty ? result.alias : name,
|
||||
)));
|
||||
await ref
|
||||
.redux(favoritesProvider)
|
||||
.dispatchAsync(
|
||||
AddFavoriteAction(
|
||||
FavoriteDevice.fromValues(
|
||||
fingerprint: result.fingerprint,
|
||||
ip: _ipController.text,
|
||||
port: int.parse(_portController.text),
|
||||
alias: name.isEmpty ? result.alias : name,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
if (context.mounted) {
|
||||
context.pop();
|
||||
|
||||
@@ -88,13 +88,14 @@ class _FileNameInputDialogState extends State<FileNameInputDialog> {
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Visibility(
|
||||
visible: _errorMessage.isNotEmpty,
|
||||
child: Text(
|
||||
_errorMessage,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.warning,
|
||||
),
|
||||
)),
|
||||
visible: _errorMessage.isNotEmpty,
|
||||
child: Text(
|
||||
_errorMessage,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.warning,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
|
||||
@@ -14,7 +14,7 @@ class NoPermissionDialog extends StatelessWidget {
|
||||
TextButton(
|
||||
onPressed: () => context.pop(),
|
||||
child: Text(t.general.close),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class NotAvailableOnPlatformDialog extends StatelessWidget {
|
||||
TextButton(
|
||||
onPressed: () => context.pop(),
|
||||
child: Text(t.general.close),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ class QrDialog extends StatelessWidget {
|
||||
TextButton(
|
||||
onPressed: () => context.pop(),
|
||||
child: Text(t.general.close),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -106,11 +106,12 @@ class _QuickActionsDialogState extends State<QuickActionsDialog> with Refena {
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Visibility(
|
||||
visible: !_isValid,
|
||||
child: Text(
|
||||
t.sanitization.invalid,
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.warning),
|
||||
)),
|
||||
visible: !_isValid,
|
||||
child: Text(
|
||||
t.sanitization.invalid,
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.warning),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
LabeledCheckbox(
|
||||
label: t.dialogs.quickActions.padZero,
|
||||
@@ -153,7 +154,9 @@ class _QuickActionsDialogState extends State<QuickActionsDialog> with Refena {
|
||||
if (!_isValid) {
|
||||
return;
|
||||
}
|
||||
ref.notifier(selectedReceivingFilesProvider).applyCounter(
|
||||
ref
|
||||
.notifier(selectedReceivingFilesProvider)
|
||||
.applyCounter(
|
||||
prefix: _prefix,
|
||||
padZero: _padZero,
|
||||
sortFirst: _sortBeforehand,
|
||||
|
||||
@@ -18,7 +18,7 @@ class QuickSaveFromFavoritesNotice extends StatelessWidget {
|
||||
TextButton(
|
||||
onPressed: () => context.pop(),
|
||||
child: Text(t.general.close),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -18,7 +18,7 @@ class QuickSaveNotice extends StatelessWidget {
|
||||
TextButton(
|
||||
onPressed: () => context.pop(),
|
||||
child: Text(t.general.close),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -33,7 +33,7 @@ class SendModeHelpDialog extends StatelessWidget {
|
||||
TextButton(
|
||||
onPressed: () => context.pop(),
|
||||
child: Text(t.general.close),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ class _TextFieldTvState extends State<TextFieldTv> with Refena {
|
||||
),
|
||||
onPressed: () => context.pop(),
|
||||
child: Text(t.general.confirm),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
||||
@@ -39,7 +39,11 @@ class ZoomDialog extends StatelessWidget {
|
||||
child: FittedBox(
|
||||
fit: BoxFit.fill,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: Text(label, textAlign: TextAlign.center, style: TextStyle(fontSize: fontSize)),
|
||||
child: Text(
|
||||
label,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: fontSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
@@ -76,7 +80,7 @@ class ZoomDialog extends StatelessWidget {
|
||||
TextButton(
|
||||
onPressed: () => context.pop(),
|
||||
child: Text(t.general.close),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,10 +5,7 @@ class SizingInformation {
|
||||
final bool isTabletOrDesktop;
|
||||
final bool isDesktop;
|
||||
|
||||
const SizingInformation(double width)
|
||||
: isMobile = width < 700,
|
||||
isTabletOrDesktop = width >= 700,
|
||||
isDesktop = width >= 800;
|
||||
const SizingInformation(double width) : isMobile = width < 700, isTabletOrDesktop = width >= 700, isDesktop = width >= 800;
|
||||
}
|
||||
|
||||
class ResponsiveBuilder extends StatelessWidget {
|
||||
|
||||
@@ -19,8 +19,8 @@ class ResponsiveListView extends StatelessWidget {
|
||||
EdgeInsets? tabletPadding,
|
||||
required Widget this.child,
|
||||
super.key,
|
||||
}) : desktopPadding = tabletPadding ?? const EdgeInsets.symmetric(horizontal: 10, vertical: 30),
|
||||
children = null;
|
||||
}) : desktopPadding = tabletPadding ?? const EdgeInsets.symmetric(horizontal: 10, vertical: 30),
|
||||
children = null;
|
||||
|
||||
const ResponsiveListView({
|
||||
this.maxWidth = defaultMaxWidth,
|
||||
@@ -29,8 +29,8 @@ class ResponsiveListView extends StatelessWidget {
|
||||
EdgeInsets? tabletPadding,
|
||||
required List<Widget> this.children,
|
||||
super.key,
|
||||
}) : desktopPadding = tabletPadding ?? const EdgeInsets.symmetric(horizontal: 10, vertical: 30),
|
||||
child = null;
|
||||
}) : desktopPadding = tabletPadding ?? const EdgeInsets.symmetric(horizontal: 10, vertical: 30),
|
||||
child = null;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -29,7 +29,7 @@ class ShortcutWatcher extends StatelessWidget {
|
||||
if (checkPlatform([TargetPlatform.macOS])) LogicalKeySet(LogicalKeyboardKey.meta, LogicalKeyboardKey.keyW): _CloseWindowIntent(),
|
||||
// Add Control+, to open settings for macOS
|
||||
if (checkPlatform([TargetPlatform.macOS])) LogicalKeySet(LogicalKeyboardKey.meta, LogicalKeyboardKey.comma): _OpenSettingsIntent(),
|
||||
|
||||
|
||||
LogicalKeySet(LogicalKeyboardKey.escape): _PopPageIntent(),
|
||||
|
||||
// Control+V and Command+V
|
||||
@@ -40,13 +40,15 @@ class ShortcutWatcher extends StatelessWidget {
|
||||
actions: {
|
||||
_ExitAppIntent: CallbackAction(onInvoke: (_) => exit(0)),
|
||||
_PopPageIntent: CallbackAction(onInvoke: (_) async => Navigator.of(Routerino.context).maybePop()),
|
||||
_PasteIntent: CallbackAction(onInvoke: (_) async {
|
||||
await context.global.dispatchAsync(PickFileAction(option: FilePickerOption.clipboard, context: context));
|
||||
if (context.mounted) {
|
||||
context.redux(homePageControllerProvider).dispatch(ChangeTabAction(HomeTab.send));
|
||||
}
|
||||
return null;
|
||||
}),
|
||||
_PasteIntent: CallbackAction(
|
||||
onInvoke: (_) async {
|
||||
await context.global.dispatchAsync(PickFileAction(option: FilePickerOption.clipboard, context: context));
|
||||
if (context.mounted) {
|
||||
context.redux(homePageControllerProvider).dispatch(ChangeTabAction(HomeTab.send));
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
_CloseWindowIntent: CallbackAction<_CloseWindowIntent>(
|
||||
onInvoke: (_) async {
|
||||
if (_isFakeMetaKey()) {
|
||||
@@ -57,10 +59,12 @@ class ShortcutWatcher extends StatelessWidget {
|
||||
return null;
|
||||
},
|
||||
),
|
||||
_OpenSettingsIntent: CallbackAction(onInvoke: (_) async {
|
||||
context.redux(homePageControllerProvider).dispatch(ChangeTabAction(HomeTab.settings));
|
||||
return null;
|
||||
}),
|
||||
_OpenSettingsIntent: CallbackAction(
|
||||
onInvoke: (_) async {
|
||||
context.redux(homePageControllerProvider).dispatch(ChangeTabAction(HomeTab.settings));
|
||||
return null;
|
||||
},
|
||||
),
|
||||
},
|
||||
child: child,
|
||||
),
|
||||
|
||||
+784
-653
File diff suppressed because it is too large
Load Diff
@@ -26,8 +26,8 @@ void main() {
|
||||
'size': 1234,
|
||||
'fileType': 'image',
|
||||
'preview': '*preview data*',
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
final parsed = PrepareUploadRequestDto.fromJson(dto);
|
||||
expect(parsed.info.deviceType, DeviceType.mobile);
|
||||
@@ -60,8 +60,8 @@ void main() {
|
||||
'size': 1234,
|
||||
'fileType': 'image',
|
||||
'preview': '*preview data*',
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
final parsed = PrepareUploadRequestDto.fromJson(dto);
|
||||
expect(parsed.info.deviceType, DeviceType.desktop);
|
||||
@@ -83,8 +83,8 @@ void main() {
|
||||
'size': 1234,
|
||||
'fileType': 'superBigImage',
|
||||
'preview': '*preview data*',
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
final parsed = PrepareUploadRequestDto.fromJson(dto);
|
||||
expect(parsed.info.deviceType, DeviceType.mobile);
|
||||
@@ -106,8 +106,8 @@ void main() {
|
||||
'size': 1234,
|
||||
'fileType': 'image/jpeg',
|
||||
'preview': '*preview data*',
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
final parsed = PrepareUploadRequestDto.fromJson(dto);
|
||||
expect(parsed.info.deviceType, DeviceType.mobile);
|
||||
@@ -128,8 +128,8 @@ void main() {
|
||||
'fileName': 'myApk.apk',
|
||||
'size': 1234,
|
||||
'fileType': 'application/vnd.android.package-archive',
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
final parsed = PrepareUploadRequestDto.fromJson(dto);
|
||||
expect(parsed.info.deviceType, DeviceType.mobile);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user