laravel_exception 0.0.4 laravel_exception: ^0.0.4 copied to clipboard
parse laravel exceptions to dart classes for easier and better handling support 422 - validation ,500 server errors , 404 not found exceptions
import 'package:laravel_exception/laravel_exception.dart';
void main(List<String> args) {
dynamic res;
if (res.statusCode == 422) {
throw LValidationException(res.data);
} else if (res.statusCode == 500) {
throw LServerException.parse(res.data);
} else if (res.statusCode == 404) {
throw LNotFoundException.parse(res.data);
}
}