Flutter package for creating a fully customizable and editable image widget.

Overview

EditableImage Flutter Package

Flutter package for creating a fully customizable and editable image widget. The package has been written solely in Dart Language.

 

editable_image_gif_1 editable_image_gif_2

 

Features

A powerful and fully customizable widget. It provides a custom widget to save time.

For example, almost in every profile settings interface, etc., there is a profile image. Instead of writing from scratch, this widget can be used and can save a lot of time.

 

editable_image_1 editable_image_2 editable_image_3
editable_image_4 editable_image_5 editable_image_6

 

Getting started

Let's take a look at how to implement EditableImage to fastly create user interfaces for profile picture edit, etc.

Firstly, add following line to pubspec.yaml:

editable_image: ^0.1.1

Second, import EditableImage:

import 'package:editable_image/editable_image.dart';

Lastly, make platform-specific setups by applying the following instructions.

Android Setup

  • The minimum required SDK version is 21. Therefore, please find the following line inside android/app/build.gradle and modify it:
minSdkVersion 21
  • Please upgrade the Kotlin version (ext.kotlin_version) to 1.4.32 or the latest version. To do that, find the following line inside android/build.gradle and modify it:
ext.kotlin_version = '1.4.32'
  • Please upgrade the Gradle version (ext.kotlin_version) to 6.8.3 or the latest version but lower than 7.0.0. To do that, find the following line inside android/gradle/wrapper/gradle-wrapper.properties and modify it:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
  • Required permissions: READ_EXTERNAL_STORAGE. Please modify android/app/src/main/AndroidManifest.xml and update accordingly:
">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  • I recommand you add android:requestLegacyExternalStorage="true" to AndroidManifest.xml. Therefore, please modify android/app/src/main/AndroidManifest.xml and add the following line inside application:
">
<application android:requestLegacyExternalStorage="true" 

If you found some warning logs with Glide appearing, then the main project needs an implementation of AppGlideModule. See Generated API.

iOS Setup

  • Platform version must be at least 9.0. Please modify ios/Podfile and update accordingly:
platform :ios, '9.0'
  • Add the following lines to ios/Runner/Info.plist:

   
    NSPhotoLibraryUsageDescription
   

   
    Put here your permission description.
   

macOS Setup

  • Platform version must be at least 10.15. Please modify macos/Podfile and update accordingly:
platform :osx, '10.15'
  • Please set the minimum deployment target to 10.15. Use XCode to open macos/Runner.xcworkspace:

  • Follow the iOS instructions and modify ios/Runner/Info.plist accordingly.

 

Usage

Basic usage example:

main.dart

// A simple usage of EditableImage.
// This method gets called when trying to change an image.
void _directUpdateImage(File? file) async {
    if (file == null) return;

    _profilePicFile = file;
    setState(() {});
}

EditableImage(
// Define the method that will run on the change process of the image.
onChange: (file) => _directUpdateImage(file),

// Define the source of the image.
image: _profilePicFile.existsSync()
    ? Image.file(_profilePicFile, fit: BoxFit.cover)
    : null,

// Define the size of EditableImage.
size: 150.0,

// Define the Theme of image picker.
imagePickerTheme: ThemeData(
    // Define the default brightness and colors.
    primaryColor: Colors.white,
    shadowColor: Colors.transparent,
    backgroundColor: Colors.white70,
    iconTheme: const IconThemeData(color: Colors.black87),

    // Define the default font family.
    fontFamily: 'Georgia',
),

// Define the border of the image if needed.
imageBorder: Border.all(color: Colors.black87, width: 2.0),

// Define the border of the icon if needed.
editIconBorder: Border.all(color: Colors.black87, width: 2.0),
),

 

Example

More examples can be found in /example folder on GitHub.

User Profile 1 - an example of basic implementation of EditableImage. Simple project that simulates user profile edit screen.

User Profile 2 - an example of implementation of EditableImage. Simple project that simulates user profile edit screen.

 

Additional information

This package has been written solely in Dart Language yet it has the wechat_assets_picker as a dependency. Therefore, EditableImage currently supports only Android, iOS, and macOS platforms. In the future, other platform supports may be added.

For more information please visit GitHub.

 

Feature requests and bugs

Please file feature requests and bugs at the issue tracker.

 

Maintainers

You might also like...

