Skip to content

thomas-vl/share_everywhere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Apr 21, 2023
7a2b2cc · Apr 21, 2023

History

3 Commits
Apr 21, 2023
Sep 8, 2021
Apr 21, 2023
Apr 21, 2023
Sep 8, 2021
Sep 8, 2021
Apr 21, 2023
Sep 8, 2021
Sep 8, 2021
Apr 21, 2023
Apr 21, 2023

Repository files navigation

share_everywhere

Create a share button for all platforms.

On Android and IOS the share_plus functionality is used.

On Mac, Linux and Windows a popup is shown with the configured networks.

Usage

import the package

import 'package:share_everywhere/share_everywhere.dart';

create a controller

ShareController shareController = ShareController(
    title: "Share on:",
    elevatedButtonText: Text("Share"),
    networks: [
      SocialConfig(type: "facebook", appId: "your-facebook-app-id"),
      SocialConfig(type: "linkedin"),
      SocialConfig(type: "twitter"),
    ],
  );

show the share button in a widget

Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'Click the share button below:',
            ),
            ShareButton(shareController, "https://example.com")
          ],
        ),
      ),
    );
  }

About

Flutter package to share a link on social networks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published