Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Clean Dart 2 Widgets
// Before Dart 2
Widget build(BuildContext context) {
return new Container(
height: 56.0,
padding: const EdgeInsets.symmetric(horizontal: 8.0),
decoration: new BoxDecoration(color:[500]),
child: new Row(
// After Dart 2
Widget build(BuildContext context) =>
height: 56.0,
padding: EdgeInsets.symmetric(horizontal: 8.0),
decoration: BoxDecoration(color:[500]),
child: Row(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.