share_social_media_plugin 1.0.3 copy "share_social_media_plugin: ^1.0.3" to clipboard
share_social_media_plugin: ^1.0.3 copied to clipboard

discontinued
outdated

Share social media plugin, share Line, Twitter, FB, Instagram and more!, I try develop step for step. Any suggestion please contact me.

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:share_social_media_plugin/share_social_media_plugin.dart';

void main() => runApp(MyApp());

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

class _MyAppState extends State<MyApp> {
  final twitterLogin = new ShareSocialMediaPlugin(
      consumerKey: "YOUR_CONSUMER_KEY",
      consumerSecret: 'CONSUMER_SECRECT');

  Future<int> _startSession() async {
    var sessionData = await twitterLogin.currentSession;

    if (sessionData == null) {
      var result = await twitterLogin.authorize();
    } else
      print(sessionData);

    return 0;
  }

  void _logout() async {
    await twitterLogin.logOut();
  }

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Share social media'),
        ),
        body: Column(
          children: <Widget>[
            RaisedButton(
              onPressed: () async {
                await ShareSocialMediaPlugin.shareLine("http://www.google.com");
              },
              child: Text('Share in Line', style: TextStyle(fontSize: 20)),
            ),
            new RaisedButton(
              child: new Text('Share in Twitter'),
              onPressed: () {
                twitterLogin.shareTwitter("hola mundo");
              },
            ),
          ],
        ),
      ),
    );
  }
}
18
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Share social media plugin, share Line, Twitter, FB, Instagram and more!, I try develop step for step. Any suggestion please contact me.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

crypto, flutter, http, intl, random_string

More

Packages that depend on share_social_media_plugin