首页下载资源移动开发灵活且易于使用的页面转换

ZIP灵活且易于使用的页面转换

qq_36040764327.26KB需要积分:1

资源文件列表:

flutter_villains-master.zip 大约有133个文件
  1. flutter_villains-master/
  2. flutter_villains-master/.gitignore 261B
  3. flutter_villains-master/.travis.yml 492B
  4. flutter_villains-master/CHANGELOG.md 72B
  5. flutter_villains-master/LICENSE 1.05KB
  6. flutter_villains-master/README.md 6.15KB
  7. flutter_villains-master/assets/
  8. flutter_villains-master/assets/icons8-joker-suicide-squad-96.png 3.7KB
  9. flutter_villains-master/example/
  10. flutter_villains-master/example/.gitignore 65B
  11. flutter_villains-master/example/.idea/
  12. flutter_villains-master/example/.idea/libraries/
  13. flutter_villains-master/example/.idea/libraries/Dart_Packages.xml 19.97KB
  14. flutter_villains-master/example/.idea/libraries/Dart_SDK.xml 1.67KB
  15. flutter_villains-master/example/.idea/libraries/Flutter_Plugins.xml 173B
  16. flutter_villains-master/example/.idea/misc.xml 172B
  17. flutter_villains-master/example/.idea/modules.xml 372B
  18. flutter_villains-master/example/.idea/runConfigurations/
  19. flutter_villains-master/example/.idea/runConfigurations/main_dart.xml 271B
  20. flutter_villains-master/example/.idea/workspace.xml 13.69KB
  21. flutter_villains-master/example/.metadata 284B
  22. flutter_villains-master/example/README.md 149B
  23. flutter_villains-master/example/android/
  24. flutter_villains-master/example/android/.gitignore 136B
  25. flutter_villains-master/example/android/app/
  26. flutter_villains-master/example/android/app/build.gradle 1.51KB
  27. flutter_villains-master/example/android/app/src/
  28. flutter_villains-master/example/android/app/src/main/
  29. flutter_villains-master/example/android/app/src/main/AndroidManifest.xml 1.94KB
  30. flutter_villains-master/example/android/app/src/main/java/
  31. flutter_villains-master/example/android/app/src/main/java/com/
  32. flutter_villains-master/example/android/app/src/main/java/com/yourcompany/
  33. flutter_villains-master/example/android/app/src/main/java/com/yourcompany/examples/
  34. flutter_villains-master/example/android/app/src/main/java/com/yourcompany/examples/MainActivity.java 370B
  35. flutter_villains-master/example/android/app/src/main/res/
  36. flutter_villains-master/example/android/app/src/main/res/drawable/
  37. flutter_villains-master/example/android/app/src/main/res/drawable/launch_background.xml 434B
  38. flutter_villains-master/example/android/app/src/main/res/mipmap-hdpi/
  39. flutter_villains-master/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png 544B
  40. flutter_villains-master/example/android/app/src/main/res/mipmap-mdpi/
  41. flutter_villains-master/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png 442B
  42. flutter_villains-master/example/android/app/src/main/res/mipmap-xhdpi/
  43. flutter_villains-master/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png 721B
  44. flutter_villains-master/example/android/app/src/main/res/mipmap-xxhdpi/
  45. flutter_villains-master/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png 1.01KB
  46. flutter_villains-master/example/android/app/src/main/res/mipmap-xxxhdpi/
  47. flutter_villains-master/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png 1.41KB
  48. flutter_villains-master/example/android/app/src/main/res/values/
  49. flutter_villains-master/example/android/app/src/main/res/values/styles.xml 361B
  50. flutter_villains-master/example/android/build.gradle 470B
  51. flutter_villains-master/example/android/gradle.properties 29B
  52. flutter_villains-master/example/android/gradle/
  53. flutter_villains-master/example/android/gradle/wrapper/
  54. flutter_villains-master/example/android/gradle/wrapper/gradle-wrapper.jar 52.38KB
  55. flutter_villains-master/example/android/gradle/wrapper/gradle-wrapper.properties 231B
  56. flutter_villains-master/example/android/gradlew 4.85KB
  57. flutter_villains-master/example/android/gradlew.bat 2.26KB
  58. flutter_villains-master/example/android/settings.gradle 484B
  59. flutter_villains-master/example/assets/
  60. flutter_villains-master/example/assets/joe-gardner.jpg 76.89KB
  61. flutter_villains-master/example/examples.iml 619B
  62. flutter_villains-master/example/examples_android.iml 1.42KB
  63. flutter_villains-master/example/ios/
  64. flutter_villains-master/example/ios/.gitignore 501B
  65. flutter_villains-master/example/ios/Flutter/
  66. flutter_villains-master/example/ios/Flutter/AppFrameworkInfo.plist 863B
  67. flutter_villains-master/example/ios/Flutter/Debug.xcconfig 30B
  68. flutter_villains-master/example/ios/Flutter/Release.xcconfig 30B
  69. flutter_villains-master/example/ios/Runner.xcodeproj/
  70. flutter_villains-master/example/ios/Runner.xcodeproj/project.pbxproj 18.22KB
  71. flutter_villains-master/example/ios/Runner.xcodeproj/project.xcworkspace/
  72. flutter_villains-master/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata 152B
  73. flutter_villains-master/example/ios/Runner.xcodeproj/xcshareddata/
  74. flutter_villains-master/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/
  75. flutter_villains-master/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme 3.25KB
  76. flutter_villains-master/example/ios/Runner.xcworkspace/
  77. flutter_villains-master/example/ios/Runner.xcworkspace/contents.xcworkspacedata 152B
  78. flutter_villains-master/example/ios/Runner/
  79. flutter_villains-master/example/ios/Runner/AppDelegate.h 103B
  80. flutter_villains-master/example/ios/Runner/AppDelegate.m 420B
  81. flutter_villains-master/example/ios/Runner/Assets.xcassets/
  82. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/
  83. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json 2.46KB
  84. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png 10.85KB
  85. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png 564B
  86. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png 1.25KB
  87. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png 1.55KB
  88. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png 1KB
  89. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png 1.68KB
  90. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png 1.88KB
  91. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png 1.25KB
  92. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png 1.85KB
  93. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png 2.6KB
  94. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png 2.6KB
  95. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png 3.74KB
  96. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png 1.84KB
  97. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png 3.22KB
  98. flutter_villains-master/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png 3.53KB
  99. flutter_villains-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/
  100. flutter_villains-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json 391B
  101. flutter_villains-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png 68B
  102. flutter_villains-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png 68B
  103. flutter_villains-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png 68B
  104. flutter_villains-master/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md 336B
  105. flutter_villains-master/example/ios/Runner/Base.lproj/
  106. flutter_villains-master/example/ios/Runner/Base.lproj/LaunchScreen.storyboard 2.32KB
  107. flutter_villains-master/example/ios/Runner/Base.lproj/Main.storyboard 1.57KB
  108. flutter_villains-master/example/ios/Runner/Info.plist 1.51KB
  109. flutter_villains-master/example/ios/Runner/main.m 227B
  110. flutter_villains-master/example/lib/
  111. flutter_villains-master/example/lib/villains1/
  112. flutter_villains-master/example/lib/villains1/gallery/
  113. flutter_villains-master/example/lib/villains1/gallery/villain_transition.dart 2.58KB
  114. flutter_villains-master/example/lib/villains1/list/
  115. flutter_villains-master/example/lib/villains1/list/list.dart 900B
  116. flutter_villains-master/example/lib/villains1/main.dart 2.26KB
  117. flutter_villains-master/example/lib/villains1/profile/
  118. flutter_villains-master/example/lib/villains1/profile/profile.dart 8.3KB
  119. flutter_villains-master/example/lib/villains1/utils.dart 25.57KB
  120. flutter_villains-master/example/pubspec.yaml 1.88KB
  121. flutter_villains-master/example/test/
  122. flutter_villains-master/example/test/widget_test.dart
  123. flutter_villains-master/flutter_villains.iml 1014B
  124. flutter_villains-master/lib/
  125. flutter_villains-master/lib/villain.dart 89B
  126. flutter_villains-master/lib/villains/
  127. flutter_villains-master/lib/villains/utils.dart 703B
  128. flutter_villains-master/lib/villains/villains.dart 14KB
  129. flutter_villains-master/media/
  130. flutter_villains-master/media/profile.gif 101.02KB
  131. flutter_villains-master/pubspec.yaml 1.69KB
  132. flutter_villains-master/test/
  133. flutter_villains-master/test/villains_test.dart 15.59KB

