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

rflutter_alert 표지
패키지 상세v2.0.7

rflutter_alert

RFlutter Alert는 Flutter용으로 매우 사용자 정의가 가능하고 사용하기 쉬운 알림/팝업 대화상입니다. 재사용 가능한 알림 스타일을 만들거나 원하는 만큼 버튼을 추가할 수 있습니다.

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

패키지 설치

flutter pub add rflutter_alert

패키지 개요

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

RFlutter Alert는 Flutter 애플리케이션에서 알림 및 팝업 대화상자를 생성하기 위한 사용자 친화적이고 사용자 정의 가능한 패키지입니다. 개발자가 무제한의 버튼을 지원하는 재사용 가능한 알림 스타일을 쉽게 만들 수 있으며, 애니메이션, 색상, 콘텐츠 레이아웃과 같은 다양한 커스터마이징 옵션을 제공합니다. 여러 플랫폼에서 알림, 확인 또는 상호작용 프롬프트를 표시하는 데 이상적입니다. 이 패키지는 Flutter 위젯 시스템과 원활하게 통합되며 ratel.com.tr에서 유지보수됩니다.

사용 사례

  • 확인 대화 상자 표시
  • 사용자 지정 알림 표시
  • 재사용 가능한 경고 템플릿 만들기
  • 팝업을 통한 사용자 입력 처리
  • 온보딩 팁 구현
  • 양식 검증 경고 관리

주요 기능

  • 높은 사용자 정의가 가능한 외관
  • 여러 버튼 지원
  • 재사용 가능한 경고 스타일
  • 내장 애니메이션
  • 크로스 플랫폼 호환성
  • Flutter와의 간편한 통합

적합한 대상

  • 초보자 플러터 개발자
  • 자주 알림이 필요한 앱
  • 인터랙티브 UI 컴포넌트
  • 다중 플랫폼 앱
  • 사용자 지정 대화 상자 디자인
  • 빠른 프로토타이핑

고려 사항

  • 복잡한 레이아웃을 위해 추가 스타일링이 필요할 수 있습니다
  • 완전한 UI 라이브러리에 비해 내장 테마가 제한적임
  • 많은 중첩 알림으로 인한 성능 영향 가능성
  • 무거운 모달 워크플로우에 적합하지 않음
  • 버튼 콜백을 수동으로 처리해야 합니다
  • 간단한부터 중간 정도로 복잡한 대화 상자에 적합

원본 README

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

RFlutter Alert

RFlutter Alert is super customizable and easy-to-use alert/popup dialogs for Flutter. You may create reusable alert styles or add buttons as much as you want with ease.

Version

Features

  • Single line basic alert
  • Adding buttons dynamically (as much as you want)
  • Predefined beautiful alert styles (success, error, warning, info)
  • Reusable alert styles
  • Super customizable
    • Change animation (fromTop, fromBottom, fromRight, fromLeft, grow, shrink) & Custom Animation
    • Set animation duration
    • Show/hide close button
    • Set overlay tap to dismiss
    • Assign Title and desc styles
    • Change dialog border style

Getting started

You must add the library as a dependency to your project.

dependencies:
 rflutter_alert: ^2.0.7

You can also reference the git repo directly if you want:

dependencies:
 rflutter_alert:
   git: git://github.com/RatelHub/rflutter_alert.git

You should then run flutter packages get

Example Project

There is a detailed example project in the example folder. You can directly run and play on it. There are code snippets from example project below.

Basic Alert

Alert(context: context, title: "RFLUTTER", desc: "Flutter is awesome.").show();

Alert with Button

    Alert(
      context: context,
      type: AlertType.error,
      title: "RFLUTTER ALERT",
      desc: "Flutter is more awesome with RFlutter Alert.",
      buttons: [
        DialogButton(
          child: Text(
            "COOL",
            style: TextStyle(color: Colors.white, fontSize: 20),
          ),
          onPressed: () => Navigator.pop(context),
          width: 120,
        )
      ],
    ).show();

Alert with Buttons

    Alert(
      context: context,
      type: AlertType.warning,
      title: "RFLUTTER ALERT",
      desc: "Flutter is more awesome with RFlutter Alert.",
      buttons: [
        DialogButton(
          child: Text(
            "FLAT",
            style: TextStyle(color: Colors.white, fontSize: 20),
          ),
          onPressed: () => Navigator.pop(context),
          color: Color.fromRGBO(0, 179, 134, 1.0),
        ),
        DialogButton(
          child: Text(
            "GRADIENT",
            style: TextStyle(color: Colors.white, fontSize: 20),
          ),
          onPressed: () => Navigator.pop(context),
          gradient: LinearGradient(colors: [
            Color.fromRGBO(116, 116, 191, 1.0),
            Color.fromRGBO(52, 138, 199, 1.0)
          ]),
        )
      ],
    ).show();

Alert with Style

AlertStyle

Use the AlertStyle class to customize.

    var alertStyle = AlertStyle(
      animationType: AnimationType.fromTop,
      isCloseButton: false,
      isOverlayTapDismiss: false,
      descStyle: TextStyle(fontWeight: FontWeight.bold),
      descTextAlign: TextAlign.start,
      animationDuration: Duration(milliseconds: 400),
      alertBorder: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(0.0),
        side: BorderSide(
          color: Colors.grey,
        ),
      ),
      titleStyle: TextStyle(
        color: Colors.red,
      ),
      alertAlignment: Alignment.topCenter,
    );

And assign your AlertStyle object to Alert's style field.

    Alert(
      context: context,
      style: alertStyle,
      type: AlertType.info,
      title: "RFLUTTER ALERT",
      desc: "Flutter is more awesome with RFlutter Alert.",
      buttons: [
        DialogButton(
          child: Text(
            "COOL",
            style: TextStyle(color: Colors.white, fontSize: 20),
          ),
          onPressed: () => Navigator.pop(context),
          color: Color.fromRGBO(0, 179, 134, 1.0),
          radius: BorderRadius.circular(0.0),
        ),
      ],
    ).show();

Alert with Custom Image

    Alert(
      context: context,
      title: "RFLUTTER ALERT",
      desc: "Flutter is better with RFlutter Alert.",
      image: Image.asset("assets/success.png"),
    ).show();

Alert with Custom Content

    Alert(
        context: context,
        title: "LOGIN",
        content: Column(
          children: <Widget>[
            TextField(
              decoration: InputDecoration(
                icon: Icon(Icons.account_circle),
                labelText: 'Username',
              ),
            ),
            TextField(
              obscureText: true,
              decoration: InputDecoration(
                icon: Icon(Icons.lock),
                labelText: 'Password',
              ),
            ),
          ],
        ),
        buttons: [
          DialogButton(
            onPressed: () => Navigator.pop(context),
            child: Text(
              "LOGIN",
              style: TextStyle(color: Colors.white, fontSize: 20),
            ),
          )
        ]).show();

Contributions

  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

Version compatability

See CHANGELOG for all breaking (and non-breaking) changes.


Made with ❤ by Ratel

카테고리

소스 저장소

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