github_login 0.0.2 copy "github_login: ^0.0.2" to clipboard
github_login: ^0.0.2 copied to clipboard

This flutter plugin simplify Github login process. All you need to just enter Github OAuth credentials and get token.

example/lib/main.dart

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

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

void main() {
  runApp(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 MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              ElevatedButton(
                child: Text('Github Login'),
                style: ElevatedButton.styleFrom(
                  primary: Colors.blue,
                ),
                onPressed: () async {
                  GithubLogin user = new GithubLogin();
                  String token = await user.getToken(
                      context: context,
                      clientId: "ClientID",
                      clientSecret: "ClientSecret",
                      callBackUrl: "https://example.com");
                },
              )
            ],
          ),
        ),
      ),
    );
  }
}
3
likes
40
pub points
30%
popularity

Publisher

unverified uploader

This flutter plugin simplify Github login process. All you need to just enter Github OAuth credentials and get token.

Homepage
Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

dio, flutter, webview_flutter

More

Packages that depend on github_login