color_merge 1.0.0 copy "color_merge: ^1.0.0" to clipboard
color_merge: ^1.0.0 copied to clipboard

A lightweight Flutter package that provides color merging utilities for blending colors seamlessly. It allows developers to simulate the effect of stacking colors on top of one another, ignoring opaci [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:color_merge/color_merge.dart';

void main() {
  runApp(
    MaterialApp(
      theme: ThemeData(
        primaryColor: Colors.blue,
      ),
      home: const MyApp(),
    ),
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: Center(
            child: Row(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        Container(
          width: 50,
          height: 50,
          color: Colors.purple.withOpacity(0.5).merge(Colors.lightBlue),
        ),
        const SizedBox(
          width: 5,
        ),
        Container(
          width: 50,
          height: 50,
          color: Colors.purple.withOpacity(0.5).whiteMerge(),
        ),
        const SizedBox(
          width: 5,
        ),
        Container(
          width: 50,
          height: 50,
          color: Colors.purple.withOpacity(0.5).blackMerge(),
        ),
      ],
    )));
  }
}
3
likes
140
points
22
downloads

Publisher

verified publisherhcody.com

Weekly Downloads

A lightweight Flutter package that provides color merging utilities for blending colors seamlessly. It allows developers to simulate the effect of stacking colors on top of one another, ignoring opacity, and adapt colors dynamically based on the app's theme.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on color_merge