1 Star 0 Fork 0

luoyi / luoyi_flutter_base

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

flutter基础库

  • 生成app图标

flutter pub run flutter_launcher_icons:main

  • 打包apk(android,不要使用,安卓需要区分环境,执行最下面的命令)

flutter build apk flutter build apk --target-platform android-arm64 --no-tree-shake-icons

  • 打包ipa(ios -> app-store包,上架应用商店)

flutter build ipa --release

  • 打包ipa(ios -> ad-hoc包,给测试机型使用)

flutter build ipa --release --export-method=ad-hoc

  • 安装打包好的app

flutter install

  • 在谷歌浏览器上运行

flutter run -d chrome --web-renderer html --flavor prod -t lib/main_prod.dart flutter run -d chrome --web-renderer canvaskit --flavor prod -t lib/main_prod.dart

  • 打包和安装指定环境的app(仅限android)

flutter build apk --flavor dev -t lib/main_dev.dart --target-platform android-arm64 flutter install --use-application-binary build/app/outputs/flutter-apk/app-dev-release.apk

flutter build apk --flavor prod -t lib/main_prod.dart --target-platform android-arm64 --no-tree-shake-icons flutter install --use-application-binary build/app/outputs/flutter-apk/app-prod-release.apk

  • 打包web

flutter build web flutter build web --web-renderer html --pwa-strategy none flutter build web --web-renderer canvaskit --pwa-strategy none flutter build web --wasm --pwa-strategy none dhttpd --path build/web/

  • 运行代码生成器

flutter pub run build_runner build

  • 添加指定平台

flutter create --platforms=windows,macos,linux,web

  • 创建包

flutter create --template=package

  • android minsdk>23需要手动在android下设置以下属性才能压缩安装包
packagingOptions {
        jniLibs {
            useLegacyPackaging = true
        }
    }
```.
BSD 3-Clause License Copyright (c) 2024, luoyi All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

my flutter base library 展开 收起
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/luoyi666/luoyi_flutter_base.git
git@gitee.com:luoyi666/luoyi_flutter_base.git
luoyi666
luoyi_flutter_base
luoyi_flutter_base
main

搜索帮助