steel_alert 0.0.2 copy "steel_alert: ^0.0.2" to clipboard
steel_alert: ^0.0.2 copied to clipboard

Steel Alert is a Flutter package that provides a simple way to show alerts in your app.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:steel_alert/steel_alert.dart';

void main() {
  setupLocator();
  runApp(
    MaterialApp(
      navigatorKey: steelAlert.navigatorKey,
      home: const MyApp(),
      debugShowCheckedModeBanner: false,
    ),
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ElevatedButton(
              onPressed: () {
                steelAlert.success(
                  title: 'Success',
                  message: 'This is a success alert',
                );
              },
              child: const Text("Show Success Alert"),
            ),
            ElevatedButton(
              onPressed: () {
                steelAlert.error(
                  title: 'Error',
                  message: 'This is an error alert',
                );
              },
              child: const Text("Show Error Alert"),
            ),
            ElevatedButton(
              onPressed: () {
                steelAlert.warning(
                  title: 'Warning',
                  message: 'This is a warning alert',
                );
              },
              child: const Text("Show Warning Alert"),
            ),
          ],
        ),
      ),
    );
  }
}
5
likes
0
points
13
downloads

Publisher

unverified uploader

Weekly Downloads

Steel Alert is a Flutter package that provides a simple way to show alerts in your app.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, get_it

More

Packages that depend on steel_alert