Flutter Multichannel Packaging Detail Sample Project

Overview

Flutter 多渠道打包详解

image

多渠道打包介绍

多渠道打包的主要作用是满足产品的运营需求,统计渠道和活动效果。 在之前原生(Android、iOS)开发 App 有各种工具来辅助我们完成多渠道打包。 在我们开发过程中也需要为渠道功能负责,原生的开发工具就基本满足我们调试渠道包内容,但是在 Flutter 上需要更多的配置才可以完成,下文将一一介绍从配置=>调试=>打包的全部流程和细节。

核心内容

# run shell
flutter run --dart-define=APP_CHANNEL=ZeroFlutter --dart-define=OTHER_VAR=Dart
# build apk/ios
flutter build [apk/ios] --dart-define=APP_CHANNEL=ZeroFlutter --dart-define=OTHER_VAR=Dart
# main.dart
class EnvironmentConfig {
  static const APP_CHANNEL = String.fromEnvironment('APP_CHANNEL');
  static const OTHER_VAR = String.fromEnvironment('OTHER_VAR');
}

用到的脚本

使用前请是用 chmod a+x fapkc.sh 赋予可运行权限

详细文章链接

关于我

  • 15 年~18 年,使用 Android 原生做智能硬件相关的 App 研发
  • 18 年 5 月,一次偶然的机会接触到了 Flutter ,然后开始自学,可以看 weather_flutter 是我练习 Flutter 的入门实战项目(我现在依然觉得他非常适合 Flutter 入门练习使用)
  • 18 年 8 月,顶着巨大的压力(Flutter 当时还没有 Release 1.0)开始使用 Flutter 开发企业级项目,并且开发维护了十几个 Flutter 插件包(因为当时插件资源非常的匮乏)
  • 截止目前主导并参与上线了 4 款企业级Flutter App,当前正在负责开发的一款 App 累计用户 120W+,使用 Flutter 得到了极佳的体验

关注我

  • 遇到问题可以找我帮助解决(联系方式在 GitHub 主页)
  • 持续分享优质的 Flutter 文章和视频
  • 不定期分享 Flutter 开发小技巧
  • 百万级 Flutter 应用架构经验

github juejin csdn

You might also like...

A collection of sample apps that use Stream

A collection of sample apps that use Stream

Flutter samples Quick Links Register to get an API key for Stream Chat Flutter Chat Tutorial Chat UI Kit Flutter SDK Repo What is Stream? Stream allow

Dec 21, 2022

An (Sample)app that allows users to donate their pets and adopt others pets.

An (Sample)app that allows users to donate their pets and adopt others pets.

PetApp An (Sample)app that allows users to donate their pets and adopt others pets. About I created this app to learn more about Flutter and UI/UX in

Oct 5, 2022

This is the semester 6 Mobile App Development Course project. So maybe the final project may not make sense ;) but it is a good place to start learning Flutter.

This is the semester 6 Mobile App Development Course project. So maybe the final project may not make sense ;) but it is a good place to start learning Flutter.

🔍 Overview MAD-Sem6 is a Mobile Development Course Project that contains Basic ➡️ Medium implementation of different widgets. As a whole it doesn't m

Aug 9, 2021

Flutter project file sturcture that can help me to create new project easily

flutter_project_arch A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you sta

Oct 9, 2022

A simple POC implementation of the project Real World Project

A simple POC implementation of the project Real World Project

Real World Project in Dart/Flutter This is a simple POC implementation of the project Real World Project.

Nov 14, 2022

Flutter Package to implement Feedback System in your @Flutter project. Taking Feedback from users made Easy!

Flutter Package to implement Feedback System in your @Flutter project. Taking Feedback from users made Easy!

Flutter App Feedback Taking feedback from the user made easy! Simply integrate flutter_app_feedback package into your Flutter project and you are read

Nov 16, 2021

A new Flutter application. Frontend Side of project Rent a Car on Flutter

A new Flutter application. Frontend Side of project Rent a Car on Flutter

Rent a Car With Flutter A new Flutter application. Frontend Side of project Rent a Car on Flutter Upgraded to Flutter 2 and enabled Null Safety. Getti

Dec 4, 2022

Flutter HBO Profile - A new Flutter project inspired by the HBO App

Flutter HBO Profile - A new Flutter project inspired by the HBO App

FLUTTER HBO PROFILE A new Flutter project inspired by the HBO App.

Jan 18, 2022

This project is a starting point for a Flutter application.

result A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this i

Aug 24, 2021
Movie Database app is a Flutter app project that allows users to search for a movie or tv series, see the detail, season & episode, and save watchlist.

Flutter Movie Database Movie Database app is a Flutter app project that allows users to search for a movie or tv series, see the detail, season & epis

Timeless Existence 14 Dec 24, 2022
This project is by taking the sample application of the

debo_eyu A new Flutter project. Any one who want to contact me, use my email [email protected] or on my telegram account using @LindaAug1 let's se

Eyosiyas Tibebu 1 Oct 15, 2021
Sample project for an employee management application.

HR App Sample project for an employee management application. Getting Started Choose a storage implementation to be used. The application currently su

Pásztor Dániel 4 Jul 14, 2022
Sample flutter app for getting started with the Amplify Flutter Library.

Amplify Flutter Example Sample flutter app for getting started with the Amplify Flutter Library. This example uses the Auth, Analytics, and Storage co

Dao Hong Vinh 10 Jan 19, 2022
Firebase + Flutter sample apps with code snippets, supported by comprehensive articles for each implementation.

FlutterFire Samples This repo is created to contain various sample apps demonstrating the integration of Firebase with Flutter. The final goal is to c

Souvik Biswas 186 Dec 24, 2022
Sample that produces the following issue with Firebase Database web in Flutter

issue_rtdb_controller_already_firing_event Sample that produces the following issue with Firebase Database web in Flutter. @firebase/database: Error:

Deepak Goyal 0 Oct 25, 2021
A sample Google Chrome browser extension built in flutter web

My Activities It is a sample Google Chrome browser extension The extension was built in Flutter Web. How to build % cd /path/to/project/root % flutter

Viktor BORBÉLY 3 Nov 12, 2021
This is a sample Flutter Weather Forecast App for Android and iOS.

Basic Flutter (Android + iOS) App (Dart + Dio) - Weather App This is a very beginning friendly project of Flutter. A simple weather forecast App using

Hasan Abdullah 31 Nov 29, 2022
💙 A simple Flutter app sample with hooks_riverpod, includes HTTP requests by dio using GitHub APIs.

?? A simple Flutter app sample with hooks_riverpod, includes HTTP requests by dio using GitHub APIs.

Kosuke Saigusa 16 Oct 13, 2022