Skip to content

Commit 64c5aa3

Browse files
Fix linter
1 parent 4764c4f commit 64c5aa3

File tree

4 files changed

+40
-16
lines changed

4 files changed

+40
-16
lines changed

native_image_cropper_android/lib/src/platform.dart

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ final class NativeImageCropperAndroid extends NativeImageCropperPlatform {
3838
);
3939
}
4040
return croppedImage;
41-
} on PlatformException catch (e) {
42-
throw NativeImageCropperException(e.code, e.message);
41+
} on PlatformException catch (e, stackTrace) {
42+
Error.throwWithStackTrace(
43+
NativeImageCropperException(e.code, e.message),
44+
stackTrace,
45+
);
4346
}
4447
}
4548

@@ -70,8 +73,11 @@ final class NativeImageCropperAndroid extends NativeImageCropperPlatform {
7073
);
7174
}
7275
return croppedImage;
73-
} on PlatformException catch (e) {
74-
throw NativeImageCropperException(e.code, e.message);
76+
} on PlatformException catch (e, stackTrace) {
77+
Error.throwWithStackTrace(
78+
NativeImageCropperException(e.code, e.message),
79+
stackTrace,
80+
);
7581
}
7682
}
7783
}

native_image_cropper_ios/lib/src/platform.dart

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ final class NativeImageCropperIOS extends NativeImageCropperPlatform {
3838
);
3939
}
4040
return croppedImage;
41-
} on PlatformException catch (e) {
42-
throw NativeImageCropperException(e.code, e.message);
41+
} on PlatformException catch (e, stackTrace) {
42+
Error.throwWithStackTrace(
43+
NativeImageCropperException(e.code, e.message),
44+
stackTrace,
45+
);
4346
}
4447
}
4548

@@ -70,8 +73,11 @@ final class NativeImageCropperIOS extends NativeImageCropperPlatform {
7073
);
7174
}
7275
return croppedImage;
73-
} on PlatformException catch (e) {
74-
throw NativeImageCropperException(e.code, e.message);
76+
} on PlatformException catch (e, stackTrace) {
77+
Error.throwWithStackTrace(
78+
NativeImageCropperException(e.code, e.message),
79+
stackTrace,
80+
);
7581
}
7682
}
7783
}

native_image_cropper_macos/lib/src/platform.dart

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ final class NativeImageCropperMacOS extends NativeImageCropperPlatform {
3838
);
3939
}
4040
return croppedImage;
41-
} on PlatformException catch (e) {
42-
throw NativeImageCropperException(e.code, e.message);
41+
} on PlatformException catch (e, stackTrace) {
42+
Error.throwWithStackTrace(
43+
NativeImageCropperException(e.code, e.message),
44+
stackTrace,
45+
);
4346
}
4447
}
4548

@@ -70,8 +73,11 @@ final class NativeImageCropperMacOS extends NativeImageCropperPlatform {
7073
);
7174
}
7275
return croppedImage;
73-
} on PlatformException catch (e) {
74-
throw NativeImageCropperException(e.code, e.message);
76+
} on PlatformException catch (e, stackTrace) {
77+
Error.throwWithStackTrace(
78+
NativeImageCropperException(e.code, e.message),
79+
stackTrace,
80+
);
7581
}
7682
}
7783
}

native_image_cropper_platform_interface/lib/src/method_channel.dart

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ final class MethodChannelNativeImageCropper extends NativeImageCropperPlatform {
3535
);
3636
}
3737
return croppedImage;
38-
} on PlatformException catch (e) {
39-
throw NativeImageCropperException(e.code, e.message);
38+
} on PlatformException catch (e, stackTrace) {
39+
Error.throwWithStackTrace(
40+
NativeImageCropperException(e.code, e.message),
41+
stackTrace,
42+
);
4043
}
4144
}
4245

@@ -67,8 +70,11 @@ final class MethodChannelNativeImageCropper extends NativeImageCropperPlatform {
6770
);
6871
}
6972
return croppedImage;
70-
} on PlatformException catch (e) {
71-
throw NativeImageCropperException(e.code, e.message);
73+
} on PlatformException catch (e, stackTrace) {
74+
Error.throwWithStackTrace(
75+
NativeImageCropperException(e.code, e.message),
76+
stackTrace,
77+
);
7278
}
7379
}
7480
}

0 commit comments

Comments
 (0)