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

A Flutter package that removes background from images using remove.bg API. Simple to use with support for both local files and image URLs.

Remove.bg #

A Flutter package that provides easy integration with the Remove.bg API to remove backgrounds from images.

Features #

  • Remove background from local image files
  • Remove background from image URLs
  • Simple and easy-to-use API
  • Supports both Android and iOS

Getting Started #

Prerequisites #

  1. Sign up for a Remove.bg API key at remove.bg
  2. Add the package to your pubspec.yaml:
dependencies:
  remove_bg: ^0.0.1
  1. Run:
flutter pub get

Usage #

  1. Initialize the RemoveBg class with your API key:
final removeBg = RemoveBg(apiKey: 'YOUR_API_KEY_HERE');
  1. Remove background from a local image:
try {
  final processedImageBytes = await removeBg.removeBackground('/path/to/image.jpg');
  // Save or display the processed image
} catch (e) {
  print('Error: $e');
}
  1. Remove background from an image URL:
try {
  final processedImageBytes = await removeBg.removeBackgroundFromUrl('https://example.com/image.jpg');
  // Save or display the processed image
} catch (e) {
  print('Error: $e');
}

Example #

Check out the example directory for a complete sample application.

Additional Information #

For more information about the Remove.bg API, visit their API documentation.

License #

This project is licensed under the MIT License - see the LICENSE file for details.

1
likes
0
points
140
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that removes background from images using remove.bg API. Simple to use with support for both local files and image URLs.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http, path

More

Packages that depend on flutter_remove_bg