搜索插件、代码仓与 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.

所属分类

源码仓库

使用此插件的项目