flutter_custom_alert 0.0.3
flutter_custom_alert: ^0.0.3 copied to clipboard
This package provides a beautiful customizable alert dialog for Flutter applications.
Getting started #
Add package
flutter pub add flutter_custom_alert
Usage #
import 'package:custom_alert/custom_alert.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
),
home: const Home(),
);
}
}
class Home extends StatelessWidget {
const Home({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ElevatedButton(
onPressed: () => CustomAlert.show(context: context),
child: const Text("Show Alert"),
),
],
),
),
);
}
}