photofilters 1.0.5

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 #

No Filter No FilterAddictiveBlue AddictiveBlueAddictiveRed AddictiveRed
Amaro AmaroAshby AshbyBrannan Brannan
Charmes CharmesClarendon ClarendonCrema Crema
Earlybird Earlybird1977 1977Gingham Gingham
Hefe HefeHelena HelenaHudson Hudson
Juno JunoKelvin KelvinLark Lark
Ludwig LudwigMaven MavenMayfair Mayfair
Nashville NashvillePerpetua PerpetuaReyes Reyes
Sierra SierraSkyline SkylineSlumber Slumber
Sutro SutroToaster ToasterValencia Valencia
Walden WaldenWillow WillowX-Pro II X-Pro II

Getting Started #

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

For help on editing package code, view the documentation.

photofilters #

[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 implementing color filters.
  • Improved Widget for image with filter

[1.0.2] - 12 Nov 2018

  • BugFixes and Improvisations.

[1.0.4] - 19 Jun 2019

  • BugFixes and Improvisations.
  • iOS issue fixed

[1.0.5] - 30 Jun 2019

  • BugFixes and Improvisations.
  • All dependant packages updated to latest version

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.5

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub 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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
78
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
87
Learn more about scoring.

We analyzed this package on Jul 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/utils/utils.dart. (-0.50 points)

Analysis of lib/utils/utils.dart reported 1 hint:

line 19 col 7: Equality operator == invocation with references of unrelated types.

Format lib/widgets/photo_filter.dart.

Run flutter format to format lib/widgets/photo_filter.dart.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (meta).

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
image ^2.1.4 2.1.4
meta ^1.1.6 1.1.6 1.1.7
path_provider ^1.1.0 1.1.2
Transitive dependencies
archive 2.0.10
args 1.5.2
charcode 1.1.2
collection 1.14.11
convert 2.1.1
crypto 2.0.6
petitparser 2.4.0
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
xml 3.5.0
Dev dependencies
flutter_test
image_picker ^0.6.0+10
path ^1.6.2 1.6.2
test any

Admin