import 'package:flutter/material.dart'; var baseDialogTheme = DialogTheme( backgroundColor: Colors.green[100], elevation: 40.0, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15.0)), ); AlertDialog Function(BuildContext) errorDialogBuilder(String title, String message) { return (BuildContext context) => AlertDialog(title: Text(title), content: Text(message), actions: [ RaisedButton( onPressed: () => Navigator.of(context).pop(), child: Text( "Dismiss", style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black), ), ) ]); }