DEV Community

Discussion on: Flutter, what is it?

Collapse
 
jwp profile image
John Peters • Edited

It was Flutter..


Widget _buildAndroid(BuildContext context) {
    return RaisedButton(
      child: Text('LOG OUT', style: TextStyle(color: Colors.red)),
      onPressed: () {
        // You should do something with the result of the dialog prompt in a
        // real app but this is just a demo.
        showDialog<void>(
          context: context,
          builder: (context) {
            return AlertDialog(
              title: Text('Log out?'),
              content: _logoutMessage,
              actions: [
                FlatButton(
                  child: const Text('Got it'),
                  onPressed: () => Navigator.pop(context),
                ),
                FlatButton(
                  child: const Text('Cancel'),
                  onPressed: () => Navigator.pop(context),
                ),
              ],
            );
          },
        );
      },