You can use the EsysFlutterShare plugin . In version 1.0.0, you can share any file that you like, and it works on both iOS and Android.
Just put this in your pubspec.yaml:
dependencies:
esys_flutter_share: ^1.0.0
Import the library:
import 'package:esys_flutter_share/esys_flutter_share.dart';
Share file:
final ByteData bytes = await rootBundle.load('assets/image1.png');
await Share.file('esys image', 'esys.png', bytes.buffer.asUint8List(), 'image/png');
You need to specify the name, file name, bytes and MIME type.
source
share