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

This is Widget for Slack login. You can provide Slack login feature by set it to your parent Widget simply. As result, you will get access_token from callback you specified.

slack_login_button #

This Flutter plugin is Widget for Slack login.

You can provide Slack login feature by set it to your parent Widget simply. As result, you will get access_token from callback you specified.

Getting Started #

main.dart of example is simple. This code shows us how to use. First, you need to create Slack app to fill clientId and secret. sopce is you can set what you want. In my case, that is users:read permission only.

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

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final clientId = 'clientId';
    final clientSecret = 'secret';
    final scope = ['users:read'];
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Slack login button example'),
        ),
        body: Center(
          child: SlackLoginButton(
            clientId,
            clientSecret,
            scope,
            (token) {
              print(token?.accessToken);
            },
          ),
        ),
      ),
    );
  }
}

Screenshots #

Slack button on parent widget #

First, Slack button shows as example.

Request permission on Slack #

Next, pressed button. If you are first time, Slack shows sign in page. otherwise, permission page is shown as this case.

1
likes
120
pub points
34%
popularity

Publisher

verified publisherkunimasu.com

This is Widget for Slack login. You can provide Slack login feature by set it to your parent Widget simply. As result, you will get access_token from callback you specified.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter, flutter_webview_plugin, http

More

Packages that depend on slack_login_button