iridescent_color 0.1.2 copy "iridescent_color: ^0.1.2" to clipboard
iridescent_color: ^0.1.2 copied to clipboard

Flutter package for exempting iridescent effect as color.

iridescent_color #

Is a package that uses device movements to calculate a change of customizable colors for flutter.

⭐ Features #

  • 🛠️ Custom - It uses a customized color palette to simulate the effect.

  • 🌈 Raimbow - It uses the entire color spectrum to simulate the effect.

⚙️ Getting started #

Install the package in your project via command

flutter pub add iridescent_color

Or, add to pubspec.yaml file

dependencies:
  iridescent_color: ^0.1.0

⚡ Basic usage #

Import the package in your code

import 'package:iridescent_color/iridescent_color.dart';

Use it this way (Example)

/// Create the library instance
IridescentColor iridescentColor = IridescentColor();
Color iridescentColorRainbow = Colors.transparent; //Set default/initial color here
Color iridescentColorCustom = Colors.transparent; //Set default/initial color here

/// In initState
@override
void initState() {
  super.initState();
  iridescentColor.init(
    () => setState(
      () {
        iridescentColorRainbow = iridescentColor.rainbow();
        iridescentColorCustom = iridescentColor.custom(
          colorList: [
            Colors.white,
            Colors.red,
            Colors.green,
            Colors.blue,
          ],
        );
      },
    ),
  );
}

/// In dispose
@override
void dispose() {
  super.dispose();
  iridescentColor.dispose();
}
1
likes
140
pub points
22%
popularity

Publisher

verified publisherspikeystudio.com

Flutter package for exempting iridescent effect as color.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, motion_sensors

More

Packages that depend on iridescent_color