diff --git a/documentation/docs/frequently-asked-questions.md b/documentation/docs/frequently-asked-questions.md index a74cf63b..86e5a362 100644 --- a/documentation/docs/frequently-asked-questions.md +++ b/documentation/docs/frequently-asked-questions.md @@ -203,7 +203,7 @@ message MyUniqueOutput { ```dart title="lib/main.dart" import 'dart:async'; -import 'package:example_app/messages/exports.dart'; +import 'package:example_app/messages/all.dart'; var currentInteractionId = 0; final myUniqueOutputs = Map>(); @@ -218,7 +218,7 @@ void main() async { ```dart title="lib/main.dart" import 'dart:async'; -import 'package:example_app/messages/exports.dart'; +import 'package:example_app/messages/all.dart'; onPressed: () async { final completer = Completer(); @@ -312,7 +312,7 @@ Failed to load dynamic library 'libhub.so': libhub.so: cannot open shared object In this case, you can specify a path that points to the compiled Rust library. Simply provide a string path to your dynamic library file. ```dart title="lib/main.dart" -import './messages/exports.dart'; +import './messages/all.dart'; async void main() { await initializeRust(compiledLibPath: '/path/to/library/libhub.so'); diff --git a/documentation/docs/tutorial.md b/documentation/docs/tutorial.md index 88f35d63..646e751d 100644 --- a/documentation/docs/tutorial.md +++ b/documentation/docs/tutorial.md @@ -37,7 +37,7 @@ rinf message Create a button widget in Dart that accepts the user input. ```dart title="lib/main.dart" -import 'package:test_app/messages/exports.dart'; +import 'package:test_app/messages/all.dart'; child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -146,7 +146,7 @@ async fn main() { Finally, receive the signals in Dart with `StreamBuilder` and rebuild the widget accordingly. ```dart title="lib/main.dart" -import 'package:test_app/messages/exports.dart'; +import 'package:test_app/messages/all.dart'; children: [ StreamBuilder( @@ -184,7 +184,7 @@ rinf message ``` ```dart title="lib/main.dart" -import 'package:test_app/messages/exports.dart'; +import 'package:test_app/messages/all.dart'; children: [ StreamBuilder( diff --git a/flutter_package/bin/src/helpers.dart b/flutter_package/bin/src/helpers.dart index 17605321..22bf3f8d 100644 --- a/flutter_package/bin/src/helpers.dart +++ b/flutter_package/bin/src/helpers.dart @@ -146,7 +146,7 @@ please refer to Rinf's [documentation](https://rinf.cunarist.com). if (await mainFile.exists()) { await Process.run('dart', ['format', './lib/main.dart']); var mainText = await mainFile.readAsString(); - if (!mainText.contains('messages/exports.dart')) { + if (!mainText.contains('messages/all.dart')) { final lines = mainText.split('\n'); final lastImportIndex = lines.lastIndexWhere( (line) => line.startsWith('import '), @@ -157,7 +157,7 @@ please refer to Rinf's [documentation](https://rinf.cunarist.com). ); lines.insert( lastImportIndex + 2, - "import './messages/exports.dart';", + "import './messages/all.dart';", ); mainText = lines.join('\n'); }