popup_box 0.0.2+pre-v0.1 copy "popup_box: ^0.0.2+pre-v0.1" to clipboard
popup_box: ^0.0.2+pre-v0.1 copied to clipboard

outdated

A Flutter package to easily create popup boxes with a button , "close alert" by default.

example/lib/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'PopupBox Package'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Text(
          'To show a popup box, click the floating action button.',
          style: TextStyle(
            fontSize: 15,
          ),
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () async {
          await PopupBox.showPopupBox(
              context: context,
              willDisplayWidget: Container(
                child: Text('An example popup box text'),
              ));
        },
        tooltip: 'Show Popup Box Box',
        child: Icon(Icons.message),
      ),
    );
  }
}
4
likes
40
pub points
0%
popularity

Publisher

verified publisherrishit.tech

A Flutter package to easily create popup boxes with a button , "close alert" by default.

Repository (GitHub)
View/report issues

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on popup_box