photofilters 1.0.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 45

Photo Filters package for flutter

A flutter package for iOS and Android for applying filter to an image. A set of preset filters are also available. You can create your own filters too.

Installation

First, add photofilters and image as a dependency in your pubspec.yaml file.

iOS

No configuration required - the plugin should work out of the box.

Android

No configuration required - the plugin should work out of the box.

Example

import 'package:flutter/material.dart';
import 'package:path/path.dart';
import 'package:photofilters/photofilters.dart';
import 'package:image/image.dart' as imageLib;
import 'package:image_picker/image_picker.dart';

void main() => runApp(new MaterialApp(home: MyApp()));

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => new _MyAppState();
}

class _MyAppState extends State<MyApp> {
  imageLib.Image _image;
  String fileName;
  Filter _filter;
  List<Filter> filters = presetFitersList;

  Future getImage() async {
    var imageFile = await ImagePicker.pickImage(source: ImageSource.gallery);
    fileName = basename(imageFile.path);
    var image = imageLib.decodeImage(imageFile.readAsBytesSync());
    image = imageLib.copyResize(image, 600);
    setState(() {
      _image = image;
    });
  }

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text('Photo Filter Example'),
      ),
      body: new Container(
        alignment: Alignment(0.0, 0.0),
        child: _image == null
            ? new Text('No image selected.')
            : new PhotoFilterSelector(
                image: _image,
                filters: presetFitersList,
                filename: fileName,
                loader: Center(child: CircularProgressIndicator()),
              ),
      ),
      floatingActionButton: new FloatingActionButton(
        onPressed: getImage,
        tooltip: 'Pick Image',
        child: new Icon(Icons.add_a_photo),
      ),
    );
  }
}

UI Screen Shots

Sample Images of Filters

<img width="1604" alt="No Filter" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/No Filter.jpg"> No Filter<img width="1604" alt="AddictiveBlue" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/AddictiveBlue.jpg"> AddictiveBlue<img width="1604" alt="AddictiveRed" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/AddictiveRed.jpg"> AddictiveRed
<img width="1604" alt="Amaro" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Amaro.jpg"> Amaro<img width="1604" alt="Ashby" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Ashby.jpg"> Ashby<img width="1604" alt="Brannan" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Brannan.jpg"> Brannan
<img width="1604" alt="Charmes" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Charmes.jpg"> Charmes<img width="1604" alt="Clarendon" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Clarendon.jpg"> Clarendon<img width="1604" alt="Crema" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Crema.jpg"> Crema
<img width="1604" alt="Earlybird" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Earlybird.jpg"> Earlybird<img width="1604" alt="1977" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/1977.jpg"> 1977<img width="1604" alt="Gingham" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Gingham.jpg"> Gingham
<img width="1604" alt="Hefe" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Hefe.jpg"> Hefe<img width="1604" alt="Helena" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Helena.jpg"> Helena<img width="1604" alt="Hudson" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Hudson.jpg"> Hudson
<img width="1604" alt="Juno" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Juno.jpg"> Juno<img width="1604" alt="Kelvin" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Kelvin.jpg"> Kelvin<img width="1604" alt="Lark" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Lark.jpg"> Lark
<img width="1604" alt="Ludwig" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Ludwig.jpg"> Ludwig<img width="1604" alt="Maven" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Maven.jpg"> Maven<img width="1604" alt="Mayfair" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Mayfair.jpg"> Mayfair
<img width="1604" alt="Nashville" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Nashville.jpg"> Nashville<img width="1604" alt="Perpetua" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Perpetua.jpg"> Perpetua<img width="1604" alt="Reyes" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Reyes.jpg"> Reyes
<img width="1604" alt="Sierra" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Sierra.jpg"> Sierra<img width="1604" alt="Skyline" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Skyline.jpg"> Skyline<img width="1604" alt="Slumber" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Slumber.jpg"> Slumber
<img width="1604" alt="Sutro" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Sutro.jpg"> Sutro<img width="1604" alt="Toaster" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Toaster.jpg"> Toaster<img width="1604" alt="Valencia" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Valencia.jpg"> Valencia
<img width="1604" alt="Walden" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Walden.jpg"> Walden<img width="1604" alt="Willow" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/Willow.jpg"> Willow<img width="1604" alt="X-Pro II" src="https://raw.githubusercontent.com/skkallayath/photofilters/master/exampleimages/X-Pro II.jpg"> X-Pro II

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

[0.1.0] - 14 Oct 2018

  • Added multiple filters.
  • Added Widget for image with filter
  • Added filter selector widget

[1.0.0] - 12 Nov 2018

  • Optimized filters by implimenting color filters.
  • Improved Widget for image with filter

[1.0.2] - 12 Nov 2018

  • BugFixes and Improvisations.

example/README.md

photofilters_example

Demonstrates how to use the photofilters plugin.

Getting Started

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  photofilters: ^1.0.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:photofilters/photofilters.dart';
  
Version Uploaded Documentation Archive
1.0.2 Nov 12, 2018 Go to the documentation of photofilters 1.0.2 Download photofilters 1.0.2 archive
1.0.1 Nov 12, 2018 Go to the documentation of photofilters 1.0.1 Download photofilters 1.0.1 archive
1.0.0 Nov 12, 2018 Go to the documentation of photofilters 1.0.0 Download photofilters 1.0.0 archive
0.1.0 Oct 14, 2018 Go to the documentation of photofilters 0.1.0 Download photofilters 0.1.0 archive
0.0.1 Oct 13, 2018 Go to the documentation of photofilters 0.0.1 Download photofilters 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
58
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
45
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms:

Error(s) prevent platform classification:

Error(s) in lib/filters/subfilters.dart: The class 'ImageSubFilter' can't be used as a mixin because it extends a class other than Object.

Health issues and suggestions

Fix lib/filters/subfilters.dart. (-94.37 points)

Analysis of lib/filters/subfilters.dart failed with 10 errors, including:

line 11 col 53: The class 'ImageSubFilter' can't be used as a mixin because it extends a class other than Object.

line 25 col 55: The class 'ImageSubFilter' can't be used as a mixin because it extends a class other than Object.

line 41 col 55: The class 'ImageSubFilter' can't be used as a mixin because it extends a class other than Object.

line 57 col 50: The class 'ImageSubFilter' can't be used as a mixin because it extends a class other than Object.

line 71 col 54: The class 'ImageSubFilter' can't be used as a mixin because it extends a class other than Object.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Error(s) in lib/filters/subfilters.dart: The class 'ImageSubFilter' can't be used as a mixin because it extends a class other than Object.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
image ^2.0.4 2.0.5
meta ^1.1.6 1.1.6
path_provider ^0.4.1 0.4.1
Transitive dependencies
archive 2.0.4
args 1.5.1
charcode 1.1.2
collection 1.14.11
convert 2.0.2
crypto 2.0.6
petitparser 2.0.2
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
xml 3.2.3
Dev dependencies
flutter_test
image_picker any
path any 1.6.2
test any