----___<<<<< 2020. 5. 7. 15:58

import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Alert(),
    );
  }
}


class Alert extends StatefulWidget {
  @override
  _AlertState createState() => _AlertState();
}

class _AlertState extends State<Alert> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: RaisedButton(
          child: Text("AlertButton"),
          onPressed: (){
            showAlertDialog(context);
          },
        ),
      ),
    );
  }


  showAlertDialog(BuildContext context) {

    AlertDialog alert = AlertDialog(
      title: Text("title"),
      content: Text("Context"),
      actions: [

      ],
    );

    showDialog(
      context: context,
      builder: (BuildContext context) {
        return alert;
      }
    );

  }

}