Search
 
SCRIPT & CODE EXAMPLE
 

DART

customize dialog flutter

showDialog(Dialog(
  backgroundColor: Colors.transparent,
  insetPadding: EdgeInsets.all(10),
  child: Stack(
    overflow: Overflow.visible,
    alignment: Alignment.center,
    children: <Widget>[
      Container(
        width: double.infinity,
        height: 200,
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(15),
          color: Colors.lightBlue
        ),
        padding: EdgeInsets.fromLTRB(20, 50, 20, 20),
        child: Text("You can make cool stuff!",
          style: TextStyle(fontSize: 24),
          textAlign: TextAlign.center
        ),
      ),
      Positioned(
        top: -100,
        child: Image.network("https://i.imgur.com/2yaf2wb.png", width: 150, height: 150)
      )
    ],
  )
));
Comment

custom dialog box in flutter

Future<void> _showMyDialog() async {
  return showDialog<void>(
  context: context,
  barrierDismissible: false, // user must tap button!
  builder: (BuildContext context) {
    return AlertDialog(
      title: Text('AlertDialog Title'),
      content: SingleChildScrollView(
        child: Column(
          children: <Widget>[
            Text('This is a demo alert dialog.'),
            Text('Would you like to confirm this message?'),
          ],
        ),
      ),
      actions: <Widget>[
        TextButton(
          child: Text('Confirm'),
          onPressed: () {
            print('Confirmed');
            Navigator.of(context).pop();
          },
        ),
        TextButton(
          child: Text('Cancel'),
          onPressed: () {
            Navigator.of(context).pop();
          },
        ),
      ],
    );
  },
);
}
Comment

PREVIOUS NEXT
Code Example
Dart :: six_ft_apart_rounded 
Dart :: flutter tooltip height 
Dart :: Flutter how to use ListTile Threeline 
Dart :: flutter duration to string 
Dart :: dart regex for url 
Dart :: make text filed round flutter 
Dart :: flutter audio player get duration 
Dart :: flutter get platform type 
Dart :: dart replase 
Dart :: empty widget flutter 
Dart :: time difference flutter 
Dart :: convert future<list list in flutter 
Dart :: at this point the state of the widget element tree is no longer stable. flutter 
Dart :: dart function as variable 
Dart :: flutter delete file 
Dart :: shape property of card in flutter 
Dart :: dart date 
Dart :: how to make my app scrollable in flutter 
Dart :: dart while 
Dart :: flutter list 
Dart :: print string char by char in dart 
Dart :: remove item form list by index dart 
Dart :: column remove space between flutter 
Dart :: flutter leading 
Dart :: flutter check null 
Dart :: dart ASCII to string 
Dart :: flutter radio button 
Dart :: dart fold 
Dart :: create a row with two child in flutter 
Dart :: what is the difference between runapp() and main() in flutter 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =