Flutter – SimpleDialog in FloatingActionButton

I noticed the accepted answer is using child for showDialog which is actually deprecated, so I would recommend avoiding it. You should be using builder instead, I’ve provided an example:

onPressed: () {
    showDialog(
        context: context,
        builder: (_) => AlertDialog(
            title: Text('Dialog Title'),
            content: Text('This is my content'),
        )
    );
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)