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

interactive_slider 封面
套件詳情v0.5.1

interactive_slider

一個受 Apple Music 中使用的滑塊元件啟發的、具有 Cupertino 風格的互動式連續滑塊小工具。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
2700
喜歡數
139
Pub 分數
160

安裝套件

flutter pub add interactive_slider

套件介紹

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

一款受 Apple Music 滑塊介面啟發的 Cupertino 風格互動式連續滑塊元件。它提供流暢、視覺上吸引人的滑動體驗,支援跨多個平台的觸控與拖曳互動。專為媒體播放控制或任何需要直觀使用者輸入連續值的應用程式而設計。該元件支援響應式設計,並能無縫整合至針對 iOS 與跨平台環境的 Flutter 應用中。

適用情境

  • 媒體播放音量控制
  • 調整播放速度
  • 可自訂的範圍輸入
  • 使用者偏好設定
  • 互動式表單元素

主要特色

  • Cupertino 設計語言
  • 連續值追蹤
  • 跨平台相容性
  • 觸控和拖曳互動
  • 流暢的動畫
  • 響應式佈局

適合對象

  • iOS 風格的應用程式介面
  • 音樂和媒體應用
  • 需要滑塊的表單輸入
  • 跨平台 Flutter 項目
  • 注重設計的UI組件

使用建議

  • 需要 Flutter SDK 3.0 或更高版本
  • 超出主題之外的自訂功能有限
  • 在非 Cupertino 環境中可能需要額外的樣式
  • 未針對高頻率更新進行優化
  • 最適合單值連續輸入

原始 README

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

A continuous or segmented slider widget inspired by the volume slider in the Apple Music app. This widget can be used with little to no setup but is still fully customizable!

Animated gif of slider being used Animated gif of slider being used Animated gif of slider being used

Features

Use the stock slider or customize:

  • Built in padding for convenience
  • Adjustable size transition
  • Use any widget for a start/end icon and center label
  • Use any transition duration and curve
  • Provide any shape border for the progress bar
  • Use the normalized progress value or easily provide a min/max to be automatically transformed
  • Animate start and end icons using slider progress
  • Color the slider's porgress with a gradient
  • Create any number of discrete segments to slide through

Getting started

Add to your dependencies:

dependencies:
  interactive_slider: ^0.5.0

Then import:

import 'package:interactive_slider/interactive_slider.dart';

Usage

InteractiveSlider(
  startIcon: const Icon(CupertinoIcons.volume_down),
  centerIcon: const Text('Center'),
  endIcon: const Icon(CupertinoIcons.volume_up),
  min: 1.0,
  max: 15.0,
  onChanged: (value) => setState(() => _value = value),
)

Additional information

Please report any bugs and open any pull requests via GitHub.

所屬分類

原始碼儲存庫

使用此套件的專案