forked from toly1994328/FlutterUnit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ 添加CupertinoFullscreenDialogTransition、CupertinoPageTransition、HtmlE…
…lementView、PrimaryScrollController 组件介绍
- Loading branch information
1 parent
d94799c
commit e514824
Showing
12 changed files
with
164 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
storePassword=toly1994 | ||
keyPassword=toly1994328 | ||
keyAlias= king | ||
storeFile=/Users/mac/Coder/files/key/toly1994.jks |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,6 @@ import 'package:flutter_unit/repositories/rep/category_repository.dart'; | |
import 'package:sqflite/sqflite.dart'; | ||
|
||
|
||
|
||
|
||
|
||
/// create by 张风捷特烈 on 2020-04-21 | ||
/// contact me by email [email protected] | ||
/// 说明: | ||
|
36 changes: 36 additions & 0 deletions
36
lib/views/widgets/ProxyWidget/PrimaryScrollController/node1_base.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
/// create by 张风捷特烈 on 2020/3/31 | ||
/// contact me by email [email protected] | ||
/// | ||
/// 说明: 335 PrimaryScrollController 5 初始滑动控制器 它是 InheritedWidget 子类,通过 context 向子树中的可滑动视图提供默认的 ScrollController 对象。 | ||
// { | ||
// "widgetId": 335, | ||
// "name": 'PrimaryScrollController 介绍', | ||
// "priority": 1, | ||
// "subtitle": | ||
// "【controller】 : 滑动控制器 【ScrollController】\n" | ||
// "【child】 : 子组件 【Widget】", | ||
// } | ||
class PrimaryScrollControllerDemo extends StatelessWidget { | ||
final String info = | ||
'PrimaryScrollController 是 InheritedWidget 子类,也就说明它可以为子树组件提供某些默认数据,' | ||
'子树可以通过 context 来获取上层该组件的提供 ScrollController 对象。\n' | ||
'对于一些可滑动组件 ScrollView、SingleChildScrollView、NestedScrollView 等,' | ||
'在使用者未提供 ScrollController 时,且 primary 属性为 true 时(默认true) ,' | ||
'会使用上层 PrimaryScrollController 组件提供的滑动控制器。\n' | ||
'使用 MaterialApp 组件,其已经内置 PrimaryScrollController,'; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
|
||
ScrollController label = PrimaryScrollController.of(context); | ||
|
||
return Container( | ||
color: Colors.blue.withOpacity(0.1), | ||
padding: EdgeInsets.all(10), | ||
margin: EdgeInsets.all(10), | ||
child: Text(info+"当前其持有的滑动控制器对象: $label"), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
|
||
/// create by 张风捷特烈 on 2020-03-25 | ||
/// contact me by email [email protected] | ||
|
@@ -11,9 +14,6 @@ | |
// "【actions】 : 行为组件集 【List<Widget>】\n" | ||
// "【previewBuilder】 : 动画构造器 【ContextMenuPreviewBuilder】", | ||
// } | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class CustomCupertinoContextMenu extends StatelessWidget { | ||
@override | ||
Widget build(BuildContext context) { | ||
|
35 changes: 35 additions & 0 deletions
35
lib/views/widgets/StatelessWidget/CupertinoFullscreenDialogTransition/node1_base.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter/material.dart'; | ||
/// create by 张风捷特烈 on 2020/4/11 | ||
/// contact me by email [email protected] | ||
/// | ||
/// 说明: 219 CupertinoFullscreenDialogTransition 0 全页面过渡变换 创建一个 iOS 风格的转换,用于唤出全屏对话框。link 216 | ||
// { | ||
// "widgetId": 219, | ||
// "name": '组件介绍', | ||
// "priority": 1, | ||
// "subtitle": | ||
// "【child】 : 子组件 【Widget】\n" | ||
// "【linearTransition】 : 是否线性转换 【bool】\n" | ||
// "【primaryRouteAnimation】 : 初始路由动画 【Animation<double>】\n" | ||
// "【secondaryRouteAnimation】 : 第二路由动画 【Animation<double>】", | ||
// } | ||
|
||
class CupertinoFullscreenDialogTransitionDemo extends StatelessWidget { | ||
final String info = | ||
'和 CupertinoPageTransition 一样,该组件底层基于 SlideTransition 组件实现,' | ||
'主要用途是模仿 iOS 风格,用于唤出全屏对话框动画过渡效果。' | ||
'源码中唯一的使用处是 CupertinoPageRoute 处理路由跳转动画时,一般不会单独使用。' | ||
'当【route.fullscreenDialog】为 true 时,会使用 CupertinoFullscreenDialogTransition 组件,否则使用 CupertinoPageTransition 组件。' | ||
'其中个属性信息和 CupertinoPageTransition 组件一致,详见之。'; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
color: Colors.blue.withOpacity(0.1), | ||
padding: EdgeInsets.all(10), | ||
margin: EdgeInsets.all(10), | ||
child: Text(info), | ||
); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
lib/views/widgets/StatelessWidget/CupertinoPageTransition/node1_base.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
/// create by 张风捷特烈 on 2020/4/11 | ||
/// contact me by email [email protected] | ||
/// | ||
/// 说明: 216 CupertinoPageTransition 0 风格的页面过渡动画变换 提供一个 iOS 风格的页面过渡动画。 link 219 | ||
// { | ||
// "widgetId": 216, | ||
// "name": 'CupertinoPageTransition 介绍', | ||
// "priority": 1, | ||
// "subtitle": | ||
// "【child】 : 子组件 【Widget】\n" | ||
// "【linearTransition】 : 是否线性转换 【bool】\n" | ||
// "【primaryRouteAnimation】 : 初始路由动画 【Animation<double>】\n" | ||
// "【secondaryRouteAnimation】 : 第二路由动画 【Animation<double>】", | ||
// } | ||
class CupertinoPageTransitionDemo extends StatelessWidget { | ||
final String info = | ||
'该组件底层基于 SlideTransition 组件实现,主要用途是模仿 iOS 风格,处理页面间跳转的过渡动画。' | ||
'源码中唯一的使用处是 CupertinoPageRoute 处理路由跳转动画时,一般不会单独使用。' | ||
'如 A 跳转到 B, primaryRouteAnimation 和 secondaryRouteAnimation 都是一个 0.0->1.0 的动画,' | ||
'前者用于处理 B 界面进入过渡动画;后者用于处理 A 界面被覆盖的过渡动画。' | ||
; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
color: Colors.blue.withOpacity(0.1), | ||
padding: EdgeInsets.all(10), | ||
margin: EdgeInsets.all(10), | ||
child: Text(info ), | ||
); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
lib/views/widgets/StatelessWidget/HtmlElementView/node1_base.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
/// create by 张风捷特烈 on 2020/4/11 | ||
/// contact me by email [email protected] | ||
/// | ||
/// 说明: 213 HtmlElementView 0 在 Flutter Web 的 Widget 层次结构中嵌入一个 HTML 元素。 | ||
// { | ||
// "widgetId": 213, | ||
// "name": 'HtmlElementView 介绍', | ||
// "priority": 1, | ||
// "subtitle": | ||
// "【child】 : 子组件 【child】\n" | ||
// "【viewType】 : html元素唯一表识 【String】", | ||
// } | ||
class HtmlElementViewDemo extends StatelessWidget { | ||
final String info = | ||
'该组件只能用于 Flutter Web 中,嵌入 Html 元素的较为昂贵。' | ||
'内部基于 PlatformViewLink 和 PlatformViewSurface 组件实现。'; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
color: Colors.blue.withOpacity(0.1), | ||
padding: EdgeInsets.all(10), | ||
margin: EdgeInsets.all(10), | ||
child: Text(info), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters