Skip to content
This repository was archived by the owner on Aug 31, 2022. It is now read-only.

Latest commit

 

History

History
129 lines (100 loc) · 4.29 KB

README.pt-BR.md

File metadata and controls

129 lines (100 loc) · 4.29 KB

on_image_matrix

Pub.dev Platforms Flutter

on_image_matrix é um Flutter Package usado para 'editar' básicos aspectos [Brilho, Contraste, Saturação, etc...] de um widget ou imagem. Usando OnImageFilters você pode usar alguns filtros já definidos.

Help:

Algum problema? Issues
Alguma sugestão? Pull request

Translations:

NOTE: Fique à vontade para ajudar nas traduções

Topics:

How to Install:

Adicione o seguinte codigo para seu pubspec.yaml:

dependencies:
  on_image_matrix: ^1.0.0+1

TODO:

  • Adicionar [Qualidades].
  • Arrumar erros.

How to use:

OnImageMatrixWidget() // O comando principal para usar o package.

Todos os tipos de métodos nesse package:

Parameters Arguments Description
blur double? Used to define the postion of effect based effectType.
blurMode TileMode? Used to define the postion of effect based effectType.
colorFilter ColorFilter? Used to define the postion of effect based effectType.

Para ser capaz de salvar esse widget como uma imagem, use o builder.

OnImageMatrixWidget.builder() // O comando principal para usar o package.

Todos os tipos de métodos nesse package:

Parameters Arguments Description
blur double? Used to apply a blur effect on the widget/image.
blurMode TileMode? Used to define the blur mode.
colorFilter ColorFilter? Used to define/apply the effect or filter.
controller Widget Used to save, delete or get the widget bytes as image
imageKey Widget Used to find the widget and convert into image
imageFormat double? Used to define format of widget when converting to a image .

Example:

OnImageMatrixWidget

OnImageMatrixWidget.builder(
  controller: _controller,
  imageKey: GlobalKey(),
  blur: 2.0,
  blurMode: TileMode.decal,
  // Você pode usar alguns filtros já definidos
  colorFilter: OnImageFilters.gray,
  // Modificar usando seu estilo
  // colorFilter: OnImageMatrix.matrix(
  //   brightnessAndContrast: 0.0,
  //   exposure: 0.0,
  //   saturation: 1.0,
  //   visibility: 1.0,
  // ),
  // Ou criar seu próprio filtro usando color matrix.
  // OnImageMatrix.custom([
  //  1, 0, 0, 0, 0,
  //  0, 1, 0, 0, 0,
  //  0, 0, 1, 0, 0,
  //  0, 0, 0, 1, 0,
  // ])
  imageFormat: ImageByteFormat.rawRgba,
  child: Image.network(
  'https://source.unsplash.com/j0QOYiYwIYE/1600x900',
  ),
),

Depois de modificar seu widget/imagem use o [OnImageController] para salvar.

  OnImageController _imageController = OnImageController();

  Uint8List? saveImage() {
    _imageController.save();
    return _imageController.imageBytes;
  }

Color Matrix

Tente você mesmo:

Veja mais:

LICENSE: