diff --git a/LICENSE b/LICENSE index c91d99f..2085dc5 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018 Volodymyr Lykhonis + Copyright 2021 Tsuyoshi Chujo Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 1f47bbd..395db73 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ A flutter plugin that provides `Crop` widget for cropping images. # Philosophy -crop_your_image provides _flexible_ and _custamizable_ `Crop` widget that can be placed at anywhere in your well designed apps. +crop_your_image provides _flexible_ and _customizable_ `Crop` widget that can be placed at anywhere in your well designed apps. -As `Crop` is a simple widget displaying minimum cropping UI, `Crop` can be placed anywhere such as, for example, occupying entire screen, at top half of the screen, or even on dialogs or bottomsheets. It's totally up to you! +As `Crop` is a simple widget displaying minimum cropping UI, `Crop` can be placed anywhere such as, for example, occupying entire screen, at top half of the screen, or even on dialogs or bottom sheets. It's totally up to you! Users' cropping operation is also customizable. By default, images are fixed on the screen and users can move crop rect to decide where to crop. Once configured _interactive_ mode, images can be zoomed/panned, and crop rect can be configured as fixed. @@ -214,7 +214,7 @@ by passing the arguments below. |-|-|-| |formatDetector|ImageFormat Function(Uint8List)?|Function to detect the format of original image. By detecting the format before `imageParser` parses the original image from `Uint8List` to `ImageDetail`, `imageParser` will sufficiently parse the binary, which means the initializing operation speeds up. `defaultFormatDetector` is used by default| |imageParser|ImageDetail Function(Uint8List, {ImageFormat})?|Function for parsing original image from `Uint8List` to `ImageDetail`, which preserve `height`, `width` and parsed `image` with generic type ``. `image` is passed to `imageCropper` with `Rect` to be cropped. `defaultImageParser` is used by default| -|imageCropper|ImageCropper?|By implementing `ImageCropeper` and passing its instance to this argument, you can exchange cropping logic. `defaultImageCropper` is used by default| +|imageCropper|ImageCropper?|By implementing `ImageCropper` and passing its instance to this argument, you can exchange cropping logic. `defaultImageCropper` is used by default| # Gallery App diff --git a/example/lib/main.dart b/example/lib/main.dart index 420dd77..ca3aa4b 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -56,7 +56,7 @@ class _CropSampleState extends State { _cropController.image = _imageDataList[_currentImage]; } - var _isSumbnail = false; + var _isThumbnail = false; var _isCropping = false; var _isCircleUi = false; Uint8List? _croppedData; @@ -103,13 +103,13 @@ class _CropSampleState extends State { padding: const EdgeInsets.all(16), child: Row( children: [ - _buildSumbnail(_imageDataList[0]), + _buildThumbnail(_imageDataList[0]), const SizedBox(width: 16), - _buildSumbnail(_imageDataList[1]), + _buildThumbnail(_imageDataList[1]), const SizedBox(width: 16), - _buildSumbnail(_imageDataList[2]), + _buildThumbnail(_imageDataList[2]), const SizedBox(width: 16), - _buildSumbnail(_imageDataList[3]), + _buildThumbnail(_imageDataList[3]), ], ), ), @@ -157,7 +157,7 @@ class _CropSampleState extends State { }[status] ?? ''; }), - maskColor: _isSumbnail ? Colors.white : null, + maskColor: _isThumbnail ? Colors.white : null, cornerDotBuilder: (size, edgeAlignment) => const SizedBox.shrink(), interactive: true, @@ -207,11 +207,12 @@ class _CropSampleState extends State { right: 16, bottom: 16, child: GestureDetector( - onTapDown: (_) => setState(() => _isSumbnail = true), - onTapUp: (_) => setState(() => _isSumbnail = false), + onTapDown: (_) => setState(() => _isThumbnail = true), + onTapUp: (_) => setState(() => _isThumbnail = false), child: CircleAvatar( - backgroundColor: - _isSumbnail ? Colors.blue.shade50 : Colors.blue, + backgroundColor: _isThumbnail + ? Colors.blue.shade50 + : Colors.blue, child: Center( child: Icon(Icons.crop_free_rounded), ), @@ -338,7 +339,7 @@ class _CropSampleState extends State { ); } - Expanded _buildSumbnail(Uint8List data) { + Expanded _buildThumbnail(Uint8List data) { final index = _imageDataList.indexOf(data); return Expanded( child: InkWell( diff --git a/lib/src/widget/dot_control.dart b/lib/src/widget/dot_control.dart index 6d97b76..1046522 100644 --- a/lib/src/widget/dot_control.dart +++ b/lib/src/widget/dot_control.dart @@ -1,8 +1,8 @@ import 'package:crop_your_image/src/widget/constants.dart'; import 'package:flutter/material.dart'; -/// Defalt dot widget placed on corners to control cropping area. -/// This Widget automaticall fits the appropriate size. +/// Default dot widget placed on corners to control cropping area. +/// This Widget automatically fits the appropriate size. class DotControl extends StatelessWidget { const DotControl({ Key? key,