Skip to content

Commit

Permalink
[Flutter Dojo 2.0]Release
Browse files Browse the repository at this point in the history
  • Loading branch information
YWxuyisheng committed May 29, 2020
1 parent c2df9cd commit c9fa4b2
Show file tree
Hide file tree
Showing 108 changed files with 2,143 additions and 627 deletions.
2 changes: 1 addition & 1 deletion .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.0/","dependencies":[]},{"name":"share","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/share-0.6.3+5/","dependencies":[]},{"name":"shared_preferences","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.6+1/","dependencies":[]},{"name":"sqflite","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.2.0/","dependencies":[]},{"name":"url_launcher","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.4.2/","dependencies":[]}],"android":[{"name":"path_provider","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.0/","dependencies":[]},{"name":"share","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/share-0.6.3+5/","dependencies":[]},{"name":"shared_preferences","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.6+1/","dependencies":[]},{"name":"sqflite","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.2.0/","dependencies":[]},{"name":"url_launcher","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.4.2/","dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+4/","dependencies":[]},{"name":"sqflite","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.2.0/","dependencies":[]},{"name":"url_launcher_macos","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+4/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"shared_preferences_web","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+3/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/xuyisheng/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-0.1.1+1/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider","dependencies":[]},{"name":"share","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}],"date_created":"2020-05-23 18:35:39.463299","version":"1.17.1"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.5/","dependencies":[]},{"name":"share","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/share-0.6.3+6/","dependencies":[]},{"name":"shared_preferences","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.6+3/","dependencies":[]},{"name":"sqflite","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.0/","dependencies":[]},{"name":"url_launcher","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.4.2/","dependencies":[]}],"android":[{"name":"path_provider","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.5/","dependencies":[]},{"name":"share","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/share-0.6.3+6/","dependencies":[]},{"name":"shared_preferences","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.6+3/","dependencies":[]},{"name":"sqflite","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.0/","dependencies":[]},{"name":"url_launcher","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.4.2/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4/","dependencies":[]},{"name":"shared_preferences_macos","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+6/","dependencies":[]},{"name":"sqflite","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.0/","dependencies":[]},{"name":"url_launcher_macos","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+4/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"shared_preferences_web","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+4/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/ityw/Downloads/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-0.1.1+1/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"share","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}],"date_created":"2020-05-29 15:00:23.758292","version":"1.17.1"}
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,24 @@ flutter_dojo主要分为下面几个部分:Widgets、UI Pattern、Develop UI K

[Github Actions APK download](https://github.com/xuyisheng/flutter_dojo/releases)

# flutter_dojo 2.0 Release

flutter_dojo 2.0经过一段时间的开发和总结,总算Release了,2.0版本主要做了下面这些改变。

- Pattern重新设计了分类类型,让新的聚合方式更加合理
- 整合了一些重复的Demo
- 新增了搜索功能,支持全部组件的检索,模糊匹配
- 新增了大量的Widget演示和Pattern功能设计
- 修复了代码查看的一些bug
- 修复了大量设计上的适配问题
- 修复了issue中提到的一些bug

2.0之后,flutter_dojo收录了Flutter官方所有的自带Widget,以及App开发中常用的UI组件和功能,总计370+组件,几乎所有的开发需求,在这里,都能找到答案。

Enjoy your self and have fun.

> 搜索功能由 @lzr2005987 提供,https://github.com/lzr2005987 感谢lzr2005987的PR
## 设计思路

flutter_dojo的设计主要围绕下面三个部分展开:
Expand Down Expand Up @@ -106,6 +124,12 @@ Flutter不仅仅是一个UI跨平台框架,同样是一个完整的APP开发

<img src="resource/51.png" width="240px"/>

## 搜索功能

<img src="resource/32.png" width="240px"/>

搜索界面

## 协作

虽然该项目已基本成型,但很多内容还需要进一步的完善,特别是归纳部分,有很多地方还是很不完善的,甚至有一些代码还未实现,需要进一步优化和实现。
Expand Down
13 changes: 0 additions & 13 deletions lib/category/animation/infomationdisplay/customhero.dart

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,7 @@ class ParentState extends State<Parent> with TickerProviderStateMixin {
void initState() {
super.initState();
controller = AnimationController(duration: const Duration(seconds: 2), vsync: this);
growingAnimation =
Tween(begin: 10.0, end: 100.0).animate(CurvedAnimation(parent: controller, curve: Curves.easeIn));
growingAnimation = Tween(begin: 10.0, end: 100.0).animate(CurvedAnimation(parent: controller, curve: Curves.easeIn));
animation = Tween(begin: -0.25, end: 0.0).animate(CurvedAnimation(
parent: controller,
curve: Curves.easeIn,
Expand All @@ -570,19 +569,19 @@ class ParentState extends State<Parent> with TickerProviderStateMixin {
return AnimatedBuilder(
animation: controller,
builder: (BuildContext context, Widget child) {
return new Scaffold(
body: new Align(
return Scaffold(
body: Align(
alignment: Alignment.center,
child: new Container(
child: new Center(
child: new ListView(shrinkWrap: true, children: <Widget>[
child: Container(
child: Center(
child: ListView(shrinkWrap: true, children: <Widget>[
Transform(
transform: Matrix4.translationValues(animation.value * width, 0.0, 0.0),
child: Center(
child: AnimatedBuilder(
animation: growingAnimation,
builder: (BuildContext context, Widget child) {
return new Center(
return Center(
child: Container(
height: growingAnimation.value,
width: growingAnimation.value * 2,
Expand All @@ -596,8 +595,8 @@ class ParentState extends State<Parent> with TickerProviderStateMixin {
0.0,
0.0,
),
child: new Center(
child: new Container(
child: Center(
child: Container(
padding: const EdgeInsets.only(top: 16.0),
child: Container(
width: 200.0,
Expand Down
124 changes: 124 additions & 0 deletions lib/category/animation/informationdisplay/customhero.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
import 'package:flutter/material.dart';

const String HERO_TAG = 'tag_detail';

class CustomHeroWidget extends StatefulWidget {
@override
_CustomHeroWidgetState createState() => _CustomHeroWidgetState();
}

class _CustomHeroWidgetState extends State<CustomHeroWidget> {
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
GestureDetector(
onTap: () {
Navigator.push(
context,
PageRouteBuilder(
opaque: false,
pageBuilder: (BuildContext context, anim1, anim2) {
return DetailPage();
},
transitionDuration: Duration(milliseconds: 3000),
transitionsBuilder: buildTransitionSlide,
),
);
},
child: Hero(
tag: HERO_TAG,
child: Image.asset(
'images/book.jpg',
width: 100,
),
placeholderBuilder: (context, size, child) {
return Opacity(
opacity: 0.2,
child: child,
);
},
createRectTween: (begin, end) {
return MaterialRectArcTween(begin: begin, end: end);
},
),
),
],
);
}

Widget buildTransitionSlide(context, anim1, anim2, Widget child) {
var begin = Offset(1.0, 0.0);
var end = Offset.zero;
var tween = Tween(begin: begin, end: end).chain(CurveTween(curve: Curves.easeOut));

return SlideTransition(
position: tween.animate(anim1),
child: child,
);
}
}

class DetailPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Stack(
children: <Widget>[
Image.asset('images/book1.jpeg'),
Positioned(
bottom: 0,
right: 0,
child: Hero(
tag: HERO_TAG,
child: Image.asset(
'images/book.jpg',
width: 100,
),
flightShuttleBuilder: (
BuildContext flightContext,
Animation<double> animation,
HeroFlightDirection flightDirection,
BuildContext fromHeroContext,
BuildContext toHeroContext,
) {
final Hero toHero = toHeroContext.widget;
return ScaleTransition(
scale: animation.drive(
Tween<double>(begin: 0.0, end: 1.0).chain(
CurveTween(
curve: Interval(0.0, 1.0, curve: Curves.easeIn),
),
),
),
child: flightDirection == HeroFlightDirection.push
? RotationTransition(
turns: animation,
child: toHero.child,
)
: FadeTransition(
opacity: animation.drive(
Tween<double>(begin: 0.0, end: 1.0).chain(
CurveTween(
curve: Interval(0.0, 1.0, curve: Curves.easeIn),
),
),
),
child: toHero.child,
),
);
},
),
),
],
),
SizedBox(height: 24),
Text('My Book 《Android群英传》' * 20),
],
),
);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:async';

import 'package:flutter/material.dart';

enum ScoreWidgetStatus { HIDDEN, BECOMING_VISIBLE, VISIBLE, BECOMING_INVISIBLE }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,7 @@ class FoldableOptions extends StatefulWidget {
}

class _FoldableOptionsState extends State<FoldableOptions> with SingleTickerProviderStateMixin {
final List<IconData> options = [
Icons.folder,
Icons.share,
Icons.visibility_off,
Icons.star_border,
Icons.notifications_none
];
final List<IconData> options = [Icons.folder, Icons.share, Icons.visibility_off, Icons.star_border, Icons.notifications_none];

Animation<Alignment> firstAnim;
Animation<Alignment> secondAnim;
Expand Down Expand Up @@ -114,9 +108,7 @@ class _FoldableOptionsState extends State<FoldableOptions> with SingleTickerProv
),
Align(
alignment: secondAnim.value,
child: Container(
padding: EdgeInsets.only(left: 50, top: verticalPadding.value),
child: getItem(options.elementAt(1)))),
child: Container(padding: EdgeInsets.only(left: 50, top: verticalPadding.value), child: getItem(options.elementAt(1)))),
Align(alignment: thirdAnim.value, child: getItem(options.elementAt(2))),
Align(
alignment: fourthAnim.value,
Expand All @@ -131,8 +123,7 @@ class _FoldableOptionsState extends State<FoldableOptions> with SingleTickerProv
onTap: () {
controller.isCompleted ? controller.reverse() : controller.forward();
},
child:
buildPrimaryItem(controller.isCompleted || controller.isAnimating ? Icons.close : Icons.add)),
child: buildPrimaryItem(controller.isCompleted || controller.isAnimating ? Icons.close : Icons.add)),
)
],
);
Expand Down
Loading

0 comments on commit c9fa4b2

Please sign in to comment.