A flutter package which makes it easier to display the differences between two images..
The source code is 100% Dart
In the dependencies:
section of your pubspec.yaml
, add the following line:
dependencies:
image_compare: <latest version>
import 'package:image_compare/image_compare.dart';
ImageCompare(
beforeImage: Image.asset('assets/after.jpg'),
afterImage: Image.asset('assets/before.jpg'),
),
All customizable attributes for ImageCompare Widget
Attribute Name | Example Value | Description |
---|---|---|
beforeImage (Widget) | Image.asset('assets/before.jpg') | Sets the Before Image |
afterImage (Widget) | Image.asset('assets/after.jpg') | Sets the After Image |
isVertical (bool) | false | Sets the orientation of the slider |
imageHeight (double) | 100.0 | Sets height of both the images |
imageWidth (double) | 200.0 | Sets width of the images |
imageCornerRadius (double) | 16.0 | Sets the corner radius of the images |
thumbColor (Color) | Colors.red | Sets the color of the slider |
thumbRadius (double) | 16.0 | Sets the radius of the thumb circle |
overlayColor (Color) | Colors.yellow | Sets the color of the slider thumb overlay |