Skip to content

panicked at 'called Option::unwrap()... #109

Answered by temeddix
ALEZ-DEV asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ALEZ-DEV

It seems you have one line missing from main(). Try adding await RustInFlutter.ensureInitialized(); in your main.dart and please tell me if the problem ramins :)

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());
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by temeddix
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #108 on August 20, 2023 21:49.