From e081476384ff1d43950310e2c8aac9e7422071ba Mon Sep 17 00:00:00 2001 From: Donghyun Kim Date: Tue, 10 Sep 2024 09:16:29 +0900 Subject: [PATCH] organize readme --- README.md | 18 +++++++++--------- flutter_ffi_plugin/README.md | 18 +++++++++--------- rust_crate/README.md | 18 +++++++++--------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index f409ef9c..f3c207e1 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,15 @@ All platforms available with Flutter are [tested](https://github.com/cunarist/ri ## 📞 Communication -Below is Dart code with widgets, and following that is Rust code with business logic. +Below is Rust code with business logic, and following that is Dart code with widgets. + +```rust +MyMessage { + current_number: 7, + other_bool: true, +} +.send_signal_to_dart(); +``` ```dart StreamBuilder( @@ -45,14 +53,6 @@ StreamBuilder( ), ``` -```rust -MyMessage { - current_number: 7, - other_bool: true, -} -.send_signal_to_dart(); -``` - Of course, the opposite way from Dart to Rust is also possible in a similar manner. All message classes and structs are generated by Rinf. You can define the message schema simply with Protobuf, making message passing between Dart and Rust very convenient. diff --git a/flutter_ffi_plugin/README.md b/flutter_ffi_plugin/README.md index f409ef9c..f3c207e1 100644 --- a/flutter_ffi_plugin/README.md +++ b/flutter_ffi_plugin/README.md @@ -29,7 +29,15 @@ All platforms available with Flutter are [tested](https://github.com/cunarist/ri ## 📞 Communication -Below is Dart code with widgets, and following that is Rust code with business logic. +Below is Rust code with business logic, and following that is Dart code with widgets. + +```rust +MyMessage { + current_number: 7, + other_bool: true, +} +.send_signal_to_dart(); +``` ```dart StreamBuilder( @@ -45,14 +53,6 @@ StreamBuilder( ), ``` -```rust -MyMessage { - current_number: 7, - other_bool: true, -} -.send_signal_to_dart(); -``` - Of course, the opposite way from Dart to Rust is also possible in a similar manner. All message classes and structs are generated by Rinf. You can define the message schema simply with Protobuf, making message passing between Dart and Rust very convenient. diff --git a/rust_crate/README.md b/rust_crate/README.md index f409ef9c..f3c207e1 100644 --- a/rust_crate/README.md +++ b/rust_crate/README.md @@ -29,7 +29,15 @@ All platforms available with Flutter are [tested](https://github.com/cunarist/ri ## 📞 Communication -Below is Dart code with widgets, and following that is Rust code with business logic. +Below is Rust code with business logic, and following that is Dart code with widgets. + +```rust +MyMessage { + current_number: 7, + other_bool: true, +} +.send_signal_to_dart(); +``` ```dart StreamBuilder( @@ -45,14 +53,6 @@ StreamBuilder( ), ``` -```rust -MyMessage { - current_number: 7, - other_bool: true, -} -.send_signal_to_dart(); -``` - Of course, the opposite way from Dart to Rust is also possible in a similar manner. All message classes and structs are generated by Rinf. You can define the message schema simply with Protobuf, making message passing between Dart and Rust very convenient.