资源介绍:

灵活且易于使用的页面转换
[![license](https://img.shields.io/github/license/Norbert515/flutter_villains.svg)](https://github.com/Norbert515/flutter_villains/blob/master/LICENSE) [![stars](https://img.shields.io/github/stars/Norbert515/flutter_villains.svg)](https://github.com/Norbert515/flutter_villains/stargazers) [![forks](https://img.shields.io/github/forks/Norbert515/flutter_villains.svg)](https://github.com/Norbert515/flutter_villains/network/members) [![Pub](https://img.shields.io/pub/v/flutter_villains.svg)](https://pub.dartlang.org/packages/flutter_villains) [![GitHub followers](https://img.shields.io/github/followers/norbert515.svg?style=social&label=Follow)](https://github.com/Norbert515) [![Twitter Follow](https://img.shields.io/twitter/follow/norbertkozsir.svg?style=social&label=Follow)](https://twitter.com/norbertkozsir) [![Build Status](https://travis-ci.com/Norbert515/flutter_villains.svg?branch=master)](https://travis-ci.com/Norbert515/flutter_villains) ![](https://github.com/Norbert515/flutter_villains/blob/master/assets/icons8-joker-suicide-squad-96.png) # flutter_villains ### What are heroes without villains? ![profile-page](media/profile.gif "profile-page") _(Profile image from: https://unsplash.com/photos/pAs4IM6OGWI)_ _Check out the [article](https://medium.com/flutter-community/flutter-heroes-and-villains-bringing-balance-to-the-flutterverse-2e900222de41)._ ## What are villains? You keep seeing beautiful page transitions but you think to yourself those are too much work? Fear no more, villains are here to save you! When doing animations when a page transition occurs you'd usally define an `AnimationController` in the `initState()` and start it there. You'd also have to wrap your widgets in `AnimatedWidgets` to react to the `AnimationController`. Besides this being a lot of boilerplate code which clogs up you precious widgets, animating on exit isn't as trivial. Using this library you just wrap your widget you'd like to be animated when a page transition occurs in a `Villain` and everything is handled automatically. ## Installation ``` dependencies: flutter_villains: "^1.2.1" ``` Run packages get and **import**: ``` import 'package:flutter_villains/villain.dart'; ``` ### Assembling pages with style Define animations to play when a page is opened. ### Easy to use ```dart Villain( villainAnimation: VillainAnimation.fromBottom( relativeOffset: 0.4, from: Duration(milliseconds: 100), to: Duration(seconds: 1), ), animateExit: false, secondaryVillainAnimation: VillainAnimation.fade(), child: Divider( color: Colors.black, height: 32.0, ), ), ``` That's it. No `TickerProvider`s, no `AnimationController`s, no boilerplate, no worries. Remember the StaggeredAnimation tutorial? This is using [SequenceAnimation](https://github.com/Norbert515/flutter_sequence_animation) internally and there is therefore no need to specify durations as portions of a time-frame. It just works. With this basic setup the `Divider` fades in and moves up when a page transition occures (don't forget the `VillainTransitionObserver` more on that under *Code*). ### Flexible The animation you'd like to use is not premade? Make it yourself with a few lines of code! ```dart static VillainAnimation fade( {double fadeFrom = 0.0, double fadeTo = 1.0, Duration from = Duration.zero, Duration to: _kMaterialRouteTransitionLength, Curve curve: Curves.linear}) => VillainAnimation( from: from, curve: curve, to: to, animatable: Tween(begin: fadeFrom, end: fadeTo), animatedWidgetBuilder: (animation, child) { return FadeTransition( opacity: animation, child: child, ); }); ``` Every `VillainAnimation` needs an `Animatable` (most of the time it's a `Tween`) and an `AnimatedWidget`. Everything else is handled automatically. ## Code There are two way of playing your villains. 1) If you want them to automatically play when a page transition occurs (you probably want that) then add this to your `MaterialApp` ```dart return new MaterialApp( navigatorObservers: [new VillainTransitionObserver()], ``` 2) Play villains in a given context manually. ```dart VillainController.playAllVillains(context); ``` ### Secondary Animation You can play up to two animations per `Villain`. You can always wrap Villains inside each other for _infinite_ animations! ```dart Villain( villainAnimation: VillainAnimation.fromBottomToTop(0.4, to: Duration(milliseconds: 150)), animateExit: false, secondaryVillainAnimation: VillainAnimation.fade, child: Text( "Hi", style: Theme.of(context).textTheme.body1, ), ), ``` ### Extras Define whether the villain should play on entrance/ exit. ```dart animateEntrance: true, animateExit: true, ``` When using the `VillainController` manually, it checks this bool to determine whether it should animate. ```dart static Future playAllVillains(BuildContext context, {bool entrance = true}) ``` Villains entering the page are decoupled from the page transition, meaning they can be as long as they want. On the other hand, if a villain leaves the page, the animation is driven by the page transition. This means: - The exit animation is always as long a the exit page transition - Setting the duration doesn't change anything ## Examples Take a look at the example folder for three nice examples. ## Features: The villain framework takes care of: - managing page transition callbacks - supplying animations - providing premade common animations In contrast to real world villains, these villains are **very** easy to handle. ## Controller Currenty there are no controllers implemented to play individual villains by themselves. If you'd like to have that implemented I opened an issue discussing it. Check it out! Icon from https://icons8.com/ ## Getting Started For help getting started with Flutter, view our online [documentation](https://flutter.io/). For help on editing package code, view the [documentation](https://flutter.io/developing-packages/).
100+评论
captcha