color_merge 1.0.0
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 [...]
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(),
),
],
)));
}
}