-
I was trying to use this template, everything goes well until I try calling the rust function from dart. there is my code :
with_request.rs
test.rs
Thank for helping me ! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @ALEZ-DEV It seems you have one line missing from import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:msgpack_dart/msgpack_dart.dart';
import 'package:rust_in_flutter/rust_in_flutter.dart';
void main() async {
// Wait for initialization to be completed first.
await RustInFlutter.ensureInitialized();
runApp(const MyApp());
} |
Beta Was this translation helpful? Give feedback.
-
Oh thank you very much ! |
Beta Was this translation helpful? Give feedback.
Hi @ALEZ-DEV
It seems you have one line missing from
main()
. Try addingawait RustInFlutter.ensureInitialized();
in yourmain.dart
and please tell me if the problem ramins :)