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

sleek_button 표지
패키지 상세v0.2.0

sleek_button

간단하지만 여전히 사용자 정의 가능한 버튼입니다.

30일 다운로드
13
좋아요
19
Pub 점수
40

패키지 설치

flutter pub add sleek_button

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Sleek Button은 최소한의 노력으로 우아하고 현대적인 버튼을 만들 수 있도록 설계된 가벼우면서도 사용자 정의 가능한 Flutter 위젯입니다. 애니메이션, 그라데이션, 그림자와 같은 다양한 효과를 활용해 버튼 스타일을 설정할 수 있는 깔끔한 API를 제공합니다. 무거운 종속성 없이 간단하면서도 시각적으로 매력적인 버튼 컴포넌트를 원하는 개발자에게 적합합니다. 크기, 색상, 모양, 리플 효과 등을 사용자 정의할 수 있어 기본 및 고급 UI 요구 사항에 모두 적합합니다. 어떤 Flutter 프로젝트에도 원활하게 통합됩니다.

사용 사례

  • 모바일 앱에서 스타일링된 버튼 만들기
  • 애니메이션 버튼 효과 추가
  • 매력적인 입력 컨트롤로 양식 만들기
  • 인터랙티브 UI 요소 설계
  • 사용자 정의 버튼 테마 구현
  • 사용자 인터페이스 미적 요소 향상

주요 기능

  • 높은 사용자 정의 가능한 외관
  • 내장 애니메이션 및 리플 효과
  • 그라디언트 및 그림자 지원
  • 간단하고 직관적인 API
  • 경량이고 빠른 성능
  • 기존 플러터 프로젝트와의 간편한 통합

적합한 대상

  • Flutter 초보자들이 사용하기 쉬운 위젯을 찾고 있습니다
  • 빠른 버튼 스타일링을 원하는 개발자
  • 정교한 UI 컴포넌트가 필요한 프로젝트
  • 시각적 매력과 상호작용에 중점을 둔 앱
  • 화면 간에 일관된 버튼 디자인을 추구하는 팀

고려 사항

  • 버튼 전용 기능에 제한됨
  • 로딩 또는 비활성 상태와 같은 복잡한 상태에 대한 내장 지원 없음
  • 고급 상호작용을 위해 추가 코드가 필요할 수 있습니다
  • 매우 동적 또는 데이터 기반의 버튼 로직에는 적합하지 않습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

A simple but yet customizable button.

Install

Add the dependency to your pubspec.yaml :

dependencies:
    sleek_button: <version>

Quick start

SleekButton(
    onTap: () {
        print('tapped!');
    },
    style: SleekButtonStyle.flat(
        color: swatch.primary,
        inverted: true,
        rounded: true,
        size: SleekButtonSize.big,
        context: context,
    ),
    child: const Icon(Icons.format_bold),
)

Usage

Widget
SleekButton(
    onTap: () {
        print('tapped!');
    },
    style: <style>
    child: const Text('Save'),,
)
SleekButton(
    onTap: () {
        print('tapped!');
    },
    style: <style>
    child: Row(
        mainAxisSize: MainAxisSize.min,
        children: <Widget>[
            const Icon(Icons.check),
            const SizedBox(width: 6),
            const Text('Save'),
        ],
    ),
)

If the direct child is an Icon, the button will be a square.

SleekButton(
    onTap: () {
        print('tapped!');
    },
    style: <style>
    child: const Icon(Icons.check),
)
Styles
Flat
SleekButtonStyle.flat(
    context: context,
)
SleekButtonStyle.flat(
    size: SleekButtonSize.small,
    context: context,
)
SleekButtonStyle.flat(
    inverted: true,
    context: context,
)
SleekButtonStyle.flat(
    rounded: true,
    context: context,
)
SleekButtonStyle.flat(
    size: SleekButtonSize.medium,
    rounded: true,
    context: context,
)
Outlined
SleekButtonStyle.outlined(
    context: context,
)
SleekButtonStyle.outlined(
    size: SleekButtonSize.small,
    context: context,
)
SleekButtonStyle.outlined(
    inverted: true,
    context: context,
)
SleekButtonStyle.outlined(
    rounded: true,
    context: context,
)
SleekButtonStyle.outlined(
    size: SleekButtonSize.medium,
    rounded: true,
    context: context,
)
Light
SleekButtonStyle.light(
    context: context,
)
SleekButtonStyle.light(
    size = SleekButtonSize.small,
    context: context,
)
SleekButtonStyle.light(
    rounded = true,
    context: context,
)
SleekButtonStyle.light(
    size: SleekButtonSize.medium,
    rounded = true,
    context: context,
)
Colors

If you give a color, all variants (dark, light, invert) will be calculated with the help of the derived_colors package.

SleekButtonStyle.flat(
    color: const Color(0xFF)
    context: context,
)
 SleekButtonStyle.light(
    color: const Color(0xFFFFC369),
    context: context,
)
SleekButtonStyle.outlined(
    color: const Color(0xFF323232),
    context: context,
)
Theme

You can customize the default appearance of the button by adding a SleekButtonTheme in the tree. If a Theme is in the tree, it will use it tu deduce a default theme.

SleekButtonTheme(
    data: const SleekButtonThemeData(
        padding: 24,
        textStyle: TextStyle(fontSize: 11),
        cornerRadius: 8.0,
        iconTheme: IconThemeData(size: 10),
        fill: Color(0xFFFF0000),
        borderWidth: 2,
    ),
    child: app,
)

Thanks

Thanks to the bulma framework team for the inspiration.

카테고리

의존성

의존성 목록 3 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.