share_plus_dialog 2.0.1 copy "share_plus_dialog: ^2.0.1" to clipboard
share_plus_dialog: ^2.0.1 copied to clipboard

A package that improves sharing on desktop and web from the share_plus plugin with a sharing dialog

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:share_plus_dialog/share_plus_dialog.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        colorSchemeSeed: Colors.blue,
        brightness: Brightness.dark,
        useMaterial3: true,
      ),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
          child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          ElevatedButton(
            onPressed: () => ShareDialog.share(
              context,
              body: 'Some random text to be shared',
              platforms: SharePlatform.defaults,
            ),
            child: const Text('Share'),
          ),
        ],
      )),
    );
  }
}
6
likes
150
points
566
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

A package that improves sharing on desktop and web from the share_plus plugin with a sharing dialog

Repository (GitHub)

Topics

#share #sharing #dialog #material

Documentation

API reference

Funding

Consider supporting this project:

github.com
buymeacoffee.com

License

unknown (license)

Dependencies

flutter, share_plus, url_launcher

More

Packages that depend on share_plus_dialog