p-hatan/ mirror

pub repository

mirror.p-hatan.ir

animations

2.1.2

Fancy pre-built animations that can easily be integrated into any Flutter application.

Download archive

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:

  1. Container transform
  2. Shared axis
  3. Fade through
  4. Fade

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:

  1. A card into a details page
  2. A list item into a details page
  3. A FAB into a details page
  4. 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:

  1. An onboarding flow transitions along the x-axis
  2. A stepper transitions along the y-axis
  3. 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:

  1. Tapping destinations in a bottom navigation bar
  2. Tapping a refresh icon
  3. 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:

  1. A dialog
  2. A menu
  3. A snackbar
  4. 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.onClosed to 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 OpenContainerState public.

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 Easing class.

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 OpenContainer to use Visibility widget internally instead of Opacity.
  • Update OpenContainer to use FadeTransition instead of animating an Opacity widget 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 OpenContainer class; replaced openBuilder with closedBuilder.

2.0.1

  • Add links to the spec and codelab.

2.0.0

  • Migrates to null safety.
  • Add routeSettings and filter option to showModal.

1.1.2

  • Fixes for upcoming changes to the flutter framework.

1.1.1

  • Hide implementation of DualTransitionBuilder as the widget has been implemented in the Flutter framework.

1.1.0

  • Introduce usage of DualTransitionBuilder for all transition widgets, preventing ongoing animations at the start of the transition animation from resetting at the end of the transition animations.
  • Fix FadeScaleTransition example's FloatingActionButton being accessible and tappable when it is supposed to be hidden.
  • showModal now defaults to using FadeScaleTransitionConfiguration instead of null.
  • Added const constructors for FadeScaleTransitionConfiguration and ModalConfiguration.
  • Add custom fillColor property to SharedAxisTransition and SharedAxisPageTransitionsBuilder.
  • Fix prefer_const_constructors lint in test and example.
  • Add option useRootNavigator to OpenContainer.
  • 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 stable branch 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 animations
pubspec.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

VersionPublishedArchiveSHA-256
1.0.02020-02-18T20:42:51.413702ZDownload28b7d96835174a0d2bbdefdb1b642bfcb086322cfa73fc4baec4f72c26e567dc
1.0.0+12020-02-18T21:46:54.430602ZDownload31e92670cea40c7005f06766b9ea9f0807e885b63c85e4d10fa986b9c3580c71
1.0.0+22020-02-18T21:59:29.010036ZDownloadf33480b31ff2fd17b90df43de1b0c6a8013519c417966b511aad443551025919
1.0.0+32020-02-19T00:01:59.734854ZDownload5342e864eb1cc06bb2500a2e686b9a856057ce0946003261b5ab724ec8846e7b
1.0.0+42020-02-21T18:27:29.901019ZDownload1c1d5de9bfe79746395edc60e5ec87c4163933eca357c599b629780187654f3a
1.0.0+52020-02-21T18:49:28.670462ZDownload2adbc89efd26fc668ab1679698f80eb0849fb265a16cf89f48aceca0cedab190
1.1.02020-06-02T16:41:44.309692ZDownloadff54e53d9badaaa54ced9451f07ccbeca66f3aa3682947610b6b9cd467cd8e74
1.1.12020-06-18T01:48:24.411184ZDownload04c1dcacdfd8e2617386d22d909017de634fc549c749d555f1f1f7d974ae9d85
1.1.22020-07-28T19:23:41.432785ZDownload1344704523bf3dfdfc2c9816ab58e61542fc1d3e0120e0b7b39f47b98b3b287c
2.0.0-nullsafety.02021-01-27T20:58:24.261757ZDownload7aa03cedae447b0d3bd1a14579ac6759c06a133a62734de4573252fc0714f1c4
2.0.02021-02-24T02:26:02.654845ZDownloadb8c936e61719a595bebdd6291c591e7b104d0ab9d471627d532746b2b279a4f2
2.0.12021-07-08T15:09:28.078517ZDownloade519481cd689328e6b94b9d5bd45d685febac5b6804fbd5769e0ab35addcf2c3
2.0.22021-10-21T16:51:49.033647ZDownloadb70b084d3a3895aab7764bd505b89e72c199e5edcd1e4e3af0c76b52c2c7c5b6
2.0.32022-05-24T09:32:49.861484ZDownload1a5baa987a926607a363522869781637b591735195573ab04006b3f825eef224
2.0.42022-08-25T17:25:44.376001ZDownload08abd4128b5c47c0496d3b610401edb7ac331c9af34323aaefe4cda549a3b552
2.0.52022-09-21T15:31:18.052517ZDownload047803c3be2ed2de8b837deb7e245f1ce46a672ebe8c7a42ce38be41d7295017
2.0.62022-10-05T08:03:48.683387ZDownloadb907674a33a6189b604f11211d0b40e7e41708134c514867eb576eac70748b95
2.0.72022-10-05T22:32:09.475908ZDownloadfe8a6bdca435f718bb1dc8a11661b2c22504c6da40ef934cee8327ed77934164
2.0.82023-08-29T17:36:03.610806ZDownloadef57563eed3620bd5d75ad96189846aca1e033c0c45fc9a7d26e80ab02b88a70
2.0.102023-12-07T01:45:13.877447ZDownload708e4b68c23228c264b038fe7003a2f5d01ce85fc64d8cae090e86b27fcea6c5
2.0.112024-01-04T03:48:18.774411ZDownloadd3d6dcfb218225bbe68e87ccf6378bbb2e32a94900722c5f81611dad089911cb
2.1.02025-10-09T04:27:39.894169ZDownloada8031b276f0a7986ac907195f10ca7cd04ecf2a8a566bd6dbe03018a9b02b427
2.1.12025-11-14T20:02:57.340821ZDownload18938cefd7dcc04e1ecac0db78973761a01e4bc2d6bfae0cfa596bfeac9e96ab
2.1.22026-03-27T20:42:07.695784ZDownloada120785be876b24177e8af387929e786e7761d6574e63cad6c2ca28545b30186
2.2.02026-04-23T18:51:30.551430ZDownload9cb469212ea51be27097f23b519d594c01171721347b55df9334fff653659e7f
3.0.02026-08-19T19:31:47.266700ZDownload5ec868ffa78851e6f3f32e9377b780c7ae2087a5523d8b5e6df59bd8287ac5dd

Dependencies

flutter { "sdk": "flutter" }