The framework of the Flutter empty shell template project has been built to implement internationalization, theme peels, login and registration functions. You can easily modify this foundation to implement your own application functions.

The project address

Github.com/xuexiangjys… If you like it, please click “like” and “star”

Demonstration effect


run

  • Check to see if the version number is correct
flutter --version
Copy the code
  • Run the following command to see if additional dependencies need to be installed to complete the installation
flutter doctor
Copy the code
  • Run to start your application
flutter packages get 
flutter run
Copy the code

Introduction to Project Integration

This project selects several libraries that are currently most useful for Flutter, which can greatly improve the efficiency of Flutter development.

  • Cached_network_image (network cache image)
  • Dio (very useful network request library)
  • Event_bus (Event tool)
  • Fluro (Page-routing artifact)
  • Flutter_easyrefresh (Refresh component)
  • Flutter_webview_plugin (web page loading)
  • Flutter_spinkit (loading animation)
  • Flutter_swiper (Multicast map component)
  • Flutter_xupdate (App version update)
  • oktoast
  • Path_provider (path)
  • Package_info (Application package information)
  • Permission_handler Permission application
  • Provider (very useful data sharing tool)
  • I will share my share with you.
  • shared_preferences
  • Url_launcher (link processing)

Use guide

1. Cloning projects

git clone https://github.com/xuexiangjys/flutter_template.git
Copy the code

2. Change the project name (folder name) and delete the. Git folder (hidden files) in the directory.

3. Open the project with AS or VSCode and change the package name, app ID, and app name of the flutter, Android, and ios projects, respectively.

Modify the Flutter directory

  • Modify the project root directorypubspec.yamlModify the project name, description, and version.

Yaml will change the package name of the flutter project. I recommend that you change the package name of the flutter project using global substitution. For example, if I want to change name to flutter_app, in VSCode you can select the lib folder, right click, and select find in folder to do global substitution:

  • Dart: Modify the network request configuration in lib/core/ HTTP /http.dart, including server address, timeout, and interceptor Settings

  • Modify the lib/core/utils/privacy. Dart privacy services in the policy address

  • Modify the lib/core/utils/xupdate dart version update check address

Android Directory Modification

  • Change the package name in the Android directory.

In VSCode you can select the android folder, right click, and select find in the folder for global replacement.

[Note] After changing the package name, remember to change the name of the folder where the mainActivity. kt class is stored, otherwise the class will not be found.

  • Example Change the application ID. Modify applicationId in android/app/build.gradle

  • Change the application name. Modify android/app/SRC/main/res/values/strings. App_name in the XML file

IOS Directory Modification

Ios modification is relatively simple, directly use XCode to open the ios directory to modify. As shown below:

packaging

  • Direct packaging:

flutter build apk

  • 64 – release:

flutter build apk --release --target-platform android-arm64

  • 32 – release:

flutter build apk --release --target-platform android-arm

More resources

  • Learn the Demo project about Flutter
  • Flutter_xupdate One-click implementation of Flutter application version update
  • Utility Android shell template engineering
  • Simplified version of Android shell template engineering
  • X-library Series Android application framework details

Wechat official account

More information, welcome to wechat search public number: [My Android open source journey]