app/lib/common/rust/api/asar_api.dart

42 lines
1.3 KiB
Dart
Raw Normal View History

2024-05-01 13:48:37 +08:00
// This file is automatically generated, so please do not edit it.
2024-06-04 20:29:31 +08:00
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.37.
2024-05-01 13:48:37 +08:00
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
import '../frb_generated.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
Future<RsiLauncherAsarData> getRsiLauncherAsarData(
2024-06-04 20:29:31 +08:00
{required String asarPath}) =>
2024-05-22 20:05:50 +08:00
RustLib.instance.api
2024-06-04 20:29:31 +08:00
.crateApiAsarApiGetRsiLauncherAsarData(asarPath: asarPath);
2024-05-01 13:48:37 +08:00
class RsiLauncherAsarData {
final String asarPath;
final String mainJsPath;
final Uint8List mainJsContent;
const RsiLauncherAsarData({
required this.asarPath,
required this.mainJsPath,
required this.mainJsContent,
});
2024-06-04 20:29:31 +08:00
Future<void> writeMainJs({required List<int> content}) =>
2024-05-22 20:05:50 +08:00
RustLib.instance.api.crateApiAsarApiRsiLauncherAsarDataWriteMainJs(
2024-06-04 20:29:31 +08:00
that: this, content: content);
2024-05-01 13:48:37 +08:00
@override
int get hashCode =>
asarPath.hashCode ^ mainJsPath.hashCode ^ mainJsContent.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is RsiLauncherAsarData &&
runtimeType == other.runtimeType &&
asarPath == other.asarPath &&
mainJsPath == other.mainJsPath &&
mainJsContent == other.mainJsContent;
}