Skip to content

Instantly share code, notes, and snippets.

@AliAnilKocak
Last active February 7, 2020 08:42
Show Gist options
  • Save AliAnilKocak/118ac14d60248ae3d6680c5c3733e511 to your computer and use it in GitHub Desktop.
Save AliAnilKocak/118ac14d60248ae3d6680c5c3733e511 to your computer and use it in GitHub Desktop.
material_color_picker
void _openFullMaterialColorPicker() async {
_openDialog(
"Renk seç",
MaterialColorPicker(
colors: materialColors,
),
);
}
void _openDialog(String title, Widget content) {
showDialog(
context: context,
builder: (_) {
return AlertDialog(
contentPadding: const EdgeInsets.all(6.0),
title: Text(title),
content: content,
actions: [
FlatButton(
child: Text('İptal'),
onPressed: Navigator.of(context).pop,
),
FlatButton(
child: Text('Kaydet'),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
},
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment