error_aesthetics 0.1.0
error_aesthetics: ^0.1.0 copied to clipboard
A customizable Flutter library for elegant error and status displays (SnackBar, Toast, Dialog) with full theming and light/dark support.
example/main.dart
import 'package:flutter/material.dart';
import 'package:error_aesthetics/error_aesthetics.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Error Aesthetics Demo',
home: const HomeScreen(),
);
}
}
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
void _triggerError(BuildContext context) {
showError(
context,
"Something went wrong!",
displayType: ErrorDisplayType.dialog,
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text("Error Aesthetics Example")),
body: Center(
child: ElevatedButton(
onPressed: () => _triggerError(context),
child: const Text("Show Error"),
),
),
);
}
}