패키지, 저장소 및 앱 카테고리 검색

GitHub 저장소alex-melnyk/flutter_advanced_segment

flutter_advanced_segment

https://pub.dev/packages/flutter_advanced_segment

flutter_advanced_segment 프로젝트 이미지
스타
23
포크
11
최근 푸시(UTC)
2026. 3. 16.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

flutter_advanced_segment

An advanced segment widget, that can be fully customized with bunch of properties, just try it and enjoy!

APP_ICON

Flutter Advanced Segment Flutter Advanced Segment

Examples

Regular Segment
final _controller = ValueNotifier('all');
//...
AdvancedSegment(
  controller: _controller,
  segments: const {
    'all': 'All',
    'starred': 'Starred',
  },
),
Colorized Segment
AdvancedSegment(
  controller: _controller,
  segments: const {'all': 'All', 'starred': 'Starred'},
  decoration: BoxDecoration(
    color: const Color(0xFFFF6B35),
    borderRadius: BorderRadius.circular(4),
  ),
  sliderColor: const Color(0xFFD63B0E),
  activeStyle: const TextStyle(
    color: Colors.white,
    fontWeight: FontWeight.w600,
  ),
  inactiveStyle: TextStyle(
    color: Colors.white.withValues(alpha: 0.7),
  ),
),
Gradient Decoration
AdvancedSegment(
  controller: _controller,
  segments: const {'all': 'All', 'starred': 'Starred'},
  decoration: BoxDecoration(
    gradient: const LinearGradient(
      colors: [Color(0xFFFF2D55), Color(0xFFFF9500)],
    ),
    borderRadius: BorderRadius.circular(16),
  ),
  sliderColor: Colors.white,
  activeStyle: const TextStyle(
    color: Color(0xFFFF2D55),
    fontWeight: FontWeight.w700,
  ),
  inactiveStyle: TextStyle(
    color: Colors.white.withValues(alpha: 0.85),
  ),
),
Custom Slider Decoration
AdvancedSegment(
  controller: _controller,
  segments: const {'all': 'All', 'starred': 'Starred'},
  decoration: BoxDecoration(
    color: const Color(0xFF2C2C2E),
    borderRadius: BorderRadius.circular(50),
  ),
  sliderDecoration: BoxDecoration(
    color: const Color(0xFFBF5AF2),
    borderRadius: BorderRadius.circular(50),
    border: Border.all(
      color: const Color(0xFFDA8FFF),
      width: 1.5,
    ),
  ),
  activeStyle: const TextStyle(
    color: Colors.white,
    fontWeight: FontWeight.w700,
  ),
  inactiveStyle: TextStyle(
    color: Colors.white.withValues(alpha: 0.5),
  ),
),

AdvancedSegment Parameters

Parameter Description Type Default
controller Controls segments selection ValueNotifier
segments Map of presented segments Map<K, V> required
activeStyle Active segment text style TextStyle fontWeight: FontWeight.w600
inactiveStyle Inactive segment text style TextStyle
decoration Layout decoration (color, border, borderRadius, gradient, etc.) BoxDecoration color: 0x42000000, borderRadius: 8.0
sliderColor Color of the slider thumb Color Colors.white
sliderOffset Gap between slider and layout double 2.0
itemPadding Padding of each item EdgeInsets EdgeInsets.symmetric(h: 15, v: 10)
animationDuration Selection animation duration Duration Duration(milliseconds: 250)
shadow Slider shadow List<BoxShadow> BoxShadow(blurRadius: 8.0)
sliderDecoration Custom slider decoration (overrides sliderColor, borderRadius, shadow) BoxDecoration
enableDrag Whether drag gesture is enabled bool true
Alex Melnyk GitHub avatar
GitHub 작성자

Alex Melnyk ↗

A high skilled developer with 15 years of development experience. Working at https://litslink.com https://medium.alexmelnyk.io https://twitter.com/askMelnyk

@litslinkUkraine, Kiev공식 웹사이트 ↗
언어DartSwiftKotlinObjective-C

분류

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 2 개

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