pub repository
mirror.p-hatan.iranimations
2.1.2Fancy pre-built animations that can easily be integrated into any Flutter application.
Readme
High quality pre-built Animations for Flutter
This package contains pre-canned animations for commonly-desired effects. The animations can be customized with your content and dropped into your application to delight your users.
To see examples of the following animations on a device or simulator:
cd example/
flutter run --release
Material motion for Flutter
Material motion is a set of transition patterns that help users understand and navigate an app. For more information on the patterns and how to choose between them, check out the Material motion system spec.
A codelab, Building Beautiful Transitions with Material Motion for Flutter, is also available.
Material motion defines the following transition patterns:
Container transform
The container transform pattern is designed for transitions between UI elements that include a container. This pattern creates a visible connection between two UI elements.
"Container transform gallery - normal speed and slow motion" Examples of the container transform:
- A card into a details page
- A list item into a details page
- A FAB into a details page
- A search bar into expanded search
Shared axis
The shared axis pattern is used for transitions between UI elements that have a spatial or navigational relationship. This pattern uses a shared transformation on the x, y, or z axis to reinforce the relationship between elements.
"Shared axis gallery - normal speed and slow motion" Examples of the shared axis pattern:
- An onboarding flow transitions along the x-axis
- A stepper transitions along the y-axis
- A parent-child navigation transitions along the z-axis
Fade through
The fade through pattern is used for transitions between UI elements that do not have a strong relationship to each other.
"Fade through gallery - normal speed and slow motion" Examples of the fade through pattern:
- Tapping destinations in a bottom navigation bar
- Tapping a refresh icon
- Tapping an account switcher
Fade
The fade pattern is used for UI elements that enter or exit within the bounds of the screen, such as a dialog that fades in the center of the screen.
"Fade gallery - normal speed and slow motion" Examples of the fade pattern:
- A dialog
- A menu
- A snackbar
- A FAB
Changelog
2.1.2
- Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.
- Adds an example of using
OpenContainer
2.1.1
- Updated the documentation for
OpenContainer.onClosedto clarify that it is called at the start of the closing transition, not at the end. - Updates minimum supported SDK version to Flutter 3.32/Dart 3.8.
2.1.0
- Updates examples to use the new RadioGroup API instead of deprecated Radio parameters.
- Updates minimum supported SDK version to Flutter 3.29/Dart 3.7.
- Make
OpenContainerStatepublic.
2.0.11
- Fixes new lint warnings.
2.0.10
- Updates minimum supported SDK version to Flutter 3.16/Dart 3.2.
2.0.9
- Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.
- Migrate motion curves to use
Easingclass.
2.0.8
- Adds pub topics to package metadata.
- Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.
- Aligns Dart and Flutter SDK constraints.
2.0.7
- Updates screenshots to use webp compressed animations
2.0.6
- Adds screenshots to pubspec.yaml
2.0.5
- Update
OpenContainerto useVisibilitywidget internally instead ofOpacity. - Update
OpenContainerto useFadeTransitioninstead of animating anOpacitywidget internally.
2.0.4
- Updates text theme parameters to avoid deprecation issues.
- Fixes lint warnings.
2.0.3
- Updates for non-nullable bindings.
2.0.2
- Fixed documentation for
OpenContainerclass; replacedopenBuilderwithclosedBuilder.
2.0.1
- Add links to the spec and codelab.
2.0.0
- Migrates to null safety.
- Add
routeSettingsandfilteroption toshowModal.
1.1.2
- Fixes for upcoming changes to the flutter framework.
1.1.1
- Hide implementation of
DualTransitionBuilderas the widget has been implemented in the Flutter framework.
1.1.0
- Introduce usage of
DualTransitionBuilderfor all transition widgets, preventing ongoing animations at the start of the transition animation from resetting at the end of the transition animations. - Fix
FadeScaleTransitionexample'sFloatingActionButtonbeing accessible and tappable when it is supposed to be hidden. showModalnow defaults to usingFadeScaleTransitionConfigurationinstead ofnull.- Added const constructors for
FadeScaleTransitionConfigurationandModalConfiguration. - Add custom fillColor property to
SharedAxisTransitionandSharedAxisPageTransitionsBuilder. - Fix prefer_const_constructors lint in test and example.
- Add option
useRootNavigatortoOpenContainer. - Add
OpenContainer.onClosed, which is called with a returned value when the container was popped and has returned to the closed state. - Fixes a bug with OpenContainer where a crash occurs when the container is dismissed after the container widget itself is removed.
1.0.0+5
- Fix override analyzer ignore placement.
1.0.0+4
- Fix a typo in the changelog dates
- Revert use of modern Material text style nomenclature in the example app
to be compatible with Flutter's
stablebranch for the time being. - Add override analyzer ignore in modal.dart for reverseTransitionDuration until Flutter's stable branch contains https://github.com/flutter/flutter/pull/48274.
1.0.0+3
- Update README.md to better describe Material motion
1.0.0+2
- Fixes to pubspec.yaml
1.0.0+1
- Fixes to pubspec.yaml
1.0.0
- Initial release
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add animationspubspec.yaml
name: animations
description: Fancy pre-built animations that can easily be integrated into any Flutter application.
repository: https://github.com/flutter/packages/tree/main/packages/animations
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+animations%22
version: 2.1.2
environment:
sdk: ^3.9.0
flutter: ">=3.35.0"
dependencies:
flutter:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
vector_math: ^2.1.0
topics:
- animation
- ui
screenshots:
- description: 'Examples of the container transform pattern.'
path: example/screenshots/container_transform_lineup.webp
- description: 'Examples of the fade pattern.'
path: example/screenshots/fade_lineup.webp
- description: 'Examples of the fade through pattern.'
path: example/screenshots/fade_through_lineup.webp
- description: 'Examples of the shared axis pattern.'
path: example/screenshots/shared_axis_lineup.webp
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 1.0.0 | 2020-02-18T20:42:51.413702Z | Download | 28b7d96835174a0d2bbdefdb1b642bfcb086322cfa73fc4baec4f72c26e567dc |
| 1.0.0+1 | 2020-02-18T21:46:54.430602Z | Download | 31e92670cea40c7005f06766b9ea9f0807e885b63c85e4d10fa986b9c3580c71 |
| 1.0.0+2 | 2020-02-18T21:59:29.010036Z | Download | f33480b31ff2fd17b90df43de1b0c6a8013519c417966b511aad443551025919 |
| 1.0.0+3 | 2020-02-19T00:01:59.734854Z | Download | 5342e864eb1cc06bb2500a2e686b9a856057ce0946003261b5ab724ec8846e7b |
| 1.0.0+4 | 2020-02-21T18:27:29.901019Z | Download | 1c1d5de9bfe79746395edc60e5ec87c4163933eca357c599b629780187654f3a |
| 1.0.0+5 | 2020-02-21T18:49:28.670462Z | Download | 2adbc89efd26fc668ab1679698f80eb0849fb265a16cf89f48aceca0cedab190 |
| 1.1.0 | 2020-06-02T16:41:44.309692Z | Download | ff54e53d9badaaa54ced9451f07ccbeca66f3aa3682947610b6b9cd467cd8e74 |
| 1.1.1 | 2020-06-18T01:48:24.411184Z | Download | 04c1dcacdfd8e2617386d22d909017de634fc549c749d555f1f1f7d974ae9d85 |
| 1.1.2 | 2020-07-28T19:23:41.432785Z | Download | 1344704523bf3dfdfc2c9816ab58e61542fc1d3e0120e0b7b39f47b98b3b287c |
| 2.0.0-nullsafety.0 | 2021-01-27T20:58:24.261757Z | Download | 7aa03cedae447b0d3bd1a14579ac6759c06a133a62734de4573252fc0714f1c4 |
| 2.0.0 | 2021-02-24T02:26:02.654845Z | Download | b8c936e61719a595bebdd6291c591e7b104d0ab9d471627d532746b2b279a4f2 |
| 2.0.1 | 2021-07-08T15:09:28.078517Z | Download | e519481cd689328e6b94b9d5bd45d685febac5b6804fbd5769e0ab35addcf2c3 |
| 2.0.2 | 2021-10-21T16:51:49.033647Z | Download | b70b084d3a3895aab7764bd505b89e72c199e5edcd1e4e3af0c76b52c2c7c5b6 |
| 2.0.3 | 2022-05-24T09:32:49.861484Z | Download | 1a5baa987a926607a363522869781637b591735195573ab04006b3f825eef224 |
| 2.0.4 | 2022-08-25T17:25:44.376001Z | Download | 08abd4128b5c47c0496d3b610401edb7ac331c9af34323aaefe4cda549a3b552 |
| 2.0.5 | 2022-09-21T15:31:18.052517Z | Download | 047803c3be2ed2de8b837deb7e245f1ce46a672ebe8c7a42ce38be41d7295017 |
| 2.0.6 | 2022-10-05T08:03:48.683387Z | Download | b907674a33a6189b604f11211d0b40e7e41708134c514867eb576eac70748b95 |
| 2.0.7 | 2022-10-05T22:32:09.475908Z | Download | fe8a6bdca435f718bb1dc8a11661b2c22504c6da40ef934cee8327ed77934164 |
| 2.0.8 | 2023-08-29T17:36:03.610806Z | Download | ef57563eed3620bd5d75ad96189846aca1e033c0c45fc9a7d26e80ab02b88a70 |
| 2.0.10 | 2023-12-07T01:45:13.877447Z | Download | 708e4b68c23228c264b038fe7003a2f5d01ce85fc64d8cae090e86b27fcea6c5 |
| 2.0.11 | 2024-01-04T03:48:18.774411Z | Download | d3d6dcfb218225bbe68e87ccf6378bbb2e32a94900722c5f81611dad089911cb |
| 2.1.0 | 2025-10-09T04:27:39.894169Z | Download | a8031b276f0a7986ac907195f10ca7cd04ecf2a8a566bd6dbe03018a9b02b427 |
| 2.1.1 | 2025-11-14T20:02:57.340821Z | Download | 18938cefd7dcc04e1ecac0db78973761a01e4bc2d6bfae0cfa596bfeac9e96ab |
| 2.1.2 | 2026-03-27T20:42:07.695784Z | Download | a120785be876b24177e8af387929e786e7761d6574e63cad6c2ca28545b30186 |
| 2.2.0 | 2026-04-23T18:51:30.551430Z | Download | 9cb469212ea51be27097f23b519d594c01171721347b55df9334fff653659e7f |
| 3.0.0 | 2026-08-19T19:31:47.266700Z | Download | 5ec868ffa78851e6f3f32e9377b780c7ae2087a5523d8b5e6df59bd8287ac5dd |
Dependencies
flutter {
"sdk": "flutter"
}