Before After

A flutter package which makes it easier to display the differences between two images..
The source code is 100% Dart, and everything resides in the /lib folder.
Gifs


Installation
In the dependencies:
section of your pubspec.yaml
, add the following line:
dependencies: before_after: <latest version>
Usage
Import this class
import 'package:before_after/before_after.dart';
before after
BeforeAfter( beforeImage: Image.asset('assets/after.jpg'), afterImage: Image.asset('assets/before.jpg'), ),
Customization and Attributes
All customizable attributes for BeforeAfter 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 |
How to Contribute
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am ‘Add some feature’)
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
Source:xsahil03x/before_after