Aus öffentlichen Paketdaten erstellte Orientierung.
Ein vollständig in Dart geschriebener, radförmiger Farbwähler für Flutter-Anwendungen. Er bietet eine intuitive kreisförmige Oberfläche zur Farbauswahl und ist ideal für Design-Tools, Theme-Customizer und kreative Apps. Der Picker unterstützt reibungslose Farbübergänge und ist auf allen wichtigen Plattformen wie Android, iOS, Web, macOS, Windows und Linux kompatibel. Seine saubere, anpassbare Benutzeroberfläche ermöglicht Entwicklern die nahezu problemlose Integration einer visuell ansprechenden Farbauswahl-Erfahrung.
Anwendungsfälle
Design-Tool-Integrationen
Themenanpassungsoberflächen
Kreativ-App-Farbauswahl
Mobile und Desktop-App-Oberflächen
webbasierte Farbauswähler
Hauptmerkmale
Zirkuläre Rad-Farbauswahl
Völlig in Dart geschrieben
Plattformübergreifende Kompatibilität
Glatte Farbüberleitung
Anpassbare Benutzeroberfläche
Einfache Integration mit Flutter
Geeignet für
UI/UX-Designer
App-Entwickler, die kreative Tools erstellen
Themenaktivierte Anwendungen
Multiplattform-Flutter-Projekte
Hinweise
Beschränkt auf radbasierte Auswahl
Kann zusätzliche Stilisierung für Branding erfordern
Nicht geeignet für komplexe Farbmodelle wie HSL oder HSV
Original-README
Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.
Flutter Color Picker Wheel
Flutter Color Picker Wheel is an easy-to-use widget that can be heavily customized.
You can use the WheelColorPicker directly by providing list of colors you want to include and animation configs.
You can use the WheelColorPickerEntryContent and manage OverlayEntry yourself.
This library provides some presets which make it even easier to use this component.
How to use
Add the dependency to your pubspec.yaml
flutter_color_picker_wheel:^0.0.1
Try it out
Currently this Storybook only works well on Web
TODO: [ ] Use another storybook to provide better preview for both web
and phone
https://flutter-color-picker-wheel.kexinlu.com
Showcase
Fan Default Preset
Fan Simple Preset
Sun Ray Default
Sun Ray Simple
Detached Full Screen without Gap
Detached Full Screen with Gap
Custom Color Set
Custom Animation
Manage Your Own OverlayEntry
Example Code
you can find more examples in the example path of this repository
Simple Usecase
import'package:flutter_color_picker_wheel/flutter_color_picker_wheel.dart';
Color color; /// you want to initialize this color in the initState methodWidget myButton = WheelColorPicker(
onSelect: (Color newColor) {
setState(() {
color = newColor;
});
},
/// long press to open, another behaviour is clickToOpen to open
behaviour: ButtonBehaviour.longPressToOpen,
/// inital color
defaultColor: color,
/// fanLikeAnimationConfig is a preset, you can import this from the package
animationConfig: fanLikeAnimationConfig,
/// simpleColors is a preset, you can import this from the package
colorList: simpleColors,
/// size of the clickable button in the middle
buttonSize: 40,
/// height of each piece (outerRadius - innerRadius of a piece)
pieceHeight: 25,
/// starting radius of the donut shaped wheel
innerRadius: 80,
);
If you decided to go this route there are several core ideas that you need to wrap your head around.
WheelOverlayEntryContent should be generated only ONCE but not generated each build. You can have a new OverlayEntry, but you only need one WheelOverlayEntryContent. This helps us to have a decent performance.
To stick the WheelOverlayEntryContent to some component, you want to use LayerLink.
See WheelColorPicker as an example
You need to provide AnimationController to the Widget, thus you want to extend some ticker provider, eg. SingleTickerProviderStateMixin