refactor(ceasar-core): changed from using openssl to rustls

This commit is contained in:
Patryk Hegenberg 2024-05-24 16:47:44 +02:00
parent 1b83c0b5ff
commit 1586818bd6
11 changed files with 298 additions and 262 deletions

254
Cargo.lock generated
View file

@ -488,7 +488,6 @@ dependencies = [
"hex",
"hmac",
"local-ip-address",
"openssl-sys",
"p256",
"prost",
"prost-build",
@ -719,16 +718,6 @@ version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
[[package]]
name = "core-foundation"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
dependencies = [
"core-foundation-sys",
"libc",
]
[[package]]
name = "core-foundation-sys"
version = "0.8.6"
@ -987,15 +976,6 @@ dependencies = [
"zeroize",
]
[[package]]
name = "encoding_rs"
version = "0.8.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59"
dependencies = [
"cfg-if",
]
[[package]]
name = "env_logger"
version = "0.10.2"
@ -1099,21 +1079,6 @@ version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "foreign-types"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
dependencies = [
"foreign-types-shared",
]
[[package]]
name = "foreign-types-shared"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
[[package]]
name = "form_urlencoded"
version = "1.2.1"
@ -1298,25 +1263,6 @@ dependencies = [
"tracing",
]
[[package]]
name = "h2"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069"
dependencies = [
"bytes",
"fnv",
"futures-core",
"futures-sink",
"futures-util",
"http 1.1.0",
"indexmap 2.2.6",
"slab",
"tokio",
"tokio-util",
"tracing",
]
[[package]]
name = "hashbrown"
version = "0.12.3"
@ -1488,7 +1434,7 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-util",
"h2 0.3.26",
"h2",
"http 0.2.12",
"http-body 0.4.6",
"httparse",
@ -1511,7 +1457,6 @@ dependencies = [
"bytes",
"futures-channel",
"futures-util",
"h2 0.4.4",
"http 1.1.0",
"http-body 1.0.0",
"httparse",
@ -1523,6 +1468,23 @@ dependencies = [
"want",
]
[[package]]
name = "hyper-rustls"
version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c"
dependencies = [
"futures-util",
"http 1.1.0",
"hyper 1.3.1",
"hyper-util",
"rustls",
"rustls-pki-types",
"tokio",
"tokio-rustls",
"tower-service",
]
[[package]]
name = "hyper-timeout"
version = "0.4.1"
@ -1535,22 +1497,6 @@ dependencies = [
"tokio-io-timeout",
]
[[package]]
name = "hyper-tls"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
dependencies = [
"bytes",
"http-body-util",
"hyper 1.3.1",
"hyper-util",
"native-tls",
"tokio",
"tokio-native-tls",
"tower-service",
]
[[package]]
name = "hyper-util"
version = "0.1.3"
@ -1798,24 +1744,6 @@ dependencies = [
"getrandom",
]
[[package]]
name = "native-tls"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"
dependencies = [
"lazy_static",
"libc",
"log",
"openssl",
"openssl-probe",
"openssl-sys",
"schannel",
"security-framework",
"security-framework-sys",
"tempfile",
]
[[package]]
name = "neli"
version = "0.6.4"
@ -1897,60 +1825,6 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
[[package]]
name = "openssl"
version = "0.10.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f"
dependencies = [
"bitflags 2.5.0",
"cfg-if",
"foreign-types",
"libc",
"once_cell",
"openssl-macros",
"openssl-sys",
]
[[package]]
name = "openssl-macros"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.63",
]
[[package]]
name = "openssl-probe"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "openssl-src"
version = "300.2.3+3.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843"
dependencies = [
"cc",
]
[[package]]
name = "openssl-sys"
version = "0.9.102"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2"
dependencies = [
"cc",
"libc",
"openssl-src",
"pkg-config",
"vcpkg",
]
[[package]]
name = "opentelemetry"
version = "0.21.0"
@ -2139,12 +2013,6 @@ dependencies = [
"spki",
]
[[package]]
name = "pkg-config"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"
[[package]]
name = "polyval"
version = "0.6.2"
@ -2398,38 +2266,37 @@ checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10"
dependencies = [
"base64 0.22.1",
"bytes",
"encoding_rs",
"futures-channel",
"futures-core",
"futures-util",
"h2 0.4.4",
"http 1.1.0",
"http-body 1.0.0",
"http-body-util",
"hyper 1.3.1",
"hyper-tls",
"hyper-rustls",
"hyper-util",
"ipnet",
"js-sys",
"log",
"mime",
"native-tls",
"once_cell",
"percent-encoding",
"pin-project-lite",
"rustls",
"rustls-pemfile",
"rustls-pki-types",
"serde",
"serde_json",
"serde_urlencoded",
"sync_wrapper 0.1.2",
"system-configuration",
"tokio",
"tokio-native-tls",
"tokio-rustls",
"tower-service",
"url",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"webpki-roots",
"winreg",
]
@ -2520,9 +2387,9 @@ checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d"
[[package]]
name = "rustls-webpki"
version = "0.102.3"
version = "0.102.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf"
checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e"
dependencies = [
"ring",
"rustls-pki-types",
@ -2551,15 +2418,6 @@ dependencies = [
"regex",
]
[[package]]
name = "schannel"
version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534"
dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "scopeguard"
version = "1.2.0"
@ -2580,29 +2438,6 @@ dependencies = [
"zeroize",
]
[[package]]
name = "security-framework"
version = "2.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0"
dependencies = [
"bitflags 2.5.0",
"core-foundation",
"core-foundation-sys",
"libc",
"security-framework-sys",
]
[[package]]
name = "security-framework-sys"
version = "2.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7"
dependencies = [
"core-foundation-sys",
"libc",
]
[[package]]
name = "semver"
version = "1.0.23"
@ -2992,27 +2827,6 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394"
[[package]]
name = "system-configuration"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
dependencies = [
"bitflags 1.3.2",
"core-foundation",
"system-configuration-sys",
]
[[package]]
name = "system-configuration-sys"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"
dependencies = [
"core-foundation-sys",
"libc",
]
[[package]]
name = "tempfile"
version = "3.10.1"
@ -3143,16 +2957,6 @@ dependencies = [
"syn 2.0.63",
]
[[package]]
name = "tokio-native-tls"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
dependencies = [
"native-tls",
"tokio",
]
[[package]]
name = "tokio-rustls"
version = "0.25.0"
@ -3249,7 +3053,7 @@ dependencies = [
"axum 0.6.20",
"base64 0.21.7",
"bytes",
"h2 0.3.26",
"h2",
"http 0.2.12",
"http-body 0.4.6",
"hyper 0.14.28",
@ -3546,12 +3350,6 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
[[package]]
name = "vcpkg"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
name = "vec_map"
version = "0.8.2"

View file

@ -5,8 +5,8 @@ edition = "2021"
build = "src/build.rs"
authors = ["Manuel Keidel", "Patryk Hegenberg", "Krzysztof Stankiewicz"]
# [lib]
# crate-type = ["lib", "cdylib", "staticlib"]
[lib]
crate-type = ["lib", "cdylib", "staticlib"]
[dependencies]
futures-util = "0.3"
@ -41,11 +41,23 @@ local-ip-address = "0.6.1"
axum-extra = { version = "0.9.3", features = ["typed-header"] }
headers = "0.4"
tower = { version = "0.4", features = ["util"] }
reqwest = { version = "0.12.4", features = ["blocking", "json"] }
reqwest = { version = "0.12.4", default-features = false, features = [
"blocking",
"json",
"rustls-tls",
] }
hex = "0.4.3"
openssl-sys = { version = "0.9.102", features = ["vendored"] }
# rinf = "6.8.0"
anyhow = "1.0.83"
# [target.armv7-linux-androideabi.dependencies]
# openssl = { version = "*", features = ["vendored"] }
# openssl-sys = { version = "0.9.102", features = ["vendored"] }
# [target.aarch64-linux-android.dependencies]
# openssl = { version = "*", features = ["vendored"] }
# openssl-sys = { version = "0.9.102", features = ["vendored"] }
# [target.x86_64-linux-android.dependencies]
# openssl = { version = "*", features = ["vendored"] }
# openssl-sys = { version = "0.9.102", features = ["vendored"] }
[build-dependencies]
prost-build = "0.12.4"

View file

@ -23,7 +23,7 @@ const DESTINATION: u8 = 0;
const NONCE_SIZE: usize = 12;
#[cfg(target_os = "android")]
const FILE_PATH_PREFIX: &str = "/storage/emulated/0/Download";
const FILE_PATH_PREFIX: &str = "/storage/emulated/0/Documents";
struct File {
name: String,
@ -74,10 +74,17 @@ fn on_list(context: &mut Context, list: ListPacket) -> Status {
return Status::Err("Invalid list packet: no shared key established".into());
}
#[cfg(target_os = "android")]
let mut prefix = std::path::PathBuf::from(std::env::current_exe().unwrap());
// #[cfg(target_os = "android")]
// prefix.pop();
// #[cfg(target_os = "android")]
// println!("prefix: {:?}", prefix);
for entry in list.entries {
let path = sanitize_filename::sanitize(entry.name.clone());
#[cfg(target_os = "android")]
let file_path = format!("{}/{}", FILE_PATH_PREFIX, path);
// let file_path = format!("{}/{}", prefix.display(), path);
#[cfg(target_os = "android")]
if Path::new(&file_path).exists() {

View file

@ -51,7 +51,8 @@ class _ReceiveScreenState extends State<ReceiveScreen> {
}
void _sendTransferNameToRust(String appOrigin) {
final transferName = myController.text.trim();
final String transferName =
(greetingText.isEmpty) ? myController.text.trim() : greetingText;
if (transferName.isNotEmpty) {
TransferName(relay: appOrigin, transferName: transferName)
.sendSignalToRust();

View file

@ -1,10 +1,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<application
android:label="flutter_test_gui"
android:label="caesar-transfer"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/ic_launcher"
android:requestLegacyExternalStorage="true">
<activity
android:name=".MainActivity"
android:exported="true"

View file

@ -3,6 +3,7 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_test_gui/main.dart';
import 'package:mobile_scanner/mobile_scanner.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_test_gui/src/rust/api/simple.dart';
import 'package:flutter_test_gui/src/rust/frb_generated.dart';
@ -20,7 +21,7 @@ class ReceiveScreen extends StatefulWidget {
class _ReceiveScreenState extends State<ReceiveScreen> {
String appOrigin = '';
final myController = TextEditingController();
String greetingText = '';
String inputValue = '';
bool _showScanner = false;
Widget _buildQRScanner() {
@ -34,7 +35,7 @@ class _ReceiveScreenState extends State<ReceiveScreen> {
} else {
final String code = barcode.raw.toString();
setState(() {
greetingText = code;
inputValue = code;
_showScanner = false;
});
}
@ -52,13 +53,48 @@ class _ReceiveScreenState extends State<ReceiveScreen> {
'wss://caesar-transfer-iu.shuttleapp.rs'; // Laden Sie die app_origin
}
Future<bool> _requestPermission(Permission permission) async {
print("In _requestPermission");
if (await permission.isGranted) {
print("Granted");
return true;
} else {
print("Else Zweig");
final result = await permission.request();
if (result == PermissionStatus.granted) {
return true;
} else {
return false;
}
}
}
Future<void> _startTransfer(String appOrigin) async {
final transferName = myController.text.trim();
if (transferName.isNotEmpty) {
final input = inputValue.trim();
if (input.isNotEmpty) {
if (Platform.isAndroid) {
if (await _requestPermission(Permission.manageExternalStorage)) {
try {
final outcome = await startRustReceiver(
transfername: transferName, relay: appOrigin);
print('Receiver erfolgreich gestartet ');
final outcome =
await startRustReceiver(transfername: input, relay: appOrigin);
print('Ergebnis von Rust: $outcome');
} catch (e) {
print('Fehler beim Starten des Receivers: $e');
}
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MyHomePage(title: 'Caesar Transfer')));
} else {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MyHomePage(title: 'Caesar Transfer')));
}
} else {
try {
final outcome =
await startRustReceiver(transfername: input, relay: appOrigin);
print('Ergebnis von Rust: $outcome');
} catch (e) {
print('Fehler beim Starten des Receivers: $e');
@ -68,15 +104,21 @@ class _ReceiveScreenState extends State<ReceiveScreen> {
MaterialPageRoute(
builder: (context) => MyHomePage(title: 'Caesar Transfer')));
}
}
print("Transfer startet with app_origin: $appOrigin");
}
// Future<void> _startTransfer(String appOrigin) async {
// final transferName = myController.text.trim();
// if (transferName.isNotEmpty) {
// final outcome =
// startRustReceiver(transfername: transferName, relay: appOrigin);
// Future<bool> requestPermission(Permission permission) async {
// if (await permission.isGranted) {
// return true;
// } else {
// var result = await permission.request();
// if (result == PermissionStatus.granted) {
// return true;
// } else {
// return false;
// }
// }
// print("Transfer startet with app_origin: $appOrigin");
// }
@override
@ -133,6 +175,11 @@ class _ReceiveScreenState extends State<ReceiveScreen> {
style: const TextStyle(
color: Constants.highlightColor,
),
onChanged: (value) {
setState(() {
inputValue = value;
});
},
decoration: const InputDecoration(
labelText: 'Enter Transfername',
alignLabelWithHint: true,
@ -162,10 +209,6 @@ class _ReceiveScreenState extends State<ReceiveScreen> {
},
child: const Text('Receive'),
),
Text(
greetingText,
style: const TextStyle(color: Constants.textColor),
),
],
)),
);

View file

@ -0,0 +1,117 @@
import 'package:flutter/material.dart';
import 'package:flutter_test_gui/main.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:cross_file/cross_file.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_test_gui/src/rust/api/simple.dart';
import 'package:flutter_test_gui/src/rust/frb_generated.dart';
import 'package:flutter_test_gui/consts/consts.dart';
import 'package:permission_handler/permission_handler.dart';
// const backColor = Color(0xFF32363E);
// const highlightColor = Color(0xFF98C379);
// const textColor = Color(0xFFABB2BF);
class TransferScreen extends StatefulWidget {
final List<XFile> files;
final String transferName;
const TransferScreen(
{Key? key, required this.transferName, required this.files})
: super(key: key);
@override
_TransferScreenState createState() => _TransferScreenState();
}
class _TransferScreenState extends State<TransferScreen> {
String appOrigin = '';
String inputValue = '';
@override
void initState() {
super.initState();
loadSettings().then((_) => callStartReceiver(appOrigin));
}
Future<void> loadSettings() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
appOrigin = prefs.getString('app_origin') ??
'wss://caesar-transfer-iu.shuttleapp.rs'; // Laden Sie die app_origin
}
Future<void> callStartReceiver(String appOrigin) async {
_startTransfer(appOrigin);
}
Future<void> _startTransfer(String appOrigin) async {
final input = inputValue.trim();
if (input.isNotEmpty) {
// if (Platform.isAndroid) {
// if (await _requestPermission(Permission.storage)) {
// try {
// final outcome =
// await startRustReceiver(transfername: input, relay: appOrigin);
// print('Ergebnis von Rust: $outcome');
// } catch (e) {
// print('Fehler beim Starten des Receivers: $e');
// }
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => MyHomePage(title: 'Caesar Transfer')));
// } else {}
// } else {
try {
final outcome =
await startRustReceiver(transfername: input, relay: appOrigin);
print('Ergebnis von Rust: $outcome');
} catch (e) {
print('Fehler beim Starten des Receivers: $e');
}
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MyHomePage(title: 'Caesar Transfer')));
}
// }
print("Transfer startet with app_origin: $appOrigin");
}
Future<bool> _requestPermission(Permission permission) async {
if (await permission.isGranted) {
return true;
} else {
var result = await permission.request();
if (result == PermissionStatus.granted) {
return true;
} else {
return false;
}
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Constants.backColor,
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
widget.transferName,
style: const TextStyle(color: Colors.white, fontSize: 24),
),
const SizedBox(height: 32),
QrImageView(
data: widget.transferName,
version: QrVersions.auto,
size: 200,
foregroundColor: Constants.highlightColor,
),
],
),
),
);
}
}

