Skip to content

Nialixus/richtrex_colorpicker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RichTrex: Color Picker


An extended package used in RichTrex package to pick color.

Preview

Dialog Bottom sheet Widget

Install

Add this line to your pubspec.yaml.

dependencies:
  richtrex_colorpicker: ^1.1.0

Usage

First, import the package.

import 'package:richtrex_colorpicker/richtrex_colorpicker.dart';

And then put the widget like this.

RichTrexColorPicker(
  color: Colors.blue,
  onChanged: (color) => print(color),
);

Or if you want to open it as Dialog, do this.

GestureDetector(
  onTap: () async {
    var color = await RichTrexColorPicker.openDialog(context, color: Colors.blue);
    print(color);
  }
);

And if you want to open it as Bottom Sheet, try this.

GestureDetector(
  onTap: () async {
    var color = await RichTrexColorPicker.openBottomSheet(context, color: Colors.blue);
    print(color);
  }
);

Sample

About

An extended package of RichTrex package to pick color whether as dialog, bottom sheet or widget in tree.

Topics

Resources

License

Stars

Watchers

Forks

Languages