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

another_transformer_page_view 封面
插件详情v2.0.1

another_transformer_page_view

另一个支持空安全的 Flutter pageTransformer

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1.3万
喜欢数
98
Pub 分数
150

安装插件

flutter pub add another_transformer_page_view

插件介绍

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

Another Transformer Page View 是一个 Flutter 包,为 PageView 小部件提供增强的页面转换功能,支持空安全。它可实现平滑且可自定义的页面间动画,非常适合创建具有动态过渡效果的引人入胜的用户界面。该包以性能和易用性为核心设计,可无缝集成到跨多个平台的现有 Flutter 项目中。该包由 juliansteenbakker 维护,适合希望在无需复杂实现的情况下获得高级视觉效果的开发者。其轻量级设计确保了最小开销,同时提供丰富的交互体验。

适合场景

  • 创建动画引导屏幕
  • 使用视觉深度构建交互式滑块
  • 通过动态页面过渡增强导航
  • 设计沉浸式产品展示
  • 实现自定义滚动效果

主要特点

  • 空安全支持
  • 可自定义的页面转换
  • 流畅的动画性能
  • 跨平台兼容性
  • 与 PageView 的简单集成
  • 可扩展的转换逻辑

适合对象

  • Flutter 开发人员构建交互式 UI
  • 希望实现高级过渡效果的设计人员
  • 需要视觉丰富滚动体验的应用程序
  • 面向多个平台的项目
  • 注重代码清晰性和可维护性的团队

使用建议

  • 需要理解 PageView 和动画概念
  • 可能会影响性能,尤其是在进行大量转换时
  • 除了基本示例外,文档有限
  • 最适合中等复杂度的动画
  • 不适用于简单的线性滚动

原始 README

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

another_transformer_page_view

PageTransformer for flutter. Fork from transformer_page_view

Very simple to use

import 'package:another_transformer_page_view/another_transformer_page_view.dart';

...

new TransformerPageView(
loop: true,
transformer: new AccordionTransformer(),
itemBuilder: (BuildContext context, int index) {
  return new Container(
    color: list[index%list.length],
    child: new Center(
      child: new Text("$index",style: new TextStyle(fontSize: 80.0,color: Colors.white),),
    ),
  );
},
itemCount: 3)

Almost the same as PageView.builder, simplely specify a transformer to TransformerPageView, which is a sub class of PageTransformer

Show cases

Parallax

Welcome view

Basic

AccordionTransformer

See code here

ThreeDTransformer

See code here

ScaleAndFadeTransformer

See code here

ZoomInPageTransformer

See code here

ZoomOutPageTransformer

See code here

DepthPageTransformer

See code here

Getting Started

Installation

Add


another_transformer_page_view:

to your pubspec.yaml ,and run

flutter packages get 

in your project's root directory.

Basic Usage
Parameter Default Description
scrollDirection Axis.horizontal If Axis.horizontal, the scroll view's children are arranged horizontally in a row instead of vertically in a column.
loop false Set to true to enable continuous loop mode.
index none Index number of initial slide. if not set , it is controlled by the widget itself,otherwise, it is controlled by another widget, which is returned by itemBuilder
onPageChanged void onPageChanged(int index) Called with the new index when the user swiped
duration new Duration(milliseconds:300) The milliseconds of every transaction animation costs
transformer none The most important property of this widget, it returns a transformed widget that based on the widget parameter. If the value is null, a itemBuilder must be specified
itemCount none Number of the total items
itemBuilder none A function that returns a widget based on index,if it's null,a transformer must be specified
Build-in Parallax

We provide 3 build-in parallaxes, which handle color、image and container

ParallaxColor

ParallaxColor handles the color transform, which controls the color transform from one to another.

ParallaxImage

ParallaxImage handles the image, which speed is slower than the PageView

ParallaxContainer

ParallaxContainer handles the text or other staff, which speed is faster than the PageView

3 build-in parallaxes are all used in subclass of PageTransform,group these parallaxes together, we can create very cool things.

Inspired by page-transformer, and we have an easier way to create this.

See code here

Custom animation

所属分类

源码仓库

使用此插件的项目