linux flutter example with bridge to rust and build system

This commit is contained in:
John Smith 2022-01-29 13:23:10 -05:00
parent cbffc381c1
commit 0c6aa6d439
14 changed files with 370 additions and 71 deletions

View file

@ -94,5 +94,21 @@ fn main() {
.wait()
.expect("flutter_rust_bridge_codegen was not running");
//println!("cargo:rerun-if-changed={}", input_path.to_str().unwrap());
// Build freezed
// Run: flutter pub run build_runner build
let mut command = Command::new("flutter");
command.args([
OsStr::new("pub"),
OsStr::new("run"),
OsStr::new("build_runner"),
OsStr::new("build"),
]);
let mut child = command
.spawn()
.expect("'flutter pub run build_runner build' did not execute correctly");
child
.wait()
.expect("'flutter pub run build_runner build' was not running");
}