View file

@ -319,6 +319,54 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.1"
permission_handler:
dependency: "direct main"
description:
name: permission_handler
sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb"
url: "https://pub.dev"
source: hosted
version: "11.3.1"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
sha256: "8bb852cd759488893805c3161d0b2b5db55db52f773dbb014420b304055ba2c5"
url: "https://pub.dev"
source: hosted
version: "12.0.6"
permission_handler_apple:
dependency: transitive
description:
name: permission_handler_apple
sha256: e9ad66020b89ff1b63908f247c2c6f931c6e62699b756ef8b3c4569350cd8662
url: "https://pub.dev"
source: hosted
version: "9.4.4"
permission_handler_html:
dependency: transitive
description:
name: permission_handler_html
sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d"
url: "https://pub.dev"
source: hosted
version: "0.1.1"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20"
url: "https://pub.dev"
source: hosted
version: "4.2.1"
permission_handler_windows:
dependency: transitive
description:
name: permission_handler_windows
sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
url: "https://pub.dev"
source: hosted
version: "0.2.1"
platform:
dependency: transitive
description:

View file

@ -45,6 +45,9 @@ dependencies:
rust_lib_flutter_test_gui:
path: rust_builder
flutter_rust_bridge: 2.0.0-dev.33
# dio: ^5.4.3+1
# path_provider: ^2.1.3
permission_handler: ^11.3.1
dev_dependencies:
flutter_test:

View file

@ -8,10 +8,13 @@
#include <bitsdojo_window_windows/bitsdojo_window_plugin.h>
#include <desktop_drop/desktop_drop_plugin.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
BitsdojoWindowPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("BitsdojoWindowPlugin"));
DesktopDropPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("DesktopDropPlugin"));
PermissionHandlerWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
}

View file

@ -5,6 +5,7 @@
list(APPEND FLUTTER_PLUGIN_LIST
bitsdojo_window_windows
desktop_drop
permission_handler_windows
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST