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

awesome_dialog 표지
패키지 상세v3.3.0

awesome_dialog

애니메이션을 사용하여 가장 간단한 방법으로 아름다운 대화 상자(INFO, QUESTION, WARNING, SUCCESS, ERROR)를 표시하는 Flutter 패키지입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
1.7만
좋아요
1.5천
Pub 점수
150

패키지 설치

flutter pub add awesome_dialog

패키지 개요

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

Awesome Dialog는 INFO, QUESTION, WARNING, SUCCESS, ERROR와 같은 다양한 알림 유형을 위한 시각적으로 매력적인 대화 상자와 부드러운 애니메이션을 표시할 수 있도록 해주는 Flutter 패키지입니다. 간단한 설계로 최소한의 코드로 빠르게 통합할 수 있습니다. Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원하여 크로스플랫폼 애플리케이션에 이상적입니다. 사용자 정의 테마와 내장된 애니메이션 효과를 통해 복잡한 설정 없이도 사용자 경험을 향상시킵니다.

사용 사례

  • 앱 알림 표시
  • 확인 대화 상자 표시
  • 사용자 피드백 향상
  • 성공 또는 오류 메시지 만들기
  • 애니메이션 알림 추가

주요 기능

  • 사전 정의된 대화 유형
  • 부드러운 애니메이션
  • 크로스 플랫폼 지원
  • 최소 설정
  • 사용자 정의 가능한 외관
  • 내장 테마

적합한 대상

  • 초보자 플러터 개발자
  • 시각적 피드백이 필요한 앱
  • 크로스 플랫폼 프로젝트
  • 간단한 UI 개선
  • 빠른 프로토타이핑

고려 사항

  • 기본 스타일링을 초과한 사용자 정의는 제한적
  • 고급 디자인을 위해 추가 스타일링이 필요할 수 있습니다
  • 외부 애니메이션 라이브러리에 의존합니다
  • 복잡한 모달 인터페이스에 적합하지 않습니다
  • 저사양 기기에서의 애니메이션 성능

원본 README

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

awesome_dialog

A new Flutter package project for simple and awesome dialogs

Usage

To use this package, add awesome_dialog as a dependency in your pubspec.yaml file. And add this import to your file.

import 'package:awesome_dialog/awesome_dialog.dart';

Demo

Check out https://cv.toranzo.dev/awesome-dialog for more fun.

Image

alt text

Example
AwesomeDialog(
            context: context,
            dialogType: DialogType.info,
            animType: AnimType.rightSlide,,
            title: 'Dialog Title',
            desc: 'Dialog description here.............',
            btnCancelOnPress: () {},
            btnOkOnPress: () {},
            )..show();

Custom Body

If the body is specified, then title and description will be ignored, this allows to further customize the dialogue.

AwesomeDialog(
            context: context,
            animType: AnimType.scale,
            dialogType: DialogType.info,
            body: Center(child: Text(
                    'If the body is specified, then title and description will be ignored, this allows to 											further customize the dialogue.',
                    style: TextStyle(fontStyle: FontStyle.italic),
                  ),),
            title: 'This is Ignored',
            desc:   'This is also Ignored',
            btnOkOnPress: () {},
            )..show();

Custom Button

To use custom buttons, just specify the buttonOk or btnCancel widget, all text parameters icon etc will be ignored.

Dissmiss and Callback

AwesomeDialog has onDismissCallback(type) and can be dismissed at any time using dismiss() public method.

AwesomeDialog Class
Dart attribute Datatype Description Default Value
dialogType DialogType Set DialogType example: DialogType.info, this create an animated Header. Null
customHeader Widget Create your own header(if this is set DiaologType is ignored.) Null
width double The maximum width of the dialog, especially useful in web flutter, or landscape mode MediaQuery.of(context).size.width.
title String Set the title of dialog. Null
desc String Set the description text of the dialog. Null
body Widget Create your own Widget for body, if this property is set title and description will be ignored. Null
context BuildContext @required Null
btnOkText String Text of positive button 'Ok'
btnOkIcon IconData Icon of positive button Null
btnOkOnPress Function Function that handle click of positive Button, closing the dialog is handled internally. Null
btnOkColor Color Color of positive Button Color(0xFF00CA71)
btnOk Widget Allows to create a custom button, if this property is different from null then btnOkText, btnOkIcon, btnOkOnPress, btnOkColor will be ignored null
btnCancelText String Text of negative button 'Cancel'
btnCancelIcon IconData Icon of negative button Null
btnCancelOnPress Function Function that handle click of negative Button, closing the dialog is handled internally. Null
btnCancelColor Color Color of negative Button Colors.red
btnCancel Widget Allows to create a custom button, if this property is different from null then btnCancelText, btnCancelIcon, btnCancelOnPress, btnCancelColor will be ignored null
buttonsBorderRadius BorderRadiusGeometry Allows to customize buttons border radius BorderRadius.all(Radius.circular(100))
dismissOnTouchOutside bool Dismiss dialog on touch overlay true
onDismissCallback Function Dismiss callback function Null
animType AnimType Type of dialogue enter animation AnimType.SCALE
alignment AlignmentGeometry dialogue alignment gravity Alignment.center
useRootNavigator bool Use the root navigator instead than the local. This is useful when the default cancel go to the previous screen instead to just close the dialog false
headerAnimationLoop bool headerAnimationLoop control the loop for animation header true
padding EdgeInsetsGeometry The padding of dialog elements EdgeInsets.only(left: 5, right: 5),
autoHide Duration Hide the Dialog after this Duration null
keyboardAware bool Control if add or not the Padding EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom). true
dismissOnBackKeyPress bool control if AwesomeDialog is dismissible by back button. true
buttonsBorderRadius BorderRadiusGeometry Border Radius for built in buttons. BorderRadius.all(Radius.circular(100)
buttonsTextStyle TextStyle TextStyle for built in buttons. TextStyle(color: Colors.white, fontWeight:FontWeight.w700, fontSize: 14)
showCloseIcon bool Control if close icon is appear. false
closeIcon Widget Custom closeIcon. null
dialogBackgroundColor Color custom background color for entire dialog. Theme.of(context).cardColor
borderSide BorderSide enable border en entire dialog shape null
autoDismiss bool When stetted to false clicking Ok or Cancel button won't dismiss the dialog. You can pass custom Navigator.pop function in the onDissmissCallback. true
barrierColor Color Color for the barrier around the dialog Colors.black54
enableEnterKey bool If true, hitting Enter key will act like pressing the Ok button. false

카테고리

의존성

의존성 목록 1 개

소스 저장소

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