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: ^0.0.1

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().shareFiles(
  filePaths: [filePath],
  text: 'Sharing a sample file',
  mimeType: 'text/plain',
);
print('File share result: $fileResult');

Screenshots

Below are some screenshots of the custom_share plugin in action:

Android Screenshot iOS Screenshot macOS Screenshot

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