Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pub.dev license flutter

KAlertFlutter

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



❤️ Support the Project

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! 🚀


✨ Features

✅ 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


📦 Installation

Add the package:

dependencies:
  kalertflutter: ^1.2.0

Then run:

flutter pub get

🚀 Usage

Import the package:

import 'package:kalertflutter/kalertflutter.dart';

📘 Show Alert Dialog

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,
);

📘 Confirm Dialog

bool? result = await KAlert.confirm(
  context,
  title: "Delete file?",
  message: "This action cannot be undone",
);

if (result == true) {
  print("User confirmed");
}

📘 Prompt Dialog (User Input)

String? value = await KAlert.prompt(
  context,
  title: "Enter your name",
);

print(value);

🛠 Example

ElevatedButton(
onPressed: () {
KAlert.show(
context,
title: "Hello",
message: "Welcome to KAlertFlutter",
type: KAlertType.info,
);
},
child: const Text("Show Alert"),
);

📂 Repository

GitHub:

https://github.com/TutorialsAndroid/KAlertFlutter

Issues and feature requests are welcome.


📜 License

MIT License

Free for personal and commercial use.

About

KAlertFlutter is a lightweight, modern, and professional alert dialog package for Flutter. It is inspired by the native Android Java library KAlertDialog and brings a similar beautiful dialog experience to Flutter apps.

Topics

Resources

Stars

Watchers

Forks

Releases

Sponsor this project

Packages

Contributors

Languages