-
-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c2df9cd
commit c9fa4b2
Showing
108 changed files
with
2,143 additions
and
627 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
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"} |
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 was deleted.
Oops, something went wrong.
File renamed without changes.
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
124 changes: 124 additions & 0 deletions
124
lib/category/animation/informationdisplay/customhero.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,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), | ||
], | ||
), | ||
); | ||
} | ||
} |
2 changes: 0 additions & 2 deletions
2
...ry/animation/infomationdisplay/favor.dart → ...y/animation/informationdisplay/favor.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
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
File renamed without changes.
Oops, something went wrong.