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

art_sweetalert 표지
패키지 상세v0.0.5

art_sweetalert

아름답고 반응형이며 사용자 정의가 가능하고 접근성이 뛰어난 Flutter 팝업 박스의 대체품입니다. iOS와 Android 모두 지원합니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
517
좋아요
54
Pub 점수
140

패키지 설치

flutter pub add art_sweetalert

패키지 개요

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

ArtSweetAlert은 시각적으로 매력적이고 반응성이 뛰어나며 고도로 사용자 정의 가능한 Flutter용 대화 상자 패키지로, 표준 팝업 대화 상자의 접근성과 사용 편의성을 높인 대안을 제공합니다. Android, iOS, Web, macOS, Windows, Linux 등 모든 주요 플랫폼을 지원하여 기기 간 일관된 사용자 경험을 보장합니다. 부드러운 애니메이션과 현대적인 디자인으로 앱의 상호작용을 향상시키면서 접근성 기준을 유지합니다. 스타일리시하게 경고, 확인 및 알림을 표시하기에 적합합니다.

사용 사례

  • 경고 메시지 표시
  • 사용자 확인 대화상자
  • 로딩 표시기
  • 성공 또는 오류 알림
  • 사용자 정의 가능한 팝업

주요 기능

  • 아름다운 애니메이션
  • 크로스 플랫폼 지원
  • 접근성 호환
  • 매우 사용자 정의 가능
  • 간편한 통합
  • 반응형 디자인

적합한 대상

  • 현대적인 UI 대화 상자를 필요로 하는 앱
  • UX를 우선시하는 개발자
  • 일관된 크로스플랫폼 동작이 필요한 프로젝트
  • 빠른 구현을 원하는 팀
  • 여러 운영 체제를 대상으로 하는 앱

고려 사항

  • 복잡한 사용 사례를 위해 추가 스타일링이 필요할 수 있습니다
  • 대화형 상호작용에 제한됨
  • 과도한 사용 시 성능 영향
  • 외부 종속성에 의존합니다
  • 대화형이 아닌 UI 컴포넌트에는 적합하지 않습니다

원본 README

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

art_sweetalert

A beautiful, responsive, customizable, accessible replacement, easy use for flutter popup boxes. Both supported ios and android.

A success message

ArtSweetAlert.show(
  context: context,
  artDialogArgs: ArtDialogArgs(
    type: ArtSweetAlertType.success,
    title: "A success message!",
    text: "Show a success message with an icon"
  )
);

A message with title and text

ArtSweetAlert.show(
    context: context,
    artDialogArgs: ArtDialogArgs(
        type: ArtSweetAlertType.question,
        title: "A question?",
        text: "Show a question message with an icon"
    )
);

An error message

ArtSweetAlert.show(
    context: context,
    artDialogArgs: ArtDialogArgs(
        type: ArtSweetAlertType.danger,
        title: "Oops...",
        text: "There is a problem :("
    )
);

A dialog with three buttons

ArtDialogResponse response = await ArtSweetAlert.show(
  barrierDismissible: false,
  context: context,
  artDialogArgs: ArtDialogArgs(
    showCancelBtn: true,
    denyButtonText: "Don't save",
    title: "Do you want to save the changes?",
    confirmButtonText: "Save",
  )
);

if(response==null) {
  return;
}

if(response.isTapConfirmButton) {
  ArtSweetAlert.show(
    context: context,
    artDialogArgs: ArtDialogArgs(
      type: ArtSweetAlertType.success,
      title: "Saved!"
    )
  );
  return;
}

if(response.isTapDenyButton) {
  ArtSweetAlert.show(
    context: context,
    artDialogArgs: ArtDialogArgs(
      type: ArtSweetAlertType.info,
      title: "Changes are not saved!"
    )
  );
  return;
}

A confirm dialog

ArtDialogResponse response = await ArtSweetAlert.show(
  barrierDismissible: false,
  context: context,
  artDialogArgs: ArtDialogArgs(
    denyButtonText: "Cancel",
    title: "Are you sure?",
    text: "You won't be able to revert this!",
    confirmButtonText: "Yes, delete it",
    type: ArtSweetAlertType.warning
  )
);

if(response==null) {
  return;
}

if(response.isTapConfirmButton) {
  ArtSweetAlert.show(
      context: context,
      artDialogArgs: ArtDialogArgs(
          type: ArtSweetAlertType.success,
          title: "Deleted!"
      )
  );
  return;
}


A message with a custom image



ArtSweetAlert.show(
    context: context,
    artDialogArgs: ArtDialogArgs(
        title: "Sweet!",
        text: "Modal with a custom image.",
        customColumns: [
          Container(
            margin: EdgeInsets.only(
                bottom: 12.0
            ),
            child: Image.network(
              "https://unsplash.it/400/200",
            ),

          )
        ]
    )
);


Submit your Github username!

ArtDialogResponse response = await ArtSweetAlert.show(
    artDialogKey: _artDialogKey,
    context: context,
    artDialogArgs: ArtDialogArgs(
        title: "Submit your Github username!",
        customColumns: [
            Container(
                margin: EdgeInsets.only( bottom: 20.0 ),
                child: CupertinoTextField(
                    controller: _textController,
                ),
            )
        ],
        onConfirm: () async  {
            _artDialogKey.currentState.showLoader();
            var response = await http.get(Uri.parse('https://api.github.com/users/'+_textController.text));
            if(response.statusCode!=200) {
                _artDialogKey.currentState.hideLoader();
                _artDialogKey.currentState.showErrors(["Request failed: Error"]);
                return;
            }
            var body = response.body;
            var bodyJson = json.decode(body);
            _artDialogKey.currentState.hideLoader();
            _artDialogKey.currentState.closeDialog( data: { "image": bodyJson["avatar_url"] } );
        },
        onDispose: () {
            _artDialogKey = GlobalKey<ArtDialogState>();
        },
    )
);

if (response == null) { return; }

if (response.isTapConfirmButton) {
    ArtSweetAlert.show(
        context: context,
        artDialogArgs: ArtDialogArgs(
            customColumns: [
                Container(
                    margin: EdgeInsets.only(bottom: 12.0),
                    child: Image.network( response.data["image"]),
                )
            ]
        )
    );
    return;
}


카테고리

소스 저장소

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

아직 데이터가 없습니다.