├── CHANGELOG.md
├── LICENSE
├── README.md
├── create_demo.sh
├── example
├── .flutter-plugins-dependencies
├── .metadata
├── Magpie.gif
├── README.md
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── magpie_fly_example
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ ├── launch_background.xml
│ │ │ │ └── magpie_fly.png
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── logo.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── assets
│ └── images
│ │ ├── 2.0x
│ │ ├── tab_nomal1@2x.png
│ │ ├── tab_nomal2@2x.png
│ │ ├── tab_nomal3@2x.png
│ │ ├── tab_nomal4@2x.png
│ │ ├── tab_selected1@2x.png
│ │ ├── tab_selected2@2x.png
│ │ ├── tab_selected3@2x.png
│ │ └── tab_selected4@2x.png
│ │ ├── 3.0x
│ │ ├── tab_nomal1@3x.png
│ │ ├── tab_nomal2@3x.png
│ │ ├── tab_nomal3@3x.png
│ │ ├── tab_nomal4@3x.png
│ │ ├── tab_selected1@3x.png
│ │ ├── tab_selected2@3x.png
│ │ ├── tab_selected3@3x.png
│ │ └── tab_selected4@3x.png
│ │ ├── tab_nomal1.png
│ │ ├── tab_nomal2.png
│ │ ├── tab_nomal3.png
│ │ ├── tab_nomal4.png
│ │ ├── tab_selected1.png
│ │ ├── tab_selected2.png
│ │ ├── tab_selected3.png
│ │ └── tab_selected4.png
├── create_demo
│ ├── createDemo.dart
│ └── fileUtil.dart
├── doc
│ ├── contribution.md
│ ├── how_to_add_component.md
│ ├── magpie_ui.md
│ └── resource
│ │ ├── create_demo1.jpg
│ │ ├── create_demo2.jpg
│ │ └── create_demo3.jpg
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ ├── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ ├── Contents.json
│ │ │ ├── 启动页1125X2436.png
│ │ │ ├── 启动页1242X2208.png
│ │ │ ├── 启动页1242X2688.png
│ │ │ ├── 启动页320X480.png
│ │ │ ├── 启动页640X1136-1.png
│ │ │ ├── 启动页640X1136.png
│ │ │ ├── 启动页640X960-1.png
│ │ │ ├── 启动页640X960.png
│ │ │ ├── 启动页750X1334.png
│ │ │ └── 启动页828X1792.png
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
├── lib
│ ├── app.dart
│ ├── comon_widget
│ │ ├── code_component.dart
│ │ ├── effect_placeholder.dart
│ │ ├── fullscreen_code.dart
│ │ ├── fullscreen_effect.dart
│ │ ├── markdown_page.dart
│ │ └── widget_demo.dart
│ ├── demo
│ │ ├── ListDatas.dart
│ │ ├── banner_widget
│ │ │ ├── .page.json
│ │ │ ├── banner_widget.md
│ │ │ └── banner_widget_demo.dart
│ │ ├── draggable_btn
│ │ │ ├── .page.json
│ │ │ ├── drag_btn_demo.dart
│ │ │ └── dragable_btn.md
│ │ ├── horizonal_scroll
│ │ │ ├── .page.json
│ │ │ ├── HorizontalScrollCustom.dart
│ │ │ ├── HorizontalScrollDefault.dart
│ │ │ ├── HorizontalScrollText.dart
│ │ │ ├── component
│ │ │ │ └── card.dart
│ │ │ └── horizonal_scroll.md
│ │ ├── pinned_sliver
│ │ │ ├── .page.json
│ │ │ ├── component
│ │ │ │ └── simple_rect.dart
│ │ │ ├── pinned_sliver.md
│ │ │ └── pinned_sliver_demo.dart
│ │ ├── popup_window
│ │ │ ├── .page.json
│ │ │ ├── popup_window.md
│ │ │ └── popup_window_demo.dart
│ │ ├── search_input
│ │ │ ├── .page.json
│ │ │ ├── search_input.md
│ │ │ └── search_input_demo.dart
│ │ ├── test_widget
│ │ │ ├── .page.json
│ │ │ ├── test_widget.md
│ │ │ └── test_widget_demo.dart
│ │ └── video
│ │ │ ├── .page.json
│ │ │ ├── component
│ │ │ ├── text_component.dart
│ │ │ ├── video_component.dart
│ │ │ └── video_view.dart
│ │ │ ├── video.md
│ │ │ └── video_feed_demo.dart
│ ├── list.dart
│ ├── main.dart
│ ├── markdown_doc.dart
│ ├── news.dart
│ └── util
│ │ ├── config.dart
│ │ ├── parse_markdown.dart
│ │ └── syntax_highlighter.dart
├── pubspec.yaml
└── test
│ └── widget_test.dart
├── lib
├── magpie_fly.dart
└── src
│ ├── banner
│ └── banner_round.dart
│ ├── drag
│ └── draggable_btn.dart
│ ├── feed
│ ├── meta_consumer.dart
│ ├── scroll_detect_listener.dart
│ ├── video_meta.dart
│ └── video_play_model.dart
│ ├── horizontal_scroll
│ ├── footer_default_painter.dart
│ ├── footer_view.dart
│ └── horizontal_scroll.dart
│ ├── popup_window
│ └── popup_window.dart
│ ├── search_input
│ └── search_input.dart
│ └── sliver
│ ├── pinned_appbar.dart
│ └── safearea_header.dart
└── pubspec.yaml
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.1
2 |
3 | * TODO: Describe initial release.
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (C) 2005-present, 58.com. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without modification,
4 | are permitted provided that the following conditions are met:
5 |
6 | * Redistributions of source code must retain the above copyright
7 | notice, this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above
9 | copyright notice, this list of conditions and the following
10 | disclaimer in the documentation and/or other materials provided
11 | with the distribution.
12 | * Neither the name of Google Inc. nor the names of its
13 | contributors may be used to endorse or promote products derived
14 | from this software without specific prior written permission.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [toc]
2 |
3 | # magpie_fly
4 |
5 | Magpie-fly 是58集体出品组件库,封装了多种常用组件,以满足开发者需求。(Magpie-fly is a component library produced by 58 Group, which encapsulates a variety of common components to meet the needs of developers)
6 |
7 | Mapie包含了一系列的开源项目,访问对应仓库了解更多。
8 |
9 | > Magpie
10 |
11 | 一个Flutter开发的工具流,实现独立Flutter模块的创建,开发,编译,打包,上传流程。[https://github.com/wuba/https://github.com/wuba/magpie](https://github.com/wuba/https://github.com/wuba/magpie)
12 |
13 | > Magpie Native&Dart SDK
14 |
15 | 与Workflow配套,用于接入App,Flutter的SDK。[https://github.com/wuba/https://github.com/wuba/magpie_sdk](https://github.com/wuba/https://github.com/wuba/magpie_sdk)
16 |
17 | > Magpie Log
18 |
19 | 适用于Flutter平台下的圈选埋点库。[https://github.com/wuba/magpie_log](https://github.com/wuba/magpie_log)
20 |
21 | ## Pub使用
22 |
23 | 1. Depend on it
24 | Add this to your package's pubspec.yaml
25 | ```
26 | dependencies:
27 | magpie_fly: ^0.0.1
28 | ```
29 |
30 | 2. Install it
31 | You can install packages from the command line:
32 | ```
33 | $ flutter pub get
34 | ```
35 |
36 | 3. Import it
37 | Now in your Dart code, you can use:
38 | ```
39 | import 'package:magpie_fly/magpie_fly.dart';
40 | ```
41 |
42 | ## 组件目录
43 | lib/src/
44 | ```
45 | lib
46 | ├── magpie_fly.dart
47 | └── src
48 | ├── banner
49 | ├── drag
50 | ├── feed
51 | ├── horizontal_scroll
52 | ├── popup_window
53 | ├── search_input
54 | ├── sliver
55 | ```
56 |
57 | ## 组件清单
58 |
59 | | 组件 | 说明 |
60 | | -------------------- | --------------------------------------------- |
61 | | 视频滚动检测播放控件 | 用于视频列表的滚动检测和播放控制 |
62 | | 安全区吸顶组件 | Sliver状态栏安全区吸顶 |
63 | | 全屏拖动按钮 | 可用于右下角的广告位 |
64 | | 尾部弹性ScrollView | 一个支持滑动回弹加载更多的组件 |
65 | | popup_window | 一个支持任意方向上的popwindow |
66 | | 搜索组件 | 提供常用带阴影和不带阴影的搜索组件 |
67 |
68 |
69 |
70 | ## 致谢
71 | 在开发过程中,我们使用到了一些第三方依赖库,在此特别感谢Flutter&Dart社区的开发者们。[provider](https://pub.dev/packages/provider)、[cupertino_icons](https://pub.dev/packages/cupertino_icons)、[video_player](https://pub.dev/packages/video_player)、[flutter_markdown](https://pub.dev/packages/flutter_markdown)、[android_intent](https://pub.dev/packages/android_intent)、[flutter_webview_plugin](https://pub.dev/packages/flutter_webview_plugin)、[fluttertoast](https://pub.dev/packages/fluttertoast)
72 |
--------------------------------------------------------------------------------
/create_demo.sh:
--------------------------------------------------------------------------------
1 |
2 | SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
3 | cd $SHELL_FOLDER/example
4 |
5 | dart create_demo/createDemo.dart
6 |
--------------------------------------------------------------------------------
/example/.flutter-plugins-dependencies:
--------------------------------------------------------------------------------
1 | {"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"android_intent","dependencies":[]},{"name":"flutter_webview_plugin","dependencies":[]},{"name":"fluttertoast","dependencies":[]},{"name":"video_player","dependencies":["video_player_web"]},{"name":"video_player_web","dependencies":[]}]}
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 27321ebbad34b0a3fafe99fac037102196d655ff
8 | channel: v1.12.13-hotfixes
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/example/Magpie.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/Magpie.gif
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 |
2 | [toc]
3 |
4 | # Magpie-fly
5 | Magpie-fly 是58集体出品组件库,封装了多种常用组件,以满足开发者需求。
6 |
7 | ## 功能
8 | 1. 58公众号信息
9 | * 显示了58公众号信息,方便58获取最新资讯
10 | 2. 组件列表和详情
11 | * 详情页通过加载markdown的方式进行显示
12 | 1. [使用文档](doc/magpie_ui.md)及[贡献流程文档](doc/contribution.md)
13 | * 介绍了组件库的使用方式和接入组件的具体流程
14 | 4. create_demo脚本
15 | * 自动生成demo.dart,.page.json,demo.md,让开发者能快速的接入组件
16 |
17 | ## 基础环境
18 |
19 | 开始使用前,请确保基础环境配置正常
20 | 如有问题,请参考https://flutterchina.club/setup-macos/
21 |
22 | * `flutter --version`
23 | ```
24 | Flutter 1.12.13+hotfix.6 • channel beta • https://github.com/flutter/flutter.git
25 | Framework • revision 18cd7a3601 (13 天前) • 2019-12-11 06:35:39 -0800
26 | Engine • revision 2994f7e1e6
27 | Tools • Dart 2.7.0
28 | ```
29 |
30 | * `dart --version`
31 | ```
32 | Dart VM version: 2.7.0 (Mon Dec 2 20:10:59 2019 +0100) on "macos_x64"
33 | ```
34 |
35 | * `pub --version`
36 | ```
37 | Pub 2.7.0
38 | ```
39 |
40 | * `flutter doctor`
41 | ```
42 | 检查有没有缺失项
43 | ```
44 |
45 | ## 配置编辑器(二选一)
46 | [安装Android Studio](https://flutterchina.club/get-started/editor/)
47 | [安装Visual Studio](https://flutterchina.club/get-started/editor/#vscode)
48 |
49 | ## 运行
50 | 用编辑器打开下载好的Magpie-fly工程,运行
51 | ```
52 | magpie_fly/example/lib/main.dart
53 | ```
54 |
55 | ## 整体设计
56 | 1. 目录结构
57 |
58 | * 各个组件的代码在项目根目录/lib下,每个文件夹对应一个组件。
59 | ```
60 | lib
61 | ├── magpie_ui.dart
62 | └── src
63 | | ├── drag
64 | | │ └── draggable_btn.dart
65 | | ├── feed
66 | | │ ├── meta_consumer.dart
67 | | │ ├── scroll_detect_listener.dart
68 | | │ ├── video_meta.dart
69 | | │ └── video_play_model.dart
70 | ```
71 |
72 | * 组件的演示demo以及文档都在`/example/lib/demo`目录下,每个文件夹对应一个组件,里面有`xxx_xxx_demo.dart`、对应的文档`xxx.md`以及描述组件的信息文件.page.json,执行create_demo.sh脚本之后,会自动生成默认生成这三个文件,一般不需要修改。
73 | ```
74 | demo
75 | │ ├── draggable_btn
76 | │ │ ├── drag_btn_demo.dart
77 | │ │ ├── .page.json
78 | │ │ └── dragable_btn.md
79 | │ ├── horizonal_scroll
80 | │ │ ├── HorizontalScrollCustom.dart
81 | │ │ ├── HorizontalScrollDefault.dart
82 | │ │ ├── HorizontalScrollText.dart
83 | │ │ ├── component
84 | │ │ │ └── card.dart
85 | │ │ └── horizonal_scroll.md
86 | │ │ └── .page.json
87 | ```
88 |
89 | 2 组件详情页采用markdown+组件+代码的组合方式,介绍组件的详细信息和组件效果,在查看文档的同时还能操作具体组件。
90 | 
91 |
92 | ## 组件接入
93 | 请参考[how_to_add_component.md](doc/how_to_add_component.md)
94 |
95 | ## 整体效果
96 | 
97 |
98 | ## Magpie-fly优势
99 | - 整合了开发过程中常用的组件
100 | - 采用Markdown+组件+代码的方式介绍具体组件的使用和效果
101 | - 可添加常用widget的使用方式,让想学习flutter
102 | 快速上手
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 28
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.example.magpie_fly_example"
42 | minSdkVersion 16
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
47 | }
48 |
49 | buildTypes {
50 | release {
51 | // TODO: Add your own signing config for the release build.
52 | // Signing with the debug keys for now, so `flutter run --release` works.
53 | signingConfig signingConfigs.debug
54 | }
55 | }
56 | }
57 |
58 | flutter {
59 | source '../..'
60 | }
61 |
62 | dependencies {
63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64 | testImplementation 'junit:junit:4.12'
65 | androidTestImplementation 'androidx.test:runner:1.1.1'
66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
67 |
68 | implementation 'androidx.legacy:legacy-support-core-ui:1.0.0'
69 | implementation 'androidx.lifecycle:lifecycle-viewmodel:2.1.0'
70 | implementation 'androidx.fragment:fragment:1.1.0'
71 | }
72 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
13 |
20 |
21 |
24 |
25 |
26 |
27 |
28 |
29 |
31 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/com/example/magpie_fly_example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.magpie_fly_example
2 |
3 | import android.os.Bundle
4 |
5 | import io.flutter.app.FlutterActivity
6 | import io.flutter.plugins.GeneratedPluginRegistrant
7 |
8 | class MainActivity: FlutterActivity() {
9 | override fun onCreate(savedInstanceState: Bundle?) {
10 | super.onCreate(savedInstanceState)
11 | GeneratedPluginRegistrant.registerWith(this)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | -
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/magpie_fly.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/android/app/src/main/res/drawable/magpie_fly.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/android/app/src/main/res/mipmap-xxhdpi/logo.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/example/assets/images/2.0x/tab_nomal1@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/2.0x/tab_nomal1@2x.png
--------------------------------------------------------------------------------
/example/assets/images/2.0x/tab_nomal2@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/2.0x/tab_nomal2@2x.png
--------------------------------------------------------------------------------
/example/assets/images/2.0x/tab_nomal3@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/2.0x/tab_nomal3@2x.png
--------------------------------------------------------------------------------
/example/assets/images/2.0x/tab_nomal4@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/2.0x/tab_nomal4@2x.png
--------------------------------------------------------------------------------
/example/assets/images/2.0x/tab_selected1@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/2.0x/tab_selected1@2x.png
--------------------------------------------------------------------------------
/example/assets/images/2.0x/tab_selected2@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/2.0x/tab_selected2@2x.png
--------------------------------------------------------------------------------
/example/assets/images/2.0x/tab_selected3@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/2.0x/tab_selected3@2x.png
--------------------------------------------------------------------------------
/example/assets/images/2.0x/tab_selected4@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/2.0x/tab_selected4@2x.png
--------------------------------------------------------------------------------
/example/assets/images/3.0x/tab_nomal1@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/3.0x/tab_nomal1@3x.png
--------------------------------------------------------------------------------
/example/assets/images/3.0x/tab_nomal2@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/3.0x/tab_nomal2@3x.png
--------------------------------------------------------------------------------
/example/assets/images/3.0x/tab_nomal3@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/3.0x/tab_nomal3@3x.png
--------------------------------------------------------------------------------
/example/assets/images/3.0x/tab_nomal4@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/3.0x/tab_nomal4@3x.png
--------------------------------------------------------------------------------
/example/assets/images/3.0x/tab_selected1@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/3.0x/tab_selected1@3x.png
--------------------------------------------------------------------------------
/example/assets/images/3.0x/tab_selected2@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/3.0x/tab_selected2@3x.png
--------------------------------------------------------------------------------
/example/assets/images/3.0x/tab_selected3@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/3.0x/tab_selected3@3x.png
--------------------------------------------------------------------------------
/example/assets/images/3.0x/tab_selected4@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/3.0x/tab_selected4@3x.png
--------------------------------------------------------------------------------
/example/assets/images/tab_nomal1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/tab_nomal1.png
--------------------------------------------------------------------------------
/example/assets/images/tab_nomal2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/tab_nomal2.png
--------------------------------------------------------------------------------
/example/assets/images/tab_nomal3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/tab_nomal3.png
--------------------------------------------------------------------------------
/example/assets/images/tab_nomal4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/tab_nomal4.png
--------------------------------------------------------------------------------
/example/assets/images/tab_selected1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/tab_selected1.png
--------------------------------------------------------------------------------
/example/assets/images/tab_selected2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/tab_selected2.png
--------------------------------------------------------------------------------
/example/assets/images/tab_selected3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/tab_selected3.png
--------------------------------------------------------------------------------
/example/assets/images/tab_selected4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wuba/magpie_fly/8bfc005b1c74056108e8ec6c1c78f67ceb71bdb8/example/assets/images/tab_selected4.png
--------------------------------------------------------------------------------
/example/create_demo/createDemo.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 | // import 'package:args/args.dart';
3 | import 'fileUtil.dart';
4 |
5 |
6 | Future main(List arguments) async{
7 |
8 | // print('请输入Demo名称(限制英文,且数字不在第一位,如:test_widget):');
9 | print('input your Demo name(eg:test_widget):');
10 | String name = stdin.readLineSync() ?? 'test_widget';
11 | print('');
12 |
13 | print('input you component title:');
14 | String title = stdin.readLineSync() ?? '';
15 | print('');
16 |
17 |
18 | print('input you component description:');
19 | String desc = stdin.readLineSync() ?? '';
20 | print('');
21 |
22 | print('您的demo在example/lib/demo/$name下,组件名称:$title,组件描述:$desc');
23 |
24 | var demoName = '$name';
25 | var className = underScore2CamelCase(name);
26 | var demoPath = 'lib/demo/$demoName';
27 | var stateName = '_${className}State';
28 | await createFile('lib/demo');
29 | await createFile(demoPath);
30 |
31 | //创建.dart文件
32 | await writeContent2Path(demoPath, '${demoName}_demo.dart',
33 | """
34 | import 'package:flutter/material.dart';
35 |
36 | class $className extends StatefulWidget {
37 | @override
38 | State createState() => $stateName();
39 | }
40 |
41 | class $stateName extends State<$className> {
42 | @override
43 | Widget build(BuildContext context) {
44 | return Container(
45 | child: Text("this is flutter go init demo"),
46 | );
47 | }
48 | }
49 | """);
50 |
51 | //创建rm文件
52 | var rmName = '$demoName.md';
53 | await writeContent2Path(demoPath, rmName,
54 | """
55 |
56 |
57 | ## 简介
58 | * 名称:你的组件名称
59 | * 概述:你的组件概述
60 | * 作者:你的邮箱
61 |
62 | ## 导入(安装)
63 | import 'package:magpie_ui/magpie_ui.dart';
64 |
65 | ## 概述
66 | XXXXXXXXXXX
67 |
68 | ## 使用
69 |
70 |
77 | 效果:
78 | {{"demo": "lib/demo/$demoName/${demoName}_demo.dart"}}
79 |
80 | ## 参数配置
81 |
82 | | 参数 | 描述 |
83 | | --- | --- |
84 |
85 | """
86 | );
87 |
88 |
89 | //写json
90 | await writeContent2Path(demoPath, '.page.json',
91 | """
92 | {
93 | "name": "$name",
94 | "title": "$title",
95 | "desc": "$desc",
96 | "markdown": "$demoPath/$rmName"
97 | }
98 | """
99 | );
100 |
101 | //写列表数据
102 | buildList().then((list){
103 | writeContent2Path('lib/demo', 'ListDatas.dart',
104 | """
105 | //列表页数据
106 |
107 | List