Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

sweetalertv2

sweetalertv2 for flutter.

showcases

preview--1--2

getting started

add dependency

sweetalertv2: any

usage

basic usage

1--3-

sweetalertv2.show(context, title: "just show a message");

with a subtitle

2--3-

sweetalertv2.show(context,
	title: "just show a message",
	subtitle: "sweet alert is pretty");

with a success state

3--2-

sweetalertv2.show(context,
	title: "just show a message",
	subtitle: "sweet alert is pretty",
	style: sweetalertv2style.success);

with a confirm state

4--1-

sweetalertv2.show(context,
	title: "just show a message",
	subtitle: "sweet alert is pretty",
	style: sweetalertv2style.confirm,
	showcancelbutton: true, onpress: (bool isconfirm) {
		if (isconfirm) {
			sweetalertv2.show(context,style: sweetalertv2style.success,title: "success");
			// return false to keep dialog
			return false;
        }
	});

do some job

sweetalertv2.show(context,
	subtitle: "do you want to delete this message",
	style: sweetalertv2style.confirm,
	showcancelbutton: true, onpress: (bool isconfirm) {
		if(isconfirm){
			sweetalertv2.show(context,subtitle: "deleting...", style: sweetalertv2style.loading);
			new future.delayed(new duration(seconds: 2),(){
				sweetalertv2.show(context,subtitle: "success!", style: sweetalertv2style.success);
			});
		}else{
			sweetalertv2.show(context,subtitle: "canceled!", style: sweetalertv2style.error);
		}

		// return false to keep dialog
		return false;
	});

special thanks

  • best-flutter (initial project)

Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Top