This is a flutter package of video player. it's a very simple and easy to use.

This is a flutter package of video player. it's a very simple and easy to use.

This is a flutter package of video player. it's a very simple and easy to use.

Nov 18, 2022

Dart package for reading and writing wav files

wav Simple tools for reading and writing WAV files. Written in pure Dart, with no dependencies. This package currently supports reading and writing 8/

Dec 28, 2022

Flutter video trimmer package

Flutter video trimmer package

A Flutter package for trimming videos Features Customizable video trimmer Video playback control Retrieving and storing video file Also, supports conv

Jan 3, 2023

A lightweight flutter package to simplify the creation of a miniplayer.

A lightweight flutter package to simplify the creation of a miniplayer.

A lightweight flutter package to simplify the creation of a miniplayer by providing a builder function with the current height and percentage progress

Dec 18, 2022

Audio classification Tflite package for flutter (iOS & Android).

Audio classification Tflite package for flutter (iOS & Android).

Audio classification Tflite package for flutter (iOS & Android). Can also support Google Teachable Machine models.

Dec 1, 2022

Enhanced pub package commands.

Enhanced pub package commands. Add latest resolvable package Remove dependency View package info Like/unlike/view liked pub.dev packages Improved conf

Oct 19, 2022

Collection of extension function of just_audio package for auto-handle caching

just_audio_cache Collection of extension function of just_audio package for auto-handle caching audio files How to use The premise is you already have

Aug 24, 2022

WazPlay is just a music app written in flutter and service to download song and play it.

WazPlay is just a music app written in flutter and service to download song and play it.

wazplay Introduction WazPlay is just a music app written in flutter and service to download song and play it. WazPlay is the first product for Waz and

Dec 8, 2022

Official Flutter SDK for LiveKit. Easily add real-time video and audio to your Flutter apps.

LiveKit Flutter SDK Official Flutter SDK for LiveKit. Easily add real-time video and audio to your Flutter apps. This package is published to pub.dev

Dec 14, 2022
Releases(v1.1.0)
Owner
Bulent Baris Kilic
Hi, i'm Baris 👋 @Udacity Certified @Google Android Developer | Mobile App Developer | Freelancer
Bulent Baris Kilic
Image Extensions A wrapper library for image package with some extra functions.

A wrapper library for image package with some extra functions. Installation Add this to your package's pubspec.yaml file: dependencie

Vanxh 1 Jan 15, 2022
Image Picker Load image from camera and gallery

image_choose A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if

MD TAMIM ISLAM KHAN 2 Sep 12, 2022
Image Editor Plugin with simple, easy support for image editing using Paints, Text, Filters, Emoji and Sticker like stories.

ImageEditorPro Image Editor Plugin with simple, easy support for image editing using Paints, Text, Filters, Emoji and Sticker like stories. To start w

Zeeshan 206 Dec 2, 2022
A fully-functional video streaming app made in Flutter using Custom Nodejs backend.

LAVENDER ?? A fully-functional video streaming app like netflix made in Flutter using Custom Nodejs backend. How To Run This Project ??‍♂️ Clone the r

null 71 Jan 10, 2023
A flutter package for iOS and Android for applying filter to an image

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

Ansh rathod 1 Oct 26, 2021
A small image utils package for flutter written in dart.

flutter_simple_image_utils A small image utils package for flutter written in dart. Usage: import 'package:flutter_simple_image_utils/flutter_simple_i

Hamlet D'Arcy 1 Nov 18, 2021
Flutter plugin for selecting multiple images from the Android and iOS image library

Flutter plugin for selecting multiple images from the Android and iOS image library, taking new pictures with the camera, and edit them before using such as rotating, cropping, adding sticker/filters.

Weta Vietnam 91 Dec 19, 2022
A plugins pick Image & camera for Flutter

christian_picker_image Flutter plugin that allows you to upload multi image picker on iOS & Android. Getting Started ChristianImagePicker is an all-in

nguyen phuc nguyen 24 Apr 29, 2022
This app classifies images based on any TFLite image classification model

This app classifies images based on any TFLite image classification model. A sample model has been provided to classify cats vs. dogs.

Daniel Alexander 0 Feb 20, 2022
A Flutter package for both android and iOS which provides Audio recorder

social_media_recorder A Flutter package for both android and iOS which provides

subhikhalifeh 16 Dec 29, 2022