Introduction Slider 是一个 Flutter 包,旨在为移动和 Web 应用程序创建交互式引导或介绍滑块。它提供流畅、可自定义的轮播体验,支持多屏展示、动画过渡以及直观的导航。该包非常适合引导新用户了解应用功能、教程或欢迎界面。内置手势操作和视觉反馈,可增强用户在初次使用应用时的参与感。它支持所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux,确保在各种设备上保持一致的性能。
适合场景
引导新用户
应用教程屏幕
欢迎启动画面序列
功能亮点
用户入门流程
主要特点
可自定义的幻灯片内容
动画过渡
基于手势的导航
跨平台兼容性
内置进度指示器
与 Flutter 的轻松集成
适合对象
新应用开发者
以入门为重点的应用程序
多屏幕介绍
跨平台项目
用户体验提升
使用建议
需要基本的Flutter知识
动画定时的自定义有限
可能需要额外的样式来处理复杂的布局
依赖外部依赖项以实现高级功能
未针对非常大的幻灯片数量进行优化
原始 README
以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。
Become a sponsor
Introduction Slider
An introduction slider has some screens that can use to describe your application. You can describe your application's title, description, logo, etc. It comes with several features.
Here is an example of how to implement IntroductionSlider in a Flutter application.
Typically this will be an AssetImage or a NetworkImage
fit:
BoxFit
Fill the target box by distorting the source's aspect ratio.
colorFilter:
ColorFilter
A color filter is a function that takes two colors, and outputs one color.
opacity:
double
Used to set the filterQuality of the image.
Scroll / Gesture control
A page can be scrolled horizontally or vertically. The default scroll direction is horizontal. You can change the scroll direction by setting the scrollDirection property.
You can also control the introduction slider by gestures. You can set the physics property to NeverScrollableScrollPhysics() to disable the gesture slide.
Done has some more properties which are used to redirect to the target page with an animation effect. animationDuration is used to set the duration of the animation and curve is used to set the animation curve.
Many of the ButtonStyle properties are [MaterialStateProperty] objects which resolve to different values depending on the button's state.
curve:
Curve
A collection of common animation easing curves.
animationDuration:
Duration
The animation lasts for the given duration and follows the given curve. The returned [Future] resolves when the animation completes.
Next
Next has some more properties which are used to redirect to the next slide page with an animation effect. animationDuration is used to set the duration of the animation and curve is used to set the animation curve.
Many of the ButtonStyle properties are [MaterialStateProperty] objects which resolve to different values depending on the button's state.
curve:
Curve
A collection of common animation easing curves.
animationDuration:
Duration
The animation lasts for the given duration and follows the given curve. The returned [Future] resolves when the animation completes.
Back
Back has some more properties which are used to redirect to the previous slide page with an animation effect. animationDuration is used to set the duration of the animation and curve is used to set the animation curve.