Commit 9c01c2b8 authored by Sebastian Roth's avatar Sebastian Roth Committed by Ben Konyi

Use new run arguments API in flutter_view / Android example.

parent a590940e
......@@ -12,6 +12,7 @@ import io.flutter.plugin.common.BasicMessageChannel.MessageHandler;
import io.flutter.plugin.common.BasicMessageChannel.Reply;
import io.flutter.plugin.common.StringCodec;
import io.flutter.view.FlutterMain;
import io.flutter.view.FlutterRunArguments;
import io.flutter.view.FlutterView;
import java.util.ArrayList;
......@@ -58,8 +59,12 @@ public class MainActivity extends AppCompatActivity {
supportActionBar.hide();
}
FlutterRunArguments runArguments = new FlutterRunArguments();
runArguments.bundlePath = FlutterMain.findAppBundlePath(getApplicationContext());
runArguments.entrypoint = "main";
flutterView = findViewById(R.id.flutter_view);
flutterView.runFromBundle(FlutterMain.findAppBundlePath(getApplicationContext()), null);
flutterView.runFromBundle(runArguments);
messageChannel = new BasicMessageChannel<>(flutterView, CHANNEL, StringCodec.INSTANCE);
messageChannel.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment