A lightweight, modern alert dialog package for Flutter.
KAlertFlutter provides success, error, warning, info, confirm, and prompt dialogs using a clean and simple API. It helps reduce boilerplate code when working with dialogs in Flutter apps.
π pub.dev package: https://pub.dev/packages/kalertflutter
If you find KAlertFlutter useful, please consider supporting the project:
β Star this repository
π Report issues
π‘ Suggest new features
And donβt forget to follow me on Instagram for more developer content:
πΈ https://instagram.com/coderx09
Thanks for your support! π
β Success dialog
β Error dialog
β Warning dialog
β Info dialog
β Confirm dialog with boolean response
β Prompt dialog with input field
β Clean enum-based API
β Rounded modern UI dialogs
β Lightweight and dependency-free
β Uses native Flutter Material dialogs
Add the package:
dependencies:
kalertflutter: ^1.2.0Then run:
flutter pub getImport the package:
import 'package:kalertflutter/kalertflutter.dart';KAlert.show(
context,
title: "Success",
message: "Saved successfully!",
type: KAlertType.success,
);Supported dialog types:
success
error
warning
info
Example:
KAlert.show(
context,
title: "Error",
message: "Something went wrong!",
type: KAlertType.error,
);bool? result = await KAlert.confirm(
context,
title: "Delete file?",
message: "This action cannot be undone",
);
if (result == true) {
print("User confirmed");
}String? value = await KAlert.prompt(
context,
title: "Enter your name",
);
print(value);ElevatedButton(
onPressed: () {
KAlert.show(
context,
title: "Hello",
message: "Welcome to KAlertFlutter",
type: KAlertType.info,
);
},
child: const Text("Show Alert"),
);GitHub:
https://github.com/TutorialsAndroid/KAlertFlutter
Issues and feature requests are welcome.
MIT License
Free for personal and commercial use.