wmh_customalert 0.0.1 copy "wmh_customalert: ^0.0.1" to clipboard
wmh_customalert: ^0.0.1 copied to clipboard

A customAlert for JiuJi.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: MyAppStateful(),
    );
  }
}

class MyAppStateful extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyAppStateful> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: InkWell(
          child: Container(
            width: 100,
            height: 100,
            color: Colors.red,
          ),
          onTap: () {
            showDialog(
              context: context,
              barrierDismissible: false,
              builder: (BuildContext context) {
                return WmhCustomalert(alertType: AlertType.twoBtn, cancelTitle: '取消', confirmTitle: '好的', cancelCallBack: null, confirmCallBack: () {
                  print('hahahahah');
                }, title: '温馨提示', content: '明天就礼拜五啦!!!',);
              }
            );
          },
        ),
      ),
    );
  }
}
0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

A customAlert for JiuJi.

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on wmh_customalert