File tree 12 files changed +164
-10
lines changed
ProxyWidget/PrimaryScrollController
CupertinoFullscreenDialogTransition
12 files changed +164
-10
lines changed Original file line number Diff line number Diff line change @@ -54,10 +54,10 @@ android {
54
54
55
55
signingConfigs {
56
56
release {
57
- // keyAlias keystoreProperties['keyAlias']
58
- // keyPassword keystoreProperties['keyPassword']
59
- // storeFile file(keystoreProperties['storeFile'])
60
- // storePassword keystoreProperties['storePassword']
57
+ keyAlias keystoreProperties[' keyAlias' ]
58
+ keyPassword keystoreProperties[' keyPassword' ]
59
+ storeFile file(keystoreProperties[' storeFile' ])
60
+ storePassword keystoreProperties[' storePassword' ]
61
61
}
62
62
}
63
63
buildTypes {
Original file line number Diff line number Diff line change
1
+ storePassword =toly1994
2
+ keyPassword =toly1994328
3
+ keyAlias = king
4
+ storeFile =/Users/mac/Coder/files/key/toly1994.jks
Original file line number Diff line number Diff line change @@ -11,9 +11,6 @@ import 'package:flutter_unit/repositories/rep/category_repository.dart';
11
11
import 'package:sqflite/sqflite.dart' ;
12
12
13
13
14
-
15
-
16
-
17
14
/// create by 张风捷特烈 on 2020-04-21
18
15
/// contact me by email [email protected]
19
16
/// 说明:
Original file line number Diff line number Diff line change
1
+ import 'package:flutter/material.dart' ;
2
+
3
+ /// create by 张风捷特烈 on 2020/3/31
4
+ /// contact me by email [email protected]
5
+ ///
6
+ /// 说明: 335 PrimaryScrollController 5 初始滑动控制器 它是 InheritedWidget 子类,通过 context 向子树中的可滑动视图提供默认的 ScrollController 对象。
7
+ // {
8
+ // "widgetId": 335,
9
+ // "name": 'PrimaryScrollController 介绍',
10
+ // "priority": 1,
11
+ // "subtitle":
12
+ // "【controller】 : 滑动控制器 【ScrollController】\n"
13
+ // "【child】 : 子组件 【Widget】",
14
+ // }
15
+ class PrimaryScrollControllerDemo extends StatelessWidget {
16
+ final String info =
17
+ 'PrimaryScrollController 是 InheritedWidget 子类,也就说明它可以为子树组件提供某些默认数据,'
18
+ '子树可以通过 context 来获取上层该组件的提供 ScrollController 对象。\n '
19
+ '对于一些可滑动组件 ScrollView、SingleChildScrollView、NestedScrollView 等,'
20
+ '在使用者未提供 ScrollController 时,且 primary 属性为 true 时(默认true) ,'
21
+ '会使用上层 PrimaryScrollController 组件提供的滑动控制器。\n '
22
+ '使用 MaterialApp 组件,其已经内置 PrimaryScrollController,' ;
23
+
24
+ @override
25
+ Widget build (BuildContext context) {
26
+
27
+ ScrollController label = PrimaryScrollController .of (context);
28
+
29
+ return Container (
30
+ color: Colors .blue.withOpacity (0.1 ),
31
+ padding: EdgeInsets .all (10 ),
32
+ margin: EdgeInsets .all (10 ),
33
+ child: Text (info+ "当前其持有的滑动控制器对象: $label " ),
34
+ );
35
+ }
36
+ }
Original file line number Diff line number Diff line change
1
+ import 'package:flutter/cupertino.dart' ;
2
+ import 'package:flutter/material.dart' ;
3
+
1
4
2
5
/// create by 张风捷特烈 on 2020-03-25
3
6
/// contact me by email [email protected]
11
14
// "【actions】 : 行为组件集 【List<Widget>】\n"
12
15
// "【previewBuilder】 : 动画构造器 【ContextMenuPreviewBuilder】",
13
16
// }
14
- import 'package:flutter/cupertino.dart' ;
15
- import 'package:flutter/material.dart' ;
16
-
17
17
class CustomCupertinoContextMenu extends StatelessWidget {
18
18
@override
19
19
Widget build (BuildContext context) {
Original file line number Diff line number Diff line change
1
+ import 'package:flutter/cupertino.dart' ;
2
+ import 'package:flutter/material.dart' ;
3
+ /// create by 张风捷特烈 on 2020/4/11
4
+ /// contact me by email [email protected]
5
+ ///
6
+ /// 说明: 219 CupertinoFullscreenDialogTransition 0 全页面过渡变换 创建一个 iOS 风格的转换,用于唤出全屏对话框。link 216
7
+ // {
8
+ // "widgetId": 219,
9
+ // "name": '组件介绍',
10
+ // "priority": 1,
11
+ // "subtitle":
12
+ // "【child】 : 子组件 【Widget】\n"
13
+ // "【linearTransition】 : 是否线性转换 【bool】\n"
14
+ // "【primaryRouteAnimation】 : 初始路由动画 【Animation<double>】\n"
15
+ // "【secondaryRouteAnimation】 : 第二路由动画 【Animation<double>】",
16
+ // }
17
+
18
+ class CupertinoFullscreenDialogTransitionDemo extends StatelessWidget {
19
+ final String info =
20
+ '和 CupertinoPageTransition 一样,该组件底层基于 SlideTransition 组件实现,'
21
+ '主要用途是模仿 iOS 风格,用于唤出全屏对话框动画过渡效果。'
22
+ '源码中唯一的使用处是 CupertinoPageRoute 处理路由跳转动画时,一般不会单独使用。'
23
+ '当【route.fullscreenDialog】为 true 时,会使用 CupertinoFullscreenDialogTransition 组件,否则使用 CupertinoPageTransition 组件。'
24
+ '其中个属性信息和 CupertinoPageTransition 组件一致,详见之。' ;
25
+
26
+ @override
27
+ Widget build (BuildContext context) {
28
+ return Container (
29
+ color: Colors .blue.withOpacity (0.1 ),
30
+ padding: EdgeInsets .all (10 ),
31
+ margin: EdgeInsets .all (10 ),
32
+ child: Text (info),
33
+ );
34
+ }
35
+ }
Original file line number Diff line number Diff line change
1
+ import 'package:flutter/cupertino.dart' ;
2
+ import 'package:flutter/material.dart' ;
3
+
4
+ /// create by 张风捷特烈 on 2020/4/11
5
+ /// contact me by email [email protected]
6
+ ///
7
+ /// 说明: 216 CupertinoPageTransition 0 风格的页面过渡动画变换 提供一个 iOS 风格的页面过渡动画。 link 219
8
+ // {
9
+ // "widgetId": 216,
10
+ // "name": 'CupertinoPageTransition 介绍',
11
+ // "priority": 1,
12
+ // "subtitle":
13
+ // "【child】 : 子组件 【Widget】\n"
14
+ // "【linearTransition】 : 是否线性转换 【bool】\n"
15
+ // "【primaryRouteAnimation】 : 初始路由动画 【Animation<double>】\n"
16
+ // "【secondaryRouteAnimation】 : 第二路由动画 【Animation<double>】",
17
+ // }
18
+ class CupertinoPageTransitionDemo extends StatelessWidget {
19
+ final String info =
20
+ '该组件底层基于 SlideTransition 组件实现,主要用途是模仿 iOS 风格,处理页面间跳转的过渡动画。'
21
+ '源码中唯一的使用处是 CupertinoPageRoute 处理路由跳转动画时,一般不会单独使用。'
22
+ '如 A 跳转到 B, primaryRouteAnimation 和 secondaryRouteAnimation 都是一个 0.0->1.0 的动画,'
23
+ '前者用于处理 B 界面进入过渡动画;后者用于处理 A 界面被覆盖的过渡动画。'
24
+ ;
25
+
26
+ @override
27
+ Widget build (BuildContext context) {
28
+ return Container (
29
+ color: Colors .blue.withOpacity (0.1 ),
30
+ padding: EdgeInsets .all (10 ),
31
+ margin: EdgeInsets .all (10 ),
32
+ child: Text (info ),
33
+ );
34
+ }
35
+ }
Original file line number Diff line number Diff line change
1
+ import 'package:flutter/cupertino.dart' ;
2
+ import 'package:flutter/material.dart' ;
3
+
4
+ /// create by 张风捷特烈 on 2020/4/11
5
+ /// contact me by email [email protected]
6
+ ///
7
+ /// 说明: 213 HtmlElementView 0 在 Flutter Web 的 Widget 层次结构中嵌入一个 HTML 元素。
8
+ // {
9
+ // "widgetId": 213,
10
+ // "name": 'HtmlElementView 介绍',
11
+ // "priority": 1,
12
+ // "subtitle":
13
+ // "【child】 : 子组件 【child】\n"
14
+ // "【viewType】 : html元素唯一表识 【String】",
15
+ // }
16
+ class HtmlElementViewDemo extends StatelessWidget {
17
+ final String info =
18
+ '该组件只能用于 Flutter Web 中,嵌入 Html 元素的较为昂贵。'
19
+ '内部基于 PlatformViewLink 和 PlatformViewSurface 组件实现。' ;
20
+
21
+ @override
22
+ Widget build (BuildContext context) {
23
+ return Container (
24
+ color: Colors .blue.withOpacity (0.1 ),
25
+ padding: EdgeInsets .all (10 ),
26
+ margin: EdgeInsets .all (10 ),
27
+ child: Text (info),
28
+ );
29
+ }
30
+ }
Original file line number Diff line number Diff line change @@ -33,3 +33,4 @@ export '../ProxyWidget/InheritedTheme/node1_base.dart';
33
33
export '../ProxyWidget/DefaultAssetBundle/node1_base.dart' ;
34
34
export '../ProxyWidget/InheritedWidget/node1_base.dart' ;
35
35
export '../ProxyWidget/ParentDataWidget/node1_base.dart' ;
36
+ export '../ProxyWidget/PrimaryScrollController/node1_base.dart' ;
Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ export '../StatelessWidget/MaterialBanner/node1_one_btn.dart';
33
33
export '../StatelessWidget/MaterialBanner/node2_two_btn.dart' ;
34
34
export '../StatelessWidget/SafeArea/node1_base.dart' ;
35
35
36
+ export '../StatelessWidget/CupertinoFullscreenDialogTransition/node1_base.dart' ;
37
+ export '../StatelessWidget/CupertinoPageTransition/node1_base.dart' ;
38
+ export '../StatelessWidget/HtmlElementView/node1_base.dart' ;
39
+
36
40
export '../StatelessWidget/DataTable/node1_base.dart' ;
37
41
export '../StatelessWidget/DataTable/node2_operation.dart' ;
38
42
export '../StatelessWidget/OrientationBuilder/node1_base.dart' ;
Original file line number Diff line number Diff line change @@ -33,6 +33,18 @@ class WidgetsMap {
33
33
case "CompositedTransformFollower" :
34
34
return [
35
35
const CompositedTransformFollowerDemo (),
36
+ ]; case "PrimaryScrollController" :
37
+ return [
38
+ PrimaryScrollControllerDemo (),
39
+ ];case "CupertinoFullscreenDialogTransition" :
40
+ return [
41
+ CupertinoFullscreenDialogTransitionDemo (),
42
+ ];case "CupertinoPageTransition" :
43
+ return [
44
+ CupertinoPageTransitionDemo (),
45
+ ];case "HtmlElementView" :
46
+ return [
47
+ HtmlElementViewDemo (),
36
48
];
37
49
case "Text" :
38
50
return [
You can’t perform that action at this time.
0 commit comments