Search packages, repositories and app categories

Package detailsv0.1.5

flutter_shaders

A collection of utilities for working with the FragmentProgram API in Flutter.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
1.6M
Likes
134
Pub points
150

Install package

flutter pub add flutter_shaders

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

flutter_shaders is a Flutter package that provides utilities for leveraging the FragmentProgram API to create custom shaders and advanced visual effects. It enables developers to implement dynamic background effects, intricate gradients, and real-time graphical transformations across multiple platforms. The package simplifies shader integration by offering helper functions and abstractions, making it easier to apply complex fragment shaders without deep low-level knowledge. Ideal for apps requiring visually rich interfaces with animated or interactive graphics.

Use cases

  • Creating animated backgrounds
  • Implementing custom gradient effects
  • Building interactive UI elements with shaders
  • Enhancing app visuals with real-time graphics
  • Developing immersive gaming interfaces

Key features

  • Easy integration with FragmentProgram API
  • Cross-platform shader support
  • Pre-built utility functions for common effects
  • Support for dynamic shader parameters
  • Optimized performance for animations

Suitable for

  • UI designers seeking advanced visual effects
  • Developers building immersive apps or games
  • Teams focused on high-end mobile and web graphics
  • Frontend engineers exploring creative rendering techniques

Considerations

  • Requires understanding of GLSL shaders
  • May increase app complexity and build time
  • Not ideal for simple static UIs
  • Performance depends on shader optimization
  • Limited debugging tools for shader logic

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

flutter_shaders

A collection of utilities to make working with the FragmentProgram API easier.

Available Shaders

This package includes a number of shaders that can be optionally included into your application by declaring them in the pubspec.yaml:

Pixelation

The pixelation shader reduces the provided sampler to MxN samples. This can be used with the [AnimatedSampler] widget. The required uniforms are:

Floats:

  • The number of pixels in the X coordinate space.
  • The number of pixels in the Y coordinate space.
  • The width of the sampled area.
  • The height of the sampled area. Samplers:
  • The child widget, captured as a texture.

To include this shader in your application, add the following line to your pubspec.yaml

flutter:
  shaders:
    - packages/flutter_shaders/shaders/pixelation.frag

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package