Semi customizable color picker for flutter.
Add this to your package's pubspec.yaml file:
dependencies:
tellme_color_picker:: <CurrentVersion>
You can install packages from the command line:
with Flutter:
$ flutter pub get
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:tellme_color_picker/tellme_color_picker.dart';
TextButton(
onPressed: () => TellMeColorPicker(
context: context,
colors: TellMeColors.labelColors,// color array
onSelected: (Color color) {
setState(() {
selectedColor = color;
});
},
),
child: Row(
children: [
Icon(Icons.label, color: selectedColor),
SizedBox(width: 10),
Text('Select a color'),
],
),
),