dialog_kit 0.0.1
dialog_kit: ^0.0.1 copied to clipboard
Dialog Kit - A collection of extensive, customizable dialogs for Flutter.
Dialog Kit #
🚀 Dialog Kit is a Flutter package providing beautiful, customizable dialogs ready to use in your apps. Instead of rewriting the same dialog boilerplate again and again, just plug and play from our collection!
✨ Features #
-
Pre-built dialogs for:
- 📱 Account Setup
- ⚠️ Alerts
- 🌐 No Internet
- ⭐ Ratings
- ✅ Results
- ⬆️ Updates
-
Light & Dark theme support.
-
Highly customizable via config classes.
-
Clean API with centralized services.
📦 Installation #
Add this to your pubspec.yaml:
dependencies:
dialog_kit: ^0.0.1
Then run:
flutter pub get
Import in your Dart code:
import 'package:dialog_kit/dialog_kit.dart';
🚀 Usage Example (Rating Dialog) #
Quick Example #
import 'package:flutter/material.dart';
import 'package:dialog_kit/dialog_kit.dart';
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key});
void _showRatingDialog(BuildContext context) {
RatingDialogService.show(
context: context,
dialogType: RatingDialogType.DK001,
config: RatingDialog001Config(
title: "Enjoying Dialog Kit?",
description: "Please rate us and help us improve!",
laterText: "Not Now",
rateNowText: "Rate Now",
initialRating: 4,
onRateNow: (rating) {
debugPrint("User rated: $rating ⭐");
},
onLater: () {
debugPrint("User clicked Maybe Later");
},
),
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text("Dialog Kit Example")),
body: Center(
child: ElevatedButton(
onPressed: () => _showRatingDialog(context),
child: const Text("Show Rating Dialog"),
),
),
);
}
}
🛠️ Customization #
Each dialog comes with its own Config class.
For example, RatingDialog001Config lets you customize:
RatingDialog001Config(
title: "Rate Our App",
description: "Would you mind rating us on the App Store?",
laterText: "Maybe Later",
rateNowText: "Rate Now",
maxRating: 5,
headerColor: Colors.amber,
starColor: Colors.amber,
buttonColor: Colors.blue,
isDark: false,
initialRating: 3,
onRateNow: (rating) => print("Rated $rating"),
onLater: () => print("Later pressed"),
);
📚 Dialog Types #
✅ Rating Dialogs: RatingDialog001 → RatingDialog006
✅ Update Dialogs: UpdateDialog001 → UpdateDialog005
✅ Alert Dialogs, Result Dialogs, Account Setup Dialogs → More coming soon!
📝 License #
This project is licensed under the MIT License.