搜尋分類、套件與程式碼儲存庫

overlapped_carousel 封面
套件詳情v1.0.2

overlapped_carousel

一個 Flutter 套件專案,包含一個簡單的水平重疊輪播圖小部件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
616
喜歡數
75
Pub 分數
140

安裝套件

flutter pub add overlapped_carousel

套件介紹

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

一個 Flutter 套件,提供簡單的水平重疊輪播圖組件,非常適合展示具有視覺吸引力的重疊效果項目。支援平滑捲動,並專為需要動態、互動式卡片佈局的應用程式設計。此組件輕量且相容於所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。完美適用於以現代、吸引人的方式展示圖片、產品或內容。

適用情境

  • 顯示圖像畫廊
  • 展示產品卡片
  • 建立互動式滑塊
  • 展示精選內容
  • 建構現代 UI 範本

主要特色

  • 水平重疊佈局
  • 平滑滾動互動
  • 跨平台相容性
  • 輕量級實現
  • 可自訂的項目間距
  • 透過 pub add 簡單整合

適合對象

  • 行動應用開發者
  • Web應用程序設計師
  • UI/UX創作者
  • 電子商務介面
  • 互動式內容顯示

使用建議

  • 限制為橫向方向
  • 無內建分頁控制項
  • 需要手動處理項目選擇
  • 未針對大型數據集進行優化
  • 除了間距和對齊之外,自訂選項很少

原始 README

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

Overlapped Carousel

A horizontal overlapped carousel widget. The center widget will be at the top of the stack.

Demo

Demo 1 Demo 2
demo 1 demo 2

Installation

Add overlapped_carousel: ^1.1.0 to your pubspec.yaml dependencies. And import it:

import 'package:overlapped_carousel/overlapped_carousel.dart';

How to use

Simply add a OverlappedCarousel widget with required params.

  @override
  Widget build(BuildContext context) {
    var screenWidth = MediaQuery.of(context).size.width;
    var screenHeight = MediaQuery.of(context).size.height;
    return Scaffold(
      backgroundColor: Colors.blue,
      //Wrap with Center to place the carousel center of the screen
      body: Center(
        //Wrap the OverlappedCarousel widget with SizedBox to fix a height. No need to specify width.
        child: SizedBox(
          height: min(screenWidth / 3.3 * (16 / 9),screenHeight*.9),
          child: OverlappedCarousel(
            widgets: widgets, //List of widgets
            currentIndex: 2,
            onClicked: (index) {
              ScaffoldMessenger.of(context).showSnackBar(
                SnackBar(
                  content: Text("You clicked at $index"),
                ),
              );
            },
            // To obscure or blur cards not in focus use the obscure parameter.
            obscure: 0.4,
            // To control skew angle
            skewAngle: 0.25,
          ),
        ),
      ),
    );
  }

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。