fb_share_plugin 0.1.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 35

fb_share_plugin #

A new Flutter plugin for Facebook Share

Getting Started #

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

0.0.1 #

  • TODO: Describe initial release.

example/lib/main.dart

import 'package:fb_share_plugin_example/media_picker.dart';
import 'package:flutter/material.dart';
import 'package:fb_share_plugin/fb_share_plugin.dart';



void main() => runApp(MaterialApp(
  title: 'Navigation Basics',
  home: MyApp(),
));

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {


  @override
  void initState() {
    super.initState();

  }



  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Container(
          child: Column(
            children: <Widget>[
              Center(
                child: RaisedButton(
                    child: Text("Share Button"),
                    onPressed: ()async {
                  await FbSharePlugin.shareContent("http://www.sheikhsoft.com");
                }),
              ),
              Center(
                child: RaisedButton(
                    child: Text("Facebook Share Video"),
                    onPressed: ()async {
                      await FbSharePlugin.shareVideo("/storage/emulated/0/Download/4721.mp4");
                    }),
              ),
              Center(
                child: RaisedButton(
                    child: Text("WhatsApp Share Video"),
                    onPressed: ()async {
                      await FbSharePlugin.shareVideoWhatsApp("/storage/emulated/0/Download/4721.mp4");
                    }),
              ),

              Center(
                child: RaisedButton(
                    child: Text("Messenger Share Video"),
                    onPressed: ()async {
                      await FbSharePlugin.shareVideoMessenger("/storage/emulated/0/Download/4721.mp4");
                    }),
              ),
              Center(
                child: RaisedButton(
                    child: Text("Twitter Share Video"),
                    onPressed: ()async {
                      await FbSharePlugin.shareVideoTwitter("/storage/emulated/0/Download/4721.mp4");
                    }),
              ),
              Center(
                child: RaisedButton(
                    child: Text("Open Meadia Picker Window"),
                    onPressed: (){
                      Navigator.push(
                        context,
                        MaterialPageRoute(builder: (context) => MediaPickerScreen()),
                      );
                    }),

              ),
              Center(
                child: RaisedButton(
                    child: Text("Facebook Image Share"),
                    onPressed: ()async {
                      await FbSharePlugin.shareImageFb("/storage/emulated/0/viber/media/Viber Images/IMG-da9a022f2b9d9e27dda620c8622d1352-V.jpg");
                    }),

              ),

              Center(
                child: RaisedButton(
                    child: Text("WhatsApp Image Share"),
                    onPressed: ()async {
                      await FbSharePlugin.shareVideoWhatsApp("/storage/emulated/0/viber/media/Viber Images/IMG-da9a022f2b9d9e27dda620c8622d1352-V.jpg");
                    }),

              ),

              Center(
                child: RaisedButton(
                    child: Text("Twitter Image Share"),
                    onPressed: ()async {
                      await FbSharePlugin.shareVideoTwitter("/storage/emulated/0/viber/media/Viber Images/IMG-da9a022f2b9d9e27dda620c8622d1352-V.jpg");
                    }),

              ),

              Center(
                child: RaisedButton(
                    child: Text("Messanger Image Share"),
                    onPressed: ()async {
                      await FbSharePlugin.shareImageMessenger("/storage/emulated/0/viber/media/Viber Images/IMG-da9a022f2b9d9e27dda620c8622d1352-V.jpg");
                    }),

              ),

            ],
          ),
        ),
      );

  }
}

class SecondScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Second Screen"),
      ),
      body: Center(
        child: RaisedButton(
          onPressed: () {
            Navigator.pop(context);
          },
          child: Text('Go back!'),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  fb_share_plugin: ^0.1.3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:fb_share_plugin/fb_share_plugin.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
27
Overall:
Weighted score of the above. [more]
35
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.9+1
  • Flutter: 1.17.3

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:fb_share_plugin/fb_share_plugin.dart]

Package does not support Flutter platform macos

Because of import path [package:fb_share_plugin/fb_share_plugin.dart]

Package does not support Flutter platform web

Because of import path [package:fb_share_plugin/fb_share_plugin.dart]

Package does not support Flutter platform windows

Because of import path [package:fb_share_plugin/fb_share_plugin.dart]

Package not compatible with SDK dart

because of import path [fb_share_plugin]

Health suggestions

Format lib/fb_share_plugin.dart.

Run flutter format to format lib/fb_share_plugin.dart.

Maintenance suggestions

Package is getting outdated. (-53.42 points)

The package was last published 80 weeks ago.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.0
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8