Custom Share
A Flutter plugin for sharing text and files via NATIVE SHARE UI, supporting Android , iOS, macOS, Windows, Linux.
Features
- Share text, URLs, and files to popular social media apps.
- Use NATIVE SHARE UI.
- Easy-to-use API for developers.
Installation
Add the following to your pubspec.yaml
:
dependencies:
custom_share: ^1.0.7
Run:
flutter pub get
Usage
import 'package:custom_share/custom_share.dart';
// Share text
final result = await CustomShare.shareText(text: 'Hello from Custom Share!');
print('Share result: $result');
// Share a file
final filePath = '/path/to/sample.txt';
final fileResult = await CustomShare.shareFile(
filePath: filePath,
);
print('File share result: $fileResult');
Screenshots
Below are some screenshots of the custom_share
plugin in action:
Example
See the example/
folder for a sample Flutter app demonstrating the usage of this plugin.
Issues
Please file any issues or feature requests on the GitHub issue tracker.
License
BSD-3-Clause
Libraries
- A Flutter plugin for sharing content to social media and system share UI on Android and iOS platforms.
- Implements the custom_share plugin using Flutter's MethodChannel for platform-specific communication.
- Defines the platform interface for the custom_share plugin.