guard 1.0.4 copy "guard: ^1.0.4" to clipboard
guard: ^1.0.4 copied to clipboard

discontinued

Evauluates the function wrapping the body with try/catch and returns default value if error was raised or return value is null

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add guard

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

dependencies:
  guard: ^1.0.4

Alternatively, your editor might support dart pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:guard/guard.dart';
7
likes
40
pub points
5%
popularity

Publisher

verified publisherlesnitsky.dev

Evauluates the function wrapping the body with try/catch and returns default value if error was raised or return value is null

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

More

Packages that depend on guard