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

easy_loading_button 표지
패키지 상세v0.4.0

easy_loading_button

간단하고 사용하기 쉬우며 사용자 정의 가능한 진행률/로딩용 _Material Flutter 버튼_으로 다양한 버튼 스타일(에레베이티드, 아웃라인, 텍스트)을 지원합니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
787
좋아요
70
Pub 점수
150

패키지 설치

flutter pub add easy_loading_button

패키지 개요

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

EasyLoadingButton은 에레베이티드, 아웃라인, 텍스트 버튼 등 다양한 스타일을 지원하는 간단하고 사용자 정의 가능한 진행률/로딩 버튼을 제공하는 Flutter 패키지입니다. 비동기 작업 중에 로딩 상태를 원활하게 표시함으로써 사용자 경험을 향상시킵니다. 버튼은 쉽게 통합하고 구성할 수 있으며, 일반 상태와 로딩 상태 사이에 부드러운 전환을 제공합니다. 폼, 액션 및 처리 중 피드백이 필요한 모든 UI 요소에 적합합니다.

사용 사례

  • 양식 제출
  • 비동기 작업 트리거
  • 로그인/가입 버튼
  • 결제 처리
  • 데이터 저장 작업

주요 기능

  • 여러 가지 버튼 스타일
  • 사용자 정의 가능한 로딩 표시기
  • 부드러운 상태 전환
  • 간편한 통합
  • 모든 플러터 플랫폼을 지원합니다
  • 사용자 지정 가능한 색상 및 크기

적합한 대상

  • 초보자 플러터 개발자
  • 간단한 앱 인터페이스
  • 빠른 프로토타이핑
  • 사용자 친화적인 폼
  • 비동기 작업 중 명확한 피드백이 필요한 앱

고려 사항

  • 제한된 고급 사용자 정의 옵션
  • 복잡한 디자인을 위해 추가적인 스타일링이 필요할 수 있습니다
  • 매우 동적 또는 애니메이션 버튼에 적합하지 않음
  • Material 디자인 원칙에 의존합니다
  • 표준 Material 기반 앱에서 가장 잘 사용됩니다

원본 README

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

easy_loading_button

GitHub repo size GitHub code size in bytes GitHub top language GitHub issues GitHub license

easy_loading_button is a simple, easy to use, and customizeable progress/loading Material Flutter Button that supports variety of button styles (elevated, outlined, text).

Or try the demo on DartPad

Get started

Depend on it

Add this to your package's pubspec.yaml file:

easy_loading_button: ^0.3.2
Install it

You can install packages from the command line:

$ flutter pub get

Alternatively, your editor might support flutter pub get.

Import it

Now in your Dart code, you can use:

import 'package:easy_loading_button/easy_loading_button.dart';

How to use

Add EasyButton to your widget tree:

EasyButton(
  type: EasyButtonType.elevated,

  // Content inside the button when the button state is idle.
  idleStateWidget: const Text(
    'Elevated Button',
    style: TextStyle(
      color: Colors.white,
    ),
  ),

  // Content inside of the button when the button state is loading.
  loadingStateWidget: const CircularProgressIndicator(
    strokeWidth: 3.0,
    valueColor: AlwaysStoppedAnimation<Color>(
      Colors.white,
    ),
  ),

  // Whether or not to animate the width of the button. Default is `true`.
  // If this is set to `false`, you might want to set the `useEqualLoadingStateWidgetDimension` parameter to `true`.
  useWidthAnimation: true,

  // Whether or not to force the `loadingStateWidget` to have equal dimension. Default is `true`.
  // This is useful when you are using `CircularProgressIndicator` as the `loadingStateWidget`.
  // This parameter might also be useful when you set the `useWidthAnimation` parameter to `true` combined with `CircularProgressIndicator` as the value for `loadingStateWidget`.
  useEqualLoadingStateWidgetDimension: true,

  // If you want a fullwidth size, set this to double.infinity
  width: 150.0,

  height: 40.0,
  borderRadius: 4.0,

  // The elevation of the button.
  // This will only be applied when the type parameter value is EasyButtonType.elevated
  elevation: 0.0,

  // The gap between button and it's content.
  // This will be ignored when the `type` parameter value is set to `EasyButtonType.text`
  contentGap: 6.0,

  // Color for the button.
  // For [EasyButtonType.elevated]: This will be the background color.
  // For [EasyButtonType.outlined]: This will be the border color.
  // For [EasyButtonType.text]: This will be the text color.
  buttonColor: Colors.blueAccent,

  onPressed: () {},
),

More parameters:

const EasyButton({
  Key? key,
  required this.idleStateWidget,
  required this.loadingStateWidget,
  this.type = EasyButtonType.elevated,
  this.useWidthAnimation = true,
  this.useEqualLoadingStateWidgetDimension = true,
  this.width = double.infinity,
  this.height = 40.0,
  this.contentGap = 0.0,
  this.borderRadius = 0.0,
  this.elevation = 0.0,
  this.buttonColor = Colors.blueAccent,
  this.onPressed,
}) : super(key: key);

Three types supported:

enum EasyButtonType {
    elevated,
    outlined,
    text,
}

Source

Source code and example of this library can be found in git:

$ git clone https://github.com/usefulteam/easy_loading_button.git

License

MIT License

Credits

Thanks to Yang JIANG for the flutter_progress_button package.

My package was based on it. You can also visit their package pub.dev page.

카테고리

소스 저장소

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

아직 데이터가 없습니다.