搜索插件、代码仓与 APP 分类

插件详情v0.0.1+2

animated_page_transition

此包用于动画页面过渡。这是一个易于使用的包。将 animation_page_transition 依赖项添加到 pubspec.yaml 文件中。然后,将包导入实现文件/文件,并可以非常轻松地实现动画页面过渡。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
7
喜欢数
40
Pub 分数
140

安装插件

flutter pub add animated_page_transition

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个简单的 Flutter 包,用于在屏幕之间添加流畅且可自定义的页面过渡效果。通过集成单一依赖项,该包使开发者能够以最少的设置实现动画导航。该包支持 Android、iOS、Web、macOS、Windows 和 Linux 等多个平台,非常适合跨平台应用。通过直观的 API,它可以在不进行复杂配置的情况下轻松集成到现有项目中。非常适合通过流畅的屏幕过渡来提升用户体验。

适合场景

  • 添加屏幕间的平滑导航
  • 通过视觉反馈增强应用UI
  • 创建引人入胜的入门流程
  • 实现自定义滑动/淡入淡出动画
  • 提升移动和网页应用的用户体验

主要特点

  • 通过 pubspec.yaml 实现轻松集成
  • 支持多个平台
  • 预构建的动画类型
  • 最小化样板代码
  • 可自定义的过渡持续时间和曲线
  • 跨平台兼容性

适合对象

  • 初学者 Flutter 开发者
  • 需要精致导航的应用程序
  • 以用户体验为中心的应用程序
  • 跨平台项目
  • 寻求快速动画实现的开发者

使用建议

  • 仅限基本过渡类型
  • 无高级动画自定义
  • 依赖外部库的稳定性
  • 可能需要额外的样式来实现复杂效果
  • 不适合高度复杂的动画序列

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Animated page transition

This package for page transition animation. With this package you can give have smooth page transitions in your apps. chack out the video given below!!!

VID_20220201122805

Usage

Add animation_page_transition dependency into the pubspec.yaml file

then import package into the implementation file/s.

import 'package:animated_page_transition/animated_page_transition.dart';

You can implement animated page transition very easily.

First of all wrap your button with [PageTransitionButton] widget, example code is given below:

To use [PageTransitionButton] you have to add [TickerProviderStateMixin] into your widget.

class HomeScreen extends StatefulWidget {
  const HomeScreen({Key? key}) : super(key: key);

  @override
  _HomeScreenState createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: PageTransitionButton(
          vsync: this,
          child: Container(
            height: 120,
            width: 120,
            decoration: BoxDecoration(
              color: const Color(0xFFFF9735),
              borderRadius: BorderRadius.circular(10),
            ),
          ),
          nextPage: const SecondScreen(),
        ),
      ),
    );
  }
}

Then wrap the scaffold of the second screen with [PageTransitionReceiver] widget where you want to navigate it as given below:

class SecondScreen extends StatelessWidget {
  const SecondScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return PageTransitionReceiver(
      scaffold: const Scaffold(
        backgroundColor: Color(0xFFFF9735),
      ),
    );
  }
}

And now you are ready to go!!!

Have fun and happy coding ;)

所属分类

源码仓库

使用此插件的项目

暂无相关数据。