Giter Club home page Giter Club logo

juoyo / flutter_template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xuexiangjys/flutter_template

0.0 0.0 0.0 215 KB

The project of the empty template with Flutter has built the basic framework to realize the functions of internationalization, theme peeling, login and registration, etc.(Flutter空壳模板工程,已搭建基础框架,实现国际化、主题换肤、登录注册、自动路由注册等功能,可在此基础上简单修改实现自己的应用功能)

Home Page: https://github.com/xuexiangjys/flutter_template/wiki

License: Apache License 2.0

Kotlin 0.39% Ruby 1.25% Swift 0.37% Objective-C 0.04% Dart 97.95%

flutter_template's Introduction

flutter_template

Flutter空壳模板工程,已搭建基础框架,实现国际化、主题换肤、登录注册等功能,可在此基础上简单修改实现自己的应用功能。

关于我

github csdn 简书 掘金 知乎

效果

flutter_template.gif

视频教程

运行

  • 查看一下版本号是否正确, 要求flutter的版本是2.x.x的版本。
flutter --version

【注意】 如果你的flutter版本是1.x.x版本,那么请将你的flutter版本进行升级,或者使用flutter/1.0的分支。

  • 运行以下命令查看是否需要安装其它依赖项来完成安装
flutter doctor
  • 运行启动您的应用
flutter packages get 
flutter run

项目集成介绍

本项目精选了目前Flutter最实用的几个库,可大大提高开发的效率。

使用指南

1.克隆项目

git clone https://github.com/xuexiangjys/flutter_template.git

2.修改项目名(文件夹名),并删除目录下的.git文件夹(隐藏文件)

3.使用AS或者VSCode打开项目,然后分别修改flutter、Android、ios项目的包名、应用ID以及应用名等信息。

最简单的替换方法就是进行全局替换,搜索关键字flutter_template,然后替换你想要的项目包名,如下图所示:

flutter_replace.png

Flutter目录修改

  • 修改项目根目录pubspec.yaml文件, 修改项目名、描述、版本等信息。

flutter_1.png

【注意】这里修改完pubspec.yaml中的name属性后,flutter项目的包名将会修改,这里我推荐大家使用全局替换的方式修改比较快。例如我想要修改nameflutter_app,在VSCode中你可以选择lib文件夹之后右击,选择在文件夹中寻找, 进行全局替换:

flutter_2.png

  • 修改lib/core/http/http.dart中的网络请求配置,包括:服务器地址、超时、拦截器等设置

  • 修改lib/core/utils/privacy.dart中隐私服务政策地址

  • 修改lib/core/utils/xupdate.dart中版本更新检查的地址

Android目录修改

  • 修改android目录下的包名。

在VSCode中你可以选择android文件夹之后右击,选择在文件夹中寻找, 进行全局替换。

android_1.png

【注意】修改包名之后,记住需要将存放MainActivity.kt类的文件夹名也一并修改,否则将会找不到类。

  • 修改应用ID。修改android/app/build.gradle文件中的applicationId

  • 修改应用名。修改android/app/src/main/res/values/strings.xml文件中的app_name

IOS目录修改

ios修改相对简单,直接使用XCode打开ios目录进行修改即可。如下图所示:

ios_1.jpeg

ios_2.png

更新插件版本

flutter packages upgrade
flutter pub outdated
flutter pub upgrade --major-versions

如果觉得项目还不错,可以考虑打赏一波

你的打赏是我维护的动力,我将会列出所有打赏人员的清单在下方作为凭证,打赏前请留下打赏项目的备注!

pay.png

微信公众号

更多资讯内容,欢迎扫描关注我的个人微信公众号:【我的Android开源之旅】

gzh_weixin.jpg

flutter_template's People

Contributors

xuexiangjys avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.