Recreate Flutter's ios and android folder with Swift and Kotlin

前端 未结 2 1393
野的像风
野的像风 2021-02-20 11:00

Hi I just found out that it is possible to create Flutter project with Swift and Kotlin. However, I\'m already invested in my current projects and want to recreate the ios

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-20 11:26

    use -i and -a to create new project, like this:

    flutter create -i swift -a kotlin project_name
    

    see also:https://flutter.io/docs/development/platform-integration/platform-channels#step-1-create-a-new-app-project

    then replace with lib folder from old project.


    update 2020.01.13
    swift and kotlin are default now. you can use those command to update exist project:

    cd project
    flutter create .
    

    this command will update your project. then you can merge you old code into new project, and remove old code.
    make sure you backup your project before run it, and you know what are you exactly doing

提交回复
热议问题