Buscar pacotes, repositórios e categorias de apps

Repositório GitHubbest-flutter/sweetalert

sweetalert

sweetalert para flutter

Capa do projeto sweetalert
Estrelas
55
Forks
35
Último push (UTC)
11 de jan. de 2023
Status do projeto
Ativo

README original

Texto original em inglês. Visite o GitHub para a versão atual.

pub package

sweetalert

sweetalert for flutter.

Showcases

Getting started

Add dependency
sweetalert: any
Usage
Basic usage

 SweetAlert.show(context, title: "Just show a message");
With a subtitle

 SweetAlert.show(context,
                      title: "Just show a message",
                      subtitle: "Sweet alert is pretty");
With a success state

 SweetAlert.show(context,
                      title: "Just show a message",
                      subtitle: "Sweet alert is pretty",
                      style: SweetAlertStyle.success);
With a confirm state

SweetAlert.show(context,
                      title: "Just show a message",
                      subtitle: "Sweet alert is pretty",
                      style: SweetAlertStyle.confirm,
                      showCancelButton: true, onPress: (bool isConfirm) {
        if (isConfirm) {
          SweetAlert.show(context,style: SweetAlertStyle.success,title: "Success");
          // return false to keep dialog
          return false;
        }
      });
Do some job
 SweetAlert.show(context,
          subtitle: "Do you want to delete this message",
          style: SweetAlertStyle.confirm,
          showCancelButton: true, onPress: (bool isConfirm) {
        if(isConfirm){
          SweetAlert.show(context,subtitle: "Deleting...", style: SweetAlertStyle.loading);
          new Future.delayed(new Duration(seconds: 2),(){
            SweetAlert.show(context,subtitle: "Success!", style: SweetAlertStyle.success);
          });
        }else{
          SweetAlert.show(context,subtitle: "Canceled!", style: SweetAlertStyle.error);
        }
        // return false to keep dialog
        return false;
      });
best-flutter GitHub avatar
Autor no GitHub

best-flutter ↗

China
LinguagensDartObjective-CJava

Categorias

Dependências usadas

Lista de dependências 3 itens

Como escolher um repositório para seu projeto?

Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.

  1. Busque por nome, autor ou descrição e filtre por tema.
  2. Compare estrelas, forks e envios recentes. Estrelas indicam interesse, mas não garantem qualidade.
  3. Confira o README, a licença e as issues no GitHub antes de usar o projeto.

Fontes e manutenção

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