safe_browsing 0.0.1 copy "safe_browsing: ^0.0.1" to clipboard
safe_browsing: ^0.0.1 copied to clipboard

Using google safe browsing API to detect whether the URL is safe.

Safe Browsing #

Using google safe browsing API to detect whether the URL is safe.

Usage #

Create the instance

final safeBrowsing = SafeBrowsing(
  options: DefaultFirebaseOptions.currentPlatform,
  isDebug: !kReleaseMode,
);
/// The URL you want to check
final url = 'https://example.com';

/// Check whether the URL is safe and return `SafeBrowsingState`
final result = await safeBrowsing.check(url);

/// Check whether the URL is safe and return `bool`
final isSafe = await safeBrowsing.isSafe(url);

Additional #

Use this method to validate the URL

SafeBrowsing.validateUrl(url);
1
likes
0
points
45
downloads

Publisher

verified publisherlamnhan.dev

Weekly Downloads

Using google safe browsing API to detect whether the URL is safe.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

firebase_core, flutter, http, url_launcher

More

Packages that depend on safe_browsing