Advertisement
Guest User

Untitled

a guest
Jun 25th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.05 KB | None | 0 0
  1.     floatingActionButton: new FloatingActionButton(
  2.           tooltip: 'New Post',
  3.           onPressed: (){
  4.            showDialog(context: context,
  5.              builder:(BuildContext context){
  6.               return new AlertDialog(
  7.                   title: new Text('New Post'),
  8.                   contentPadding: const EdgeInsets.fromLTRB(1.0,0.0,1.0,0.0),
  9.                   content:new SingleChildScrollView(
  10.                     child:new ListBody(
  11.                       children: <Widget>[
  12.                         ListTile(
  13.                           leading:Icon(Icons.subject),
  14.                           title:TextFormField(
  15.                             initialValue: "",
  16.                             onSaved: (val) => board.subject = val,
  17.                             validator:  (val) => val =="" ? val:null,
  18.                           ),
  19.                         ),
  20.                       ],
  21.                     )
  22.                   )
  23.                );
  24.              }
  25.            );
  26.  
  27.  
  28.  
  29.           },
  30.           child: new Icon(Icons.add),
  31.         )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement