flutter_twitter 1.1.3

flutter_twitter #

pub package Build Status Coverage Status

A Flutter plugin for using the native TwitterKit SDKs on Android and iOS.

This plugin uses the new Gradle 4.1 and Android Studio 3.0 project setup.

Dart support #

  • Dart 1: 1.0.x.
  • Dart 2: 1.1.0 and up.

Before instalation #

Before you begin it is important to properly configure your application at https://apps.twitter.com/

It is important to configure the callback URLs so that everything works correctly in your application.

You will have to use the following callback URLs:

Android - twittersdk: //

iOS - twitterkit-CONSUMERKEY: //

FOR MORE INFORMATION READ: https://developer.twitter.com/en/docs/basics/developer-portal/guides/callback-urls.html

Complete Guide on

Configure Info.Plist #

Twitter Kit looks for a URL scheme in the format twitterkit-

You can find your consumer key in the Twitter app dashboard.

In your app's Info.plist, add URL Schemes by adding code below after

// Info.plist

Installation #

See the installation instructions on pub. No platform-specific configuration is needed!

How do I use it? #

Here's some sample code that should cover most of the cases. For full API reference, just see the source code. Everything is documented there.

var twitterLogin = new TwitterLogin(
  consumerKey: '<your consumer key>',
  consumerSecret: '<your consumer secret>',

final TwitterLoginResult result = await twitterLogin.authorize();

switch (result.status) {
  case TwitterLoginStatus.loggedIn:
    var session = result.session;
    _sendTokenAndSecretToServer(session.token, session.secret);
  case TwitterLoginStatus.cancelledByUser:
  case TwitterLoginStatus.error:

1.1.2 #

  • Forked project to use versioning

1.1.0 #

  • Dart 2 support! There should not be any breaking changes. Please do file issues if you have problems.

1.0.1 #

  • Fixed onActivityResult override that was potentially preventing other plugins from receiving Activity results.
  • Fixed a logout crash on Android in the case when the user wasn't already logged in.
  • Fixed #1 by returning NSNull from the sessionToMap method when the twitter session is nil.
  • Fix #2 by clarifying the documentation. Also explain the toMap and fromMap methods of TwitterSession more clearly.

1.0.0 #

  • Initial release.


flutter_twitter_login_example #

Demonstrates how to use the flutter_twitter_login plugin.

Getting Started #

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

Use this package as a library

1. Depend on it

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

  flutter_twitter: ^1.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:flutter_twitter/flutter_twitter.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Format lib/flutter_twitter.dart.

Run flutter format to format lib/flutter_twitter.dart.


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