Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Updating dialog.md to fit new flutter version #113

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions docs/components/dialogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,18 @@ AlertDialog(
title: Text('Reset settings?'),
content: Text('This will reset your device to its default factory settings.'),
actions: [
FlatButton(
textColor: Color(0xFF6200EE),
TextButton(

onPressed: () {},
child: Text('CANCEL'),
child: Text(
'CANCEL',
style:const TextStyle(color:Color(0xFF6200EE),
),
),
),
FlatButton(
textColor: Color(0xFF6200EE),
TextButton(
onPressed: () {},
child: Text('ACCEPT'),
child: Text('ACCEPT',style:const TextStyle(color:Color(0xFF6200EE),),),
),
],
)
Expand Down Expand Up @@ -325,26 +328,24 @@ class MyHomePage extends StatelessWidget {
],
),
actions: [
FlatButton(
textColor: shrineBrown900,
TextButton(
onPressed: () => Navigator.pop(context),
child: Text('ACTION 1'),
child: Text('ACTION 1',style:TextStyle(color:shrineBrown900,),),
),
FlatButton(
textColor: shrineBrown900,
TextButton(
onPressed: () => Navigator.pop(context),
child: Text('ACTION 2'),
child: Text('ACTION 2',style:TextStyle(color:shrineBrown900),),
),
],
);

return Scaffold(
body: Center(
child: FlatButton(
child: TextButton(
onPressed: () {
showDialog<void>(context: context, builder: (context) => dialog);
},
child: Text("SHOW DIALOG"),
child:const Text("SHOW DIALOG"),
),
),
);
Expand Down