Skip to content

Instantly share code, notes, and snippets.

@MarcinusX MarcinusX/tile.dart Secret
Last active Jan 13, 2019

What would you like to do?
class Tile extends StatelessWidget {
final NoteState state;
final double height;
const Tile({Key key, this.height, this.state}) : super(key: key);
Widget build(BuildContext context) {
return SizedBox(
width: double.infinity,
height: height,
child: Container(color: color),
Color get color {
switch (state) {
case NoteState.ready: return;
case NoteState.missed: return;
case NoteState.tapped: return Colors.transparent;
default: return;
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.