Skip to content

Instantly share code, notes, and snippets.

@xinthink
Last active March 5, 2020 09:39
Show Gist options
  • Save xinthink/452e4fdbab98f7e7a035dd4325bc7ac7 to your computer and use it in GitHub Desktop.
Save xinthink/452e4fdbab98f7e7a035dd4325bc7ac7 to your computer and use it in GitHub Desktop.
showModalBottomSheet(
context: context,
backgroundColor: _noteColor,
builder: (context) => ChangeNotifierProvider.value(
value: _note,
child: Consumer<Note>(
builder: (_, note, __) => Container(
color: note.color ?? kDefaultNoteColor, // use the latest picked color
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
NoteActions(), // list of available actions: archiving, deletion...
LinearColorPicker(), // a horizontal color list
],
),
),
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment