color_pick

Creator: coderz1093

Last updated:

0 purchases

color_pick Image
color_pick Images

Languages

Categories

Add to Cart

Description:

color pick

color_pick #
This Dart package offers developers a select color view library of Flutter widgets.
When you need a color wheel or a ring color selector, it is your best choice.
For example, you can control the color of the light bulb and you need to choose the color.
Getting Started #
Installation #
Add this to your pubspec.yaml (or create it):
dependencies: color_pick: ^0.0.8
Then run the flutter tooling: #
flutter packages get
example #
import 'package:color_pick/ring_color_pick.dart';
import 'package:flutter/material.dart';

import 'color_pick.dart';

class CirclePage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
// TODO: implement createState
return CirclePageState();
}
}

class CirclePageState extends State<CirclePage> {
Color currentColor = Color(0xff0000ff);

@override
Widget build(BuildContext context) {
// TODO: implement build
return Scaffold(
appBar: AppBar(
centerTitle: true,
title: Text("色盘选择器"),
),
body: Center(
child: Column(
children: <Widget>[
ColorPickView(
selectColor: Color(0xff00eaff),
selectRadius: 30,
padding: 100,
selectRingColor: Colors.black,
selectColorCallBack: (color) {
setState(() {
currentColor = color;
});
},
),
Container(
color: currentColor,
height: 50,
width: 50,
child: SizedBox(),
)
],
)),
);
}
}
copied to clipboard
Result #

Details in example/lib/circle_page.dart.
This project is a starting point for a Dart
package,
a library module containing code that can be shared easily across
multiple Flutter or Dart projects.
For help getting started with Flutter, view our
online documentation, which offers tutorials,
samples, guidance on mobile development, and a full API reference.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.