The goal of flutter_mp is to extend Flutter to a small program-like platform. Flutter is a very excellent cross-end framework that can not only run on Android
, iOS
, but also on web
platform through flutter_web . However, the official does not involve the small program platform. I hope flutter_mp can fill this gap.
flutter_mp inspired by Alita. The Alita engine's dynamic processing method of JSX
provides an idea for the declarative UI framework to run in small programs. flutter_mp is the practice of this idea on Flutter . However, flutter_mp is still in a very early experimental stage. If your product now has multi-end requirements for APP and mini program, for the time being, we still recommend that you use Alita, which is a relatively mature solution based on React Native.
At this stage, flutter_mp is still a very immature project, and the degree of completion is still very low. Many things are still in the exploratory stage, and there is still a long way to go before it is actually available. We have only run the official simple demo in the WeChat applet. . In addition, we think it is impossible to implement all Flutter features in small programs. There will definitely be some castration and trade-offs, including the degree of restoration of animations, gestures, etc. We are still thinking about it. Welcome to follow our latest updates progress.
Flutter | WeChat applet |
For the time being, we only support basic widgets Center
, Column
, Container
, Expanded
, Image.asset
, ListView
, Row
, and Text
We do not support custom widgets yet. Even these basic widgets are not complete, such as ListView
. And your Flutter
code can only appear in the lib/main.dart
file. We will improve flutter_mp
step by step roughly in the following order.
At this stage, we recommend that you only modify the code under lakes under Examples
and try flutter_mp .
Install flutter_mp
command
pub global activate --source git https://github.com/areslabs/flutter_mp.git
Run flutter_mp -v
to check whether the command is installed successfully
Add the following dependencies to your flutter
project
dev_dependencies :
flutter_mp :
git :
url : https://github.com/areslabs/flutter_mp
path : packages/flutter_mp
Execute the command flutter_mp -i [flutter目录] -o [目标小程序目录]
Use WeChat Developer to import and open [目标小程序目录]
of the 4
process.
In this way, your flutter application will run on the WeChat applet
This project complies with Angular Style Commit Message Conventions, and the update log is automatically generated by conventional-changelog
. For the complete log, please click CHANGELOG.md.
MIT License
Copyright (c) ARES Labs