CircleBorder Alert Dialog Box In Flutter Andorid App

admin_img Posted By Bajarangi soft , Posted On 10-09-2020

It takes in the ShapeBorder Widget as its value. There are different Border Widgets that are available in Flutter. An example includes BoxBorder, CircleBorder etc. For this example, we will use the CircleBorder and see how the AlertDialog turns out.

CircleBorder Alert Dialog Box In Flutter Andorid App

You Can Add CircleBorder Alert Dialog Box Code:

Column(children: <Widget>[
  AlertDialog(
    backgroundColor: Colors.pink,
    title: Text("Alert Dialog",textAlign: TextAlign.center,style: TextStyle(color: Colors.white),),
    content: Text("Alert Dialog CircleBorder",textAlign: TextAlign.center,style: TextStyle(color: Colors.white)),
    contentPadding: EdgeInsets.all(60.0),
    shape: CircleBorder(),
  )
],)


Complete Code For CircleBorder Alert Dialog Box In FLutter
Main.dart
import 'package:flutter/material.dart';

void main()
{
  runApp(MaterialApp(
    debugShowCheckedModeBanner: false,
    title: 'Androidmonks',
    home: FirstWidget(),
  ));
}
class FirstWidget extends StatelessWidget
{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
        appBar: AppBar(
          centerTitle: true,
          backgroundColor: Colors.black,
          title: Text("AndroidMonks"),),
        body: Column(children: <Widget>[
          AlertDialog(
            backgroundColor: Colors.pink,
            title: Text("Alert Dialog",textAlign: TextAlign.center,style: TextStyle(color: Colors.white),),
            content: Text("Alert Dialog CircleBorder",textAlign: TextAlign.center,style: TextStyle(color: Colors.white)),
            contentPadding: EdgeInsets.all(60.0),
            shape: CircleBorder(),
          )
        ],)
    );
  }

}

Related Post