blur_dialog 0.0.1
blur_dialog: ^0.0.1 copied to clipboard
A simple Flutter package to show dialogs with a blurred background effect.
import 'package:flutter/material.dart';
import 'package:blur_dialog/blur_dialog.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Blur Dialog Example')),
body: Center(
child: ElevatedButton(
onPressed: () {
showBlurDialog(
context: context,
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const Text("Blur Dialog",
style: TextStyle(
fontSize: 18, fontWeight: FontWeight.bold)),
const SizedBox(height: 10),
const Text("This dialog has a blurred background."),
const SizedBox(height: 20),
ElevatedButton(
onPressed: () => Navigator.of(context).pop(),
child: const Text("Close"),
),
],
),
),
);
},
child: const Text("Open Blur Dialog"),
),
),
),
);
}
}