实现效果,在已存在的android项目中接入flutter,即android调用开启flutter页面(使用android打开flutter的指定页面),flutter调用原生android方法
步骤
android开启flutter页面实现:
1.创建一个android项目,并添加一个按钮,来作为已存在的项目
image.png
键入项目信息,并创建,等待创建完成
image.png
修改项目布局文件,/res/layout/activity_main/xml,加一个输入框,一个按钮
image.png
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_he