Skip to content

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

4 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

image_cropper

A flutter package to scale and crop images. Optionally set aspect ratio of cropping area

Demo

Documentation

Installation

Add image_cropper to your pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter

  # added below
  image_cropper: <latest version>

Adding to app

When you have the image file navigate to Crop widget provided by the package

Future<Null> _cropImage() async {
    var file = await imageFile.readAsBytes();
    Navigator.of(context).push(MaterialPageRoute(
      builder: (context) {
        return ic.Crop(
          controller: _cropController,
          image: file,
        );
      },
    )).then((image) {
      setState(() {
        if (image != null) {
          croppedImage = image;
          state = AppState.cropped;
        }
      });
    });
  }
          

Author

CodeToArt Technology

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages