搜尋套件、儲存庫與 APP 分類

flutter_carousel_intro 封面
套件詳情v1.0.13

flutter_carousel_intro

FlutterCarouselIntro 是一個出色的套件,可輕鬆在 Flutter 應用程式中建立和實作動畫引導螢幕。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
74
喜歡數
33
Pub 分數
150

安裝套件

flutter pub add flutter_carousel_intro

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

FlutterCarouselIntro 是一個 Flutter 套件,旨在簡化動畫引導螢幕的建立。它提供了一個乾淨、可自訂的輪播介面,透過順暢的過渡和吸引人的視覺效果,引導使用者了解應用程式功能。非常適合向新使用者介紹關鍵功能,支援多個平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。該套件可透過 pub add 容易地整合,並提供內建動畫與滑動手勢,帶來互動體驗。

適用情境

  • 入門教程
  • 應用功能導覽
  • 使用者入門流程
  • 首次使用者體驗
  • 產品發佈介紹

主要特色

  • 動畫幻燈片過渡
  • 滑動手勢支援
  • 可自定義的使用者介面
  • 多平台相容性
  • 與 pub 的輕鬆整合
  • 內建動畫預設

適合對象

  • 新應用開發者
  • 入門畫面設計師
  • 跨平台應用
  • 互動式使用者指南
  • 極簡使用者介面專案

使用建議

  • 超出基本樣式的客製化功能有限
  • 依賴外部動畫庫
  • 可能需要額外的狀態管理
  • 不適合複雜的導航流程
  • 最適合簡單的線性引導流程

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

English | Português

flutter_carousel_intro

by: Eliezer António

see in Flutter Gems: https://fluttergems.dev/packages/flutter_carousel_intro

Swipe the carousel to the current clicked indicator

Current Features

  • [X] Custom child widgets
  • [X] Slide
  • [X] Rotate transition
  • [X] Auto play
  • [X] Horizontal transition
  • [X] Vertical transition
  • [X] Swipe the carousel to the current clicked indicator
  • [X] Infinite loop (repeat) — works for both autoplay and manual swipe
  • [X] Built-in navigation buttons — Skip, Next and Done, fully customizable

Supported Platforms

  • Flutter Android
  • Flutter iOS
  • Flutter web
  • Flutter desktop

Preview

Installation

Add flutter_carousel_intro: ^1.0.13 to your pubspec.yaml dependencies. And import it:

import 'package:flutter_carousel_intro/flutter_carousel_intro.dart';

How to use

FlutterCarouselIntro(  
       slides: [
          SliderItem(
            title: 'Title 1',
            subtitle: const Text('Lorem Ipsum is simply dummy text'),
            widget: SvgPicture.asset("assets/slide-1.svg"),
          ),
          SliderItem(
            title: 'Title 2',
            subtitle: const Text('Lorem Ipsum is simply dummy text'),
            widget: SvgPicture.asset("assets/slide-2.svg"),
          ),
          SliderItem(
            title: 'Title 3',
            subtitle: const Text('Lorem Ipsum is simply dummy text'),
            widget: SvgPicture.asset("assets/slide-3.svg"),
          ),
          SliderItem(
            title: 'Title 4',
            subtitle: const Text('Lorem Ipsum is simply dummy text'),
            widget: SvgPicture.asset("assets/slide-4.svg"),
          ),
          SliderItem(
            title: 'Title 5',
            subtitle: const Text('Lorem Ipsum is simply dummy text'),
            widget: SvgPicture.asset("assets/slide-5.svg"),
          ),
          SliderItem(
            title: 'Title 5',
            widget: SvgPicture.asset("assets/slide-6.svg"),
            subtitle: ElevatedButton(
              onPressed: () {},
              child: const Text("skip"),
            ),
          ),
        ],
    );
All SliderItem parameters

  String? title,
  TextStyle? titleTextStyle,
  TextAlign? titleTextAlign,
  Widget? subtitle,
  

Infinite loop (repeat)

Set repeat: true to turn the carousel into an infinite loop. It works independently of autoPlay — the user can also swipe past the last slide and wrap back to the first.

FlutterCarouselIntro(
  autoPlay: true,
  repeat: true,
  slides: [...],
);

Under the hood the PageView becomes infinite and the indicator is synchronized via modulo, so the dots always reflect the current slide.

Built-in navigation buttons (Skip / Next / Done)

For onboarding flows you no longer need to assemble the buttons by hand. FlutterCarouselIntro ships with opt-in Skip, Next and Done buttons:

FlutterCarouselIntro(
  showNextButton: true,
  onSkip: () => Navigator.of(context).pushReplacementNamed('/home'),
  onDone: () => Navigator.of(context).pushReplacementNamed('/home'),
  skipLabel: const Text('Skip'),
  nextLabel: const Text('Next'),
  doneLabel: const Text('Done'),
  slides: [...],
);

Behavior:

  • Skip is shown whenever onSkip != null.
  • Next is shown when showNextButton: true; tapping it advances the page.
  • On the last slide, Next is automatically replaced by Done (when onDone is provided).
  • In repeat: true mode there is no last slide, so Next is always visible and Done is never triggered.
All navigation button parameters
VoidCallback? onSkip;
VoidCallback? onDone;
bool showNextButton;              // default: false

Widget? skipLabel;                // default: Text('Skip')
Widget? nextLabel;                // default: Text('Next')
Widget? doneLabel;                // default: Text('Done')

ButtonStyle? navigationButtonStyle;

// Full overrides — replace the button widget entirely
NavigationButtonBuilder? skipButtonBuilder;
NavigationButtonBuilder? nextButtonBuilder;
NavigationButtonBuilder? doneButtonBuilder;

// Positioning
AlignmentGeometry skipButtonAlignment;   // default: Alignment.topRight
AlignmentGeometry nextButtonAlignment;   // default: Alignment.bottomRight
EdgeInsetsGeometry navigationButtonsPadding; // default: EdgeInsets.all(16)

NavigationButtonBuilder is Widget Function(BuildContext context, VoidCallback onPressed), giving you full control over the rendered widget while the package still wires the tap handler (advance / skip / done) for you:

FlutterCarouselIntro(
  showNextButton: true,
  onDone: _finish,
  nextButtonBuilder: (context, onPressed) => FilledButton.icon(
    onPressed: onPressed,
    icon: const Icon(Icons.arrow_forward),
    label: const Text('Continue'),
  ),
  doneButtonBuilder: (context, onPressed) => FilledButton(
    onPressed: onPressed,
    child: const Text("Let's go"),
  ),
  slides: [...],
);

General Example

class MySlideShow extends StatelessWidget {
  const MySlideShow({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return FlutterCarouselIntro(
        animatedRotateX: false,
        animatedRotateZ: true,
        scale: true,
        autoPlay: true,
        repeat: true,
        animatedOpacity: false,
        autoPlaySlideDuration: const Duration(seconds: 2),
        autoPlaySlideDurationTransition: const Duration(milliseconds: 1100),
        primaryColor: Colors.pink,
        secondaryColor: Colors.grey,
        scrollDirection: Axis.horizontal,
        indicatorAlign: IndicatorAlign.bottom,
        indicatorEffect: IndicatorEffects.jumping,
        showIndicators: true,
        showNextButton: true,
        onSkip: () => debugPrint('Skip tapped'),
        onDone: () => debugPrint('Done tapped'),
        skipLabel: const Text('Skip'),
        nextLabel: const Text('Next'),
        doneLabel: const Text('Done'),
         slides: [
          SliderItem(
            title: 'Title 1',
            subtitle: const Text('Lorem Ipsum is simply dummy text'),
            widget: SvgPicture.asset("assets/slide-1.svg"),
          ),
          SliderItem(
            title: 'Title 2',
            subtitle: const Text('Lorem Ipsum is simply dummy text'),
            widget: SvgPicture.asset("assets/slide-2.svg"),
          ),
          SliderItem(
            title: 'Title 3',
            subtitle: const Text('Lorem Ipsum is simply dummy text'),
            widget: SvgPicture.asset("assets/slide-3.svg"),
          ),
          SliderItem(
            title: 'Title 4',
            subtitle: const Text('Lorem Ipsum is simply dummy text'),
            widget: SvgPicture.asset("assets/slide-4.svg"),
          ),
          SliderItem(
            title: 'Title 5',
            subtitle: const Text('Lorem Ipsum is simply dummy text'),
            widget: SvgPicture.asset("assets/slide-5.svg"),
          ),
          SliderItem(
            title: 'Title 5',
            widget: SvgPicture.asset("assets/slide-6.svg"),
            subtitle: ElevatedButton(
              onPressed: () {},
              child: const Text("skip"),
            ),
          ),
        ],
      );
  }
}

Gif

Normal Example:

Animated Opacity

normal

animatedOpacity: true

Animated Scale

scale: true

Animated Rotation on the X Axis

animatedRotateX: true

Animated Rotation on the Z Axis

animatedRotateZ: true

Contributions

Feel free to contribute to this project.

If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue.
If you fixed a bug or implemented a feature, please send a pull request.

My Packages

Flutter Responsivity Widget

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。