flutter_mosaic 0.0.4

SDKflutter
Platformandroidioswindowslinuxmacosweb

Easy mosaic effect for Flutter, add a mosaic effect to any widget.

GitHub stars Pub.dev likes

📓 Language: English | 中文
🎁 Check out the Live Demo.



Flutter Mosaic

stable package dev package pub points CodeFactor codecov

Easy mosaic effect for Flutter!


preview1.gif

Check out the Live Demo


Table of contents 🪄


Features ✨

  • 👀 Shader effect
  • 📦 Any widget
  • 🖼️ Customize the width and height of each mosaic block
  • 🎨 Customize the number of samples in each mosaic block

Install 🎯

Versions compatibility 🐦

Flutter3.7.0+3.10.0+
flutter_mosaic 0.0.1+✅ (Web ❌)✅

Add package 📦

Run this command with Flutter,

$ flutter pub add flutter_mosaic

or add flutter_mosaic to pubspec.yaml dependencies manually.

dependencies:
  flutter_mosaic: ^latest_version

Usage 📖

Example: flutter_mosaic/example

Mosaic 📦

/// Import flutter_mosaic
import 'package:flutter_mosaic/flutter_mosaic.dart';

Mosaic(
  mosaicSize: Size(6.0, 6.0),
  child: Text(
    'Flutter Mosaic',
    style: TextStyle(
      fontSize: 50,
      fontWeight: FontWeight.bold,
    ),
  ),
),

ParameterTypeDefaultDescription
enabledbooltrueEnable mosaic.
mosaicSize requiredSize-Each mosaic block size.
sampleCountSampleCountSampleCount.s4Number of samples in each mosaic block.
child requiredWidget-Target widget (apply mosaic).

Contributors ✨

AmosHuKe
AmosHuKe

License 📄

MIT License
Open sourced under the MIT license.

© AmosHuKe