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

Custom alert can show customizable and flexible alerts

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:customalert/custom_alert.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Custom alert test',
        debugShowCheckedModeBanner: false,
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: CustomAlertTest());
  }
}

class CustomAlertTest extends StatefulWidget {
  CustomAlertTest({Key key}) : super(key: key);

  @override
  _CustomAlertTestState createState() => _CustomAlertTestState();
}

class _CustomAlertTestState extends State<CustomAlertTest> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      floatingActionButton: FloatingActionButton(
        onPressed: () async {
          await CustomAlert.showCustomAlert(
            context: context,
            title: "Hello",
            willDisplayWidget: Center(
              child: Text("Content Here!"),
            ),
            borderRadius: 10.0,
          );
        },
        tooltip: 'Show Custom Alert Box',
        child: Icon(Icons.message),
      ),
      body: Container(
        child: Center(
          child: Text('Custom Alert Test'),
        ),
      ),
    );
  }
}
1
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Custom alert can show customizable and flexible alerts

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on customalert