@@ -60,12 +60,12 @@ class DialogDemo extends StatefulComponent {
6060class DialogDemoState extends State <DialogDemo > {
6161 final GlobalKey <ScaffoldState > scaffoldKey = new GlobalKey <ScaffoldState >();
6262
63- void showDemoDialog ({ BuildContext context, Dialog dialog }) {
64- showDialog (
63+ void showDemoDialog/*<T>*/ ({ BuildContext context, Dialog dialog }) {
64+ showDialog/*<T>*/ (
6565 context: context,
6666 child: dialog
6767 )
68- .then ((dynamic value) { // The value passed to Navigator.pop() or null.
68+ .then ((dynamic /*=T*/ value) { // The value passed to Navigator.pop() or null.
6969 if (value != null ) {
7070 scaffoldKey.currentState.showSnackBar (new SnackBar (
7171 content: new Text ('You selected: $value ' )
@@ -89,7 +89,7 @@ class DialogDemoState extends State<DialogDemo> {
8989 new RaisedButton (
9090 child: new Text ('ALERT' ),
9191 onPressed: () {
92- showDemoDialog (
92+ showDemoDialog/*<DialogDemoAction>*/ (
9393 context: context,
9494 dialog: new Dialog (
9595 content: new Text (
@@ -113,7 +113,7 @@ class DialogDemoState extends State<DialogDemo> {
113113 new RaisedButton (
114114 child: new Text ('ALERT WITH TITLE' ),
115115 onPressed: () {
116- showDemoDialog (
116+ showDemoDialog/*<DialogDemoAction>*/ (
117117 context: context,
118118 dialog: new Dialog (
119119 title: new Text ("Use Google's location service?" ),
@@ -138,7 +138,7 @@ class DialogDemoState extends State<DialogDemo> {
138138 new RaisedButton (
139139 child: new Text ('SIMPLE' ),
140140 onPressed: () {
141- showDemoDialog (
141+ showDemoDialog/*<String>*/ (
142142 context: context,
143143 dialog: new Dialog (
144144 title: new Text ('Set backup account' ),
@@ -174,7 +174,7 @@ class DialogDemoState extends State<DialogDemo> {
174174 context: context,
175175 initialTime: const TimeOfDay (hour: 15 , minute: 30 )
176176 )
177- .then ((value) { // The value passed to Navigator.pop() or null.
177+ .then ((TimeOfDay value) { // The value passed to Navigator.pop() or null.
178178 if (value != null ) {
179179 scaffoldKey.currentState.showSnackBar (new SnackBar (
180180 content: new Text ('You selected: $value ' )
@@ -186,7 +186,7 @@ class DialogDemoState extends State<DialogDemo> {
186186 new RaisedButton (
187187 child: new Text ('FULLSCREEN' ),
188188 onPressed: () {
189- Navigator .push (context, new MaterialPageRoute (
189+ Navigator .push (context, new MaterialPageRoute < Null > (
190190 builder: (BuildContext context) => new FullScreenDialogDemo ()
191191 ));
192192 }
0 commit comments