Skip to content

Commit

Permalink
added codeRabbit suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Satyam Jha committed Jan 19, 2025
1 parent 274eaa5 commit 6c6ac20
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/services/image_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class ImageService {
cropGridColor: Colors.white,
initAspectRatio: CropAspectRatioPreset.original,
lockAspectRatio: false,
cropStyle: CropStyle.rectangle,
aspectRatioPresets: [
CropAspectRatioPreset.square,
CropAspectRatioPreset.original,
Expand Down
24 changes: 24 additions & 0 deletions test/service_tests/multi_media_pick_service_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ void main() {
androidSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.original),
);
expect(
androidSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.ratio3x2),
);
expect(
androidSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.ratio4x3),
);
expect(
androidSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.ratio16x9),
);
expect(
iosSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.square),
Expand All @@ -114,6 +126,18 @@ void main() {
iosSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.original),
);
expect(
iosSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.ratio3x2),
);
expect(
iosSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.ratio4x3),
);
expect(
iosSettings.aspectRatioPresets,
contains(CropAspectRatioPreset.ratio16x9),
);
});
test("test no photo provided for the pick image", () async {
final model = MultiMediaPickerService();
Expand Down

0 comments on commit 6c6ac20

Please sign in to comment.