Skip to content

Instantly share code, notes, and snippets.

@windwp
Last active June 15, 2019 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save windwp/575e6ee3d2a323c0ceb9fe74f73ba8e1 to your computer and use it in GitHub Desktop.
Save windwp/575e6ee3d2a323c0ceb9fe74f73ba8e1 to your computer and use it in GitHub Desktop.
flutter
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>[],
);
}));
}
}
//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