Compare commits
38 Commits
master
...
flutter_un
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4e4b0896f | ||
|
|
6bc10a2eee | ||
|
|
a9e8600e97 | ||
|
|
6e83586f9e | ||
|
|
e77f8717d5 | ||
|
|
11f1ffa09e | ||
|
|
2ea43988b9 | ||
|
|
95547aaf6b | ||
|
|
99f94715ce | ||
|
|
28958d3035 | ||
|
|
3cef86825f | ||
|
|
eadc27b40a | ||
|
|
fb51747290 | ||
|
|
e3b174c126 | ||
|
|
348565ccd0 | ||
|
|
049e31485a | ||
|
|
530986cf55 | ||
|
|
72cbdbc659 | ||
|
|
6a5c08d2d9 | ||
|
|
da9764a51c | ||
|
|
ccc9414285 | ||
|
|
ebc4e04ca7 | ||
|
|
849d138161 | ||
|
|
db42c903a8 | ||
|
|
536b14f608 | ||
|
|
6648347cbd | ||
|
|
8bbcc4f5f7 | ||
|
|
e5251a694c | ||
|
|
527fa566e9 | ||
|
|
31ecdac0ba | ||
|
|
f7c07533aa | ||
|
|
9924d91afc | ||
|
|
224b43b8d5 | ||
|
|
10e4dc9b5c | ||
|
|
4402bbca38 | ||
|
|
97386a18b9 | ||
|
|
161098c667 | ||
|
|
cd48a07b94 |
9
.gitignore
vendored
@@ -22,6 +22,7 @@
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
@@ -29,9 +30,15 @@
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
/lib/tools/
|
||||
|
||||
# Web related
|
||||
lib/generated_plugin_registrant.dart
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Exceptions to above rules.
|
||||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
|
||||
|
||||
227
README.md
@@ -1,213 +1,44 @@
|
||||
|
||||
[](https://github.com/toly1994328/FlutterUnit/stargazers)
|
||||
[](https://github.com/toly1994328/FlutterUnit/network)
|
||||
[](https://github.com/toly1994328/FlutterUnit/blob/master/LICENSE)
|
||||
### FlutterUnit apk 下载体验:
|
||||
#### Flutter Unit 周边
|
||||
- 🔥 [实体书 - 《Flutter之旅》源码下载地址 ](https://gitee.com/toly1994328/FlutterUnit/attach_files/466731/download)
|
||||
- 🔥 [掘金小册 -《Flutter 绘制指南 - 妙笔生花》](https://juejin.im/book/6844733827265331214)
|
||||
- 🔥 [掘金小册 -《Flutter 手势探索 - 执掌天下》](https://juejin.cn/book/6896378716427911181)
|
||||
- 🔥 [掘金小册 -《Flutter 动画探索 - 流光幻影》](https://juejin.cn/book/6965102582473687071)
|
||||
- [Flutter环境配置](https://github.com/toly1994328/FlutterUnit/issues/22)
|
||||
- [Flutter实用插件集录 ](https://github.com/toly1994328/FlutterUnit/issues/41)
|
||||
- [Flutter要点集录 ](https://github.com/toly1994328/FlutterUnit/labels/point)
|
||||
|
||||
|
||||

|
||||
### FlutterUnit 下载体验: 复制链接,在浏览器下载~
|
||||
|
||||
|
||||
| 平台类型 | 下载地址 | 项目分支地址 | 相关文章 |
|
||||
|------|------------|------|------------|
|
||||
| Android版 | http://toly1994.com/file/FlutterUnit.apk |[flutter_unit](https://github.com/toly1994328/FlutterUnit)| [《FlutterUnit食用指南》](https://juejin.im/post/6844904147045597191)|
|
||||
| iOS版 | 暂未提供,可自己下载项目运行 |[flutter_unit](https://github.com/toly1994328/FlutterUnit)| [《FlutterUnit 食用指南》](https://juejin.im/post/6844904147045597191)|
|
||||
| MacOS版 | http://toly1994.com/file/flutter_unit_mac.zip |[flutter_unit_desk](https://github.com/toly1994328/FlutterUnit/tree/flutter_unit_desk)| [《mac版闪亮登场》](https://juejin.im/post/6844904147817332743)|
|
||||
| Windows版 |http://toly1994.com/file/FlutterUnitWin.zip | [flutter_unit_desk](https://github.com/toly1994328/FlutterUnit/tree/flutter_unit_desk) | [《win版闪亮登场》](https://juejin.im/post/6847902222626488327)|
|
||||
| Web版 | http://toly1994328.gitee.io/flutter_web | [ flutter_unit_web ](https://github.com/toly1994328/FlutterUnit/tree/flutter_unit_web) | [《web版闪亮登场》](https://juejin.im/post/6859888713980182541)|
|
||||
|
||||
---
|
||||
|
||||
|
||||
### 一、组件的展示页面
|
||||
|
||||
#### 1. `210+组件收录`
|
||||
|
||||
> Flutter源码中的可用的组件一共350个左右,纷繁复杂,也没有明确的分类标准
|
||||
FlutterUnit 对`大大小小,常用不常用`的组件能收的尽量收录。并`根据个人感觉进行评星 `
|
||||
`目前收录组件211个`,每个都有至少一个演示展现和代码展示。
|
||||
|
||||
| . | . | . |
|
||||
|------|------------|------------|
|
||||
| | |  |
|
||||
|  |  | |
|
||||
|
||||
|
||||
---
|
||||
|
||||
#### 2. 组件详情页
|
||||
|
||||
> `207个组件`全部都有详情页。对于重要的组件会详细展现
|
||||
一般都会有某个演示对应的组件和属性,尽量做到细致,如果有需要补充,欢迎联系我。
|
||||
`最重要的是: 所有的演示展现都是Flutter的组件形成的,而非图片,这就意味着可操作性更高。`
|
||||
|
||||
| . | . | . |
|
||||
|------|------------|------------|
|
||||
| | |  |
|
||||
|  |  ||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
#### 3. 组件的可操作性
|
||||
|
||||
> 对一些操作交互的组件或有可操作性的某些组件,`提供操作演示`
|
||||
|
||||
| . | . | . |
|
||||
|------|------------|------------|
|
||||
| | | |
|
||||
|
||||
---
|
||||
|
||||
#### 4. 相关组件的关联切换
|
||||
> `相关组件通过link to 可以进行切换, 满足你的探索欲。`
|
||||
如果有的关联未加入,欢迎联系我,对我来说,加个数字就行了。
|
||||
|
||||

|
||||
|
||||
| . | . | . |
|
||||
|------|------------|------------|
|
||||
||| |
|
||||
|
||||
---
|
||||
|
||||
#### 5. 代码的查看和分享
|
||||
> 激动人心的是,你可以通过右侧的图标`展开/隐藏 实现下面效果的代码`
|
||||
并且`支持分享`,如果你想亲自体验,so,easy ! 而且`代码高亮样式可以自定义`。
|
||||
|
||||
| . | . | . |
|
||||
|------|------------|------------|
|
||||
| | | |
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
### 二、全局配置
|
||||
|
||||
#### 1. 颜色主题
|
||||
> 只提供八种颜色,可在`右滑菜单页`的`我的主题`配置,`可以拓展`
|
||||
|
||||
| . | . | . |
|
||||
|------|------------|------------|
|
||||
| |  |  |
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
#### 2.字体配置
|
||||
|
||||
> 支持全局字体设置,`可以拓展`
|
||||
|
||||
| . | . | . |
|
||||
|------|------------|------------|
|
||||
| |  | |
|
||||
|
||||
---
|
||||
|
||||
|
||||
#### 3.item样式设置
|
||||
|
||||
> 支持item样式设置,`可以拓展,支持征集`,详见`Flutter Unit 1.0 征集方案`
|
||||
|
||||
| . | . | . |
|
||||
|------|------------|------------|
|
||||
|| | |
|
||||
|
||||
---
|
||||
|
||||
#### 4.代码面板风格设置
|
||||
|
||||
> 支持代码风格设置,`可以拓展,支持征集`,详见`Flutter Unit 1.0 征集方案`
|
||||
|
||||
| . | . |
|
||||
|------|------------|
|
||||
|| |
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
### 三、搜索与收藏功能
|
||||
|
||||
|
||||
#### 1.搜索功能
|
||||
|
||||
> 由于Flutter中Widget比较杂乱,不太好分类,所以搜索是非常重要的
|
||||
另外可以根据星级进行过滤,支持多选。目前正在考虑根据功能分类,之后会有所完善。
|
||||
|
||||
|
||||
| . | . | . |
|
||||
|------|------------|------------|
|
||||
| | |  |
|
||||
|
||||
---
|
||||
|
||||
#### 2.搜藏功能
|
||||
|
||||
> 搜藏页做得比较简陋,后面打算做收藏夹,可以自己创建的那种。
|
||||
|
||||
| . | . | . |
|
||||
|------|------------|------------|
|
||||
||| |
|
||||
|
||||
> `FlutterUnit 1.0 `目前基本就是这么多功能,可以在Github中下载打包后的apk玩玩
|
||||
希望能对你的Flutter学习有所帮助。
|
||||
|
||||
---
|
||||
|
||||
#### 3.关于我与项目
|
||||
> 不多说,都在图里。
|
||||
|
||||
| . | . | . |
|
||||
|------|------------|------------|
|
||||
||| 
|
||||
|
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
### Flutter Unit Bug - Feature
|
||||
|
||||
- `2020-4-16`
|
||||
> 当前Flutter 版本
|
||||
|
||||
```
|
||||
fixed " 修改样式无法点击的问题。
|
||||
fixed " 一些已知文案的错误。
|
||||
fixed " hero动画闪现不同步问题。
|
||||
Flutter 2.5.3 • channel stable • https://github.com/flutter/flutter.git
|
||||
Framework • revision 18116933e7 (4 weeks ago) • 2021-10-15 10:46:35 -0700
|
||||
Engine • revision d3ea636dc5
|
||||
Tools • Dart 2.14.4
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
- `2020-4-17`
|
||||
> 当前版本与分支
|
||||
|
||||
```
|
||||
fixed " 进入收藏页,再回到首页,顶部显示不同步的问题。
|
||||
fixed " 主页item双击黑屏问题。
|
||||
|
||||
|
||||
feature " 支持详情页【相关链接的栈管理】,
|
||||
" 即: 点击多个链接,不直接返回主页.
|
||||
---[• flutter --version
|
||||
Flutter 2.5.0 • channel stable • https://github.com/flutter/flutter.git
|
||||
Framework • revision 4cc385b4b8 (2 days ago) • 2021-09-07 23:01:49 -0700
|
||||
Engine • revision f0826da7ef
|
||||
Tools • Dart 2.14.0
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
- `2020-4-18`
|
||||
|
||||
```
|
||||
feature " 小彩蛋: 【长按】底部栏【最左侧按钮】,打开左边菜单栏
|
||||
" 【长按】底部栏【最右侧按钮】,打开右边菜单栏
|
||||
|
||||
fixed " 收藏集的AppBar背景色同主页选中色。
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
||||
- `2020-4-19`
|
||||
|
||||
```
|
||||
optimize " 添加收录【LayoutBuilder】组件
|
||||
optimize " 添加收录【IgnorePointer】组件
|
||||
optimize " 添加收录【AbsorbPointer】组件
|
||||
optimize " 添加收录【BackdropFilter】组件
|
||||
```
|
||||
29
analysis_options.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
# This file configures the analyzer, which statically analyzes Dart code to
|
||||
# check for errors, warnings, and lints.
|
||||
#
|
||||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
||||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
||||
# invoked from the command line by running `flutter analyze`.
|
||||
|
||||
# The following line activates a set of recommended lints for Flutter apps,
|
||||
# packages, and plugins designed to encourage good coding practices.
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
linter:
|
||||
# The lint rules applied to this project can be customized in the
|
||||
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
||||
# included above or to enable additional rules. A list of all available lints
|
||||
# and their documentation is published at
|
||||
# https://dart-lang.github.io/linter/lints/index.html.
|
||||
#
|
||||
# Instead of disabling a lint rule for the entire project in the
|
||||
# section below, it can also be suppressed for a single line of code
|
||||
# or a specific dart file by using the `// ignore: name_of_lint` and
|
||||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
||||
# producing the lint.
|
||||
rules:
|
||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
5
android/.gitignore
vendored
@@ -4,5 +4,8 @@ gradle-wrapper.jar
|
||||
/gradlew
|
||||
/gradlew.bat
|
||||
/local.properties
|
||||
/key.properties
|
||||
GeneratedPluginRegistrant.java
|
||||
|
||||
# Remember to never publicly share your keystore.
|
||||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||
key.properties
|
||||
|
||||
@@ -25,12 +25,6 @@ apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
//add------------------start
|
||||
def keystorePropertiesFile = rootProject.file("key.properties")
|
||||
def keystoreProperties = new Properties()
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
//add------------------end
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
|
||||
@@ -44,27 +38,18 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "com.toly1994.flutter_unit"
|
||||
applicationId "com.example.flutter_unit"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
keyAlias keystoreProperties['keyAlias']
|
||||
keyPassword keystoreProperties['keyPassword']
|
||||
storeFile file(keystoreProperties['storeFile'])
|
||||
storePassword keystoreProperties['storePassword']
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.release
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -75,7 +60,4 @@ flutter {
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test:runner:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.toly1994.flutter_unit">
|
||||
package="com.example.flutter_unit">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.toly1994.flutter_unit">
|
||||
package="com.example.flutter_unit">
|
||||
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
|
||||
calls FlutterMain.startInitialization(this); in its onCreate method.
|
||||
In most cases you can leave this as-is, but you if you want to provide
|
||||
@@ -7,8 +7,8 @@
|
||||
FlutterApplication and put your custom class here. -->
|
||||
<application
|
||||
android:name="io.flutter.app.FlutterApplication"
|
||||
android:label="FlutterUnit"
|
||||
android:icon="@mipmap/logo">
|
||||
android:label="flutter_unit"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:launchMode="singleTop"
|
||||
@@ -16,6 +16,23 @@
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<!-- Displays an Android View that continues showing the launch screen
|
||||
Drawable until Flutter paints its first frame, then this splash
|
||||
screen fades out. A splash screen is useful to avoid any visual
|
||||
gap between the end of Android's launch screen and the painting of
|
||||
Flutter's first frame. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||
android:resource="@drawable/launch_background"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.example.flutter_unit
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.toly1994.flutter_unit
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.plugins.GeneratedPluginRegistrant
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
|
||||
GeneratedPluginRegistrant.registerWith(flutterEngine);
|
||||
}
|
||||
}
|
||||
12
android/app/src/main/res/drawable-v21/launch_background.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
||||
18
android/app/src/main/res/values-night/styles.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,8 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">@android:color/white</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.toly1994.flutter_unit">
|
||||
package="com.example.flutter_unit">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
storePassword=toly1994
|
||||
keyPassword=toly1994
|
||||
keyAlias=key
|
||||
storeFile=/Volumes/coder/file/key/toly.jks
|
||||
@@ -1,15 +1,11 @@
|
||||
include ':app'
|
||||
|
||||
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
|
||||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
|
||||
def properties = new Properties()
|
||||
|
||||
def plugins = new Properties()
|
||||
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
|
||||
if (pluginsFile.exists()) {
|
||||
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
|
||||
}
|
||||
assert localPropertiesFile.exists()
|
||||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
|
||||
|
||||
plugins.each { name, path ->
|
||||
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
|
||||
include ":$name"
|
||||
project(":$name").projectDir = pluginDirectory
|
||||
}
|
||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
||||
|
||||
BIN
assets/fonts/CHOPS.TTF
Normal file
@@ -3,25 +3,26 @@ import 'dart:io';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
main() async{
|
||||
var fontName ='TolyIcon';
|
||||
var resDir="assets/iconfont";//资源文件夹
|
||||
var outFile='lib/app/style/$fontName.dart';//输出文件地址
|
||||
String fontName ='TolyIcon';
|
||||
String fileName ='toly_icon';
|
||||
String resDir="assets/iconfont";//资源文件夹
|
||||
String outFile='lib/app/res/$fileName.dart';//输出文件地址
|
||||
|
||||
var result = """import 'package:flutter/widgets.dart';
|
||||
String result = """import 'package:flutter/widgets.dart';
|
||||
//Power By 张风捷特烈--- Generated file. Do not edit.
|
||||
|
||||
class $fontName {
|
||||
|
||||
$fontName._();
|
||||
""";
|
||||
var fileCss = File(path.join(Directory.current.path,"$resDir/iconfont.css"));
|
||||
File fileCss = File(path.join(Directory.current.path,"$resDir/iconfont.css"));
|
||||
if (! await fileCss.exists()) return;
|
||||
|
||||
var read = await fileCss.readAsString();
|
||||
var split = read.split(".icon-");
|
||||
String read = await fileCss.readAsString();
|
||||
List<String> split = read.split(".icon-");
|
||||
split.forEach((str) {
|
||||
if (str.contains("before")) {
|
||||
var split = str.split(":");
|
||||
List<String> split = str.split(":");
|
||||
result += "static const IconData " +
|
||||
split[0].replaceAll("-", "_") +
|
||||
" = const IconData(" +
|
||||
@@ -32,13 +33,13 @@ class $fontName {
|
||||
result+="}";
|
||||
fileCss.delete();//删除css文件
|
||||
|
||||
var fileOut = File(path.join(Directory.current.path,"$outFile"));
|
||||
File fileOut = File(path.join(Directory.current.path,"$outFile"));
|
||||
if(! await fileOut.exists()){
|
||||
await fileOut.create(recursive: true);
|
||||
}
|
||||
fileOut.writeAsString(result);//将代码写入dart文件
|
||||
|
||||
var config="""
|
||||
String config="""
|
||||
fonts:
|
||||
- family: $fontName
|
||||
fonts:
|
||||
|
||||
BIN
assets/images/anim_draw.webp
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
assets/images/base_draw.webp
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 162 KiB |
BIN
assets/images/caver.webp
Normal file
|
After Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 24 KiB |
BIN
assets/images/dart.webp
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
assets/images/draw_bg3.webp
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
assets/images/draw_bg4.webp
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
assets/images/flutter.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 22 KiB |
BIN
assets/images/head_icon/icon_5.webp
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 23 KiB |
BIN
assets/images/head_icon/icon_6.webp
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 25 KiB |
BIN
assets/images/head_icon/icon_7.webp
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 18 KiB |
BIN
assets/images/head_icon/icon_8.webp
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 46 KiB |
BIN
assets/images/icon_head.webp
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 12 KiB |
BIN
assets/images/java.webp
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
BIN
assets/images/kotlin.webp
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 27 KiB |
BIN
assets/images/leaf.webp
Normal file
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 314 KiB |
BIN
assets/images/sabar.webp
Normal file
|
After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 144 KiB |
BIN
assets/images/sabar_bar.webp
Normal file
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 27 KiB |
BIN
assets/images/wechat.webp
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 173 KiB |
|
Before Width: | Height: | Size: 26 KiB |
BIN
assets/images/widgets/ActionChip.webp
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 11 KiB |
BIN
assets/images/widgets/Banner.webp
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 11 KiB |
BIN
assets/images/widgets/Card.webp
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 19 KiB |
BIN
assets/images/widgets/CheckBoxListTile.webp
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 29 KiB |
BIN
assets/images/widgets/Chip.webp
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 29 KiB |
BIN
assets/images/widgets/ChoiceChip.webp
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 10 KiB |
BIN
assets/images/widgets/Container.webp
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 28 KiB |
BIN
assets/images/widgets/FilterChip.webp
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 21 KiB |
BIN
assets/images/widgets/FlutterLogo.webp
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 12 KiB |
BIN
assets/images/widgets/GridTile.webp
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 14 KiB |
BIN
assets/images/widgets/GridTileBar.webp
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 19 KiB |
BIN
assets/images/widgets/Icon.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 29 KiB |
BIN
assets/images/widgets/ImageIcon.webp
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 25 KiB |
BIN
assets/images/widgets/InputChip.webp
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 12 KiB |
BIN
assets/images/widgets/ListTile.webp
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 17 KiB |
BIN
assets/images/widgets/RadioListTile.webp
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 17 KiB |
BIN
assets/images/widgets/SwitchListTile.webp
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 17 KiB |
BIN
assets/images/widgets/Text.webp
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 12 KiB |
BIN
assets/images/widgets/UserAccountsDrawerHeader.webp
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 24 KiB |
BIN
assets/images/widgets/Visibility.webp
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 94 KiB |
BIN
assets/images/wy_200x300.webp
Normal file
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 61 KiB |
BIN
assets/images/wy_300x200.webp
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 20 KiB |
BIN
assets/images/wy_300x200_filter.webp
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 12 KiB |