flutter_progress_button
flutter_progress_button은 무료이며 오픈소스(MIT 라이선스)인 Material Flutter 버튼으로, 다양한 버튼 스타일 요구 사항을 지원합니다. 사용하기 쉽고 사용자 정의가 가능하도록 설계되었습니다.
flutter_progress_button
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
flutter_progress_button is a free and open source (MIT license) Material Flutter Button that supports variety of buttons style demands. It is designed to be easy to use and customizable.
Add this to your package's pubspec.yaml file:
flutter_progress_button: '^1.0.0'
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support flutter pub get.
Now in your Dart code, you can use:
import 'package:flutter_progress_button/flutter_progress_button.dart';
Add ProgressButton to your widget tree:
ProgressButton(
defaultWidget: const Text('I am a button'),
progressWidget: const CircularProgressIndicator(),
width: 196,
height: 40,
onPressed: () async {
int score = await Future.delayed(
const Duration(milliseconds: 3000), () => 42);
// After [onPressed], it will trigger animation running backwards, from end to beginning
return () {
// Optional returns is returning a VoidCallback that will be called
// after the animation is stopped at the beginning.
// A best practice would be to do time-consuming task in [onPressed],
// and do page navigation in the returned VoidCallback.
// So that user won't missed out the reverse animation.
};
},
),
More parameters:
ProgressButton({
Key key,
this.defaultWidget,
this.progressWidget,
this.onPressed,
this.type = ProgressButtonType.Raised,
this.color,
this.width = double.infinity,
this.height = 40.0,
this.borderRadius = 2.0,
this.animate = true,
}) : super(key: key);
Three types supported:
enum ProgressButtonType {
Raised,
Flat,
Outline,
}
Source code and example of this library can be found in git:
$ git clone https://github.com/jiangyang5157/flutter_progress_button.git
의존성 목록 2 개
{"sdk":"flutter"}{"sdk":"flutter"}사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