Last active
June 15, 2019 11:51
-
-
Save windwp/575e6ee3d2a323c0ceb9fe74f73ba8e1 to your computer and use it in GitHub Desktop.
flutter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class GoodListScreen extends StatefulWidget { | |
static const routeName = 'GoodListScreen'; | |
GoodListScreen({Key key}) : super(key: key); | |
_GoodListState createState() => _GoodListState(); | |
} | |
class _GoodListState extends State<GoodListScreen> { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
resizeToAvoidBottomInset: false, | |
appBar: AppBar( | |
title: Text("Title"), | |
actions: <Widget>[ | |
// action button | |
IconButton( | |
icon: Icon(Icons.delete), | |
onPressed: () {}, | |
) | |
], | |
), | |
body: Builder(builder: (BuildContext context) { | |
return Column( | |
children: <Widget>[], | |
); | |
})); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//rectangle box | |
Container( | |
height: 80.0, | |
width: 200.0, | |
color: Colors.transparent, | |
child: Container( | |
decoration: BoxDecoration( | |
color: Colors.white, | |
borderRadius: BorderRadius.all(Radius.circular(10))), | |
child: Row( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: <Widget>[ | |
], | |
), | |
)) | |
//drop down | |
child: new DropdownButtonHideUnderline( | |
child: new DropdownButton( | |
isDense: true, | |
value: dropdownValue, | |
onChanged: (String newValue) { | |
this.setState(() { | |
this.dropdownValue = newValue; | |
}); | |
}, | |
items: <String>['One', 'Two', 'Free', 'Four'] | |
.map<DropdownMenuItem<String>>((String value) { | |
return DropdownMenuItem<String>( | |
value: value, | |
child: Text(value), | |
); | |
}).toList(), | |
), | |
), | |
/// border beveled | |
Material( | |
elevation: 16.0, | |
shape: BeveledRectangleBorder( | |
borderRadius: | |
BorderRadius.only(topLeft: Radius.circular(46.0)), | |
), | |
child: widget.child, | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment