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

outdated

A new Flutter plugin for Sign in with SMS/Email via AccountKit.

example/lib/main.dart

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

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

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

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

class _MyAppState extends State<MyApp> {
  PluginSocial authencationExample = new PluginSocial();

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

  signInWithSMS() async {
    await authencationExample.signInWithSMS();
  }

  signInWithEmail() async {
    await authencationExample.signInWithEmail();
  }

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('Plugin example app'),
        ),
        body: new Center(
          child: new Column(
            mainAxisAlignment: MainAxisAlignment.center,
            mainAxisSize: MainAxisSize.max,
            children: <Widget>[
              new RaisedButton(
                child: new Text("Press to sign in with SMS"),
                onPressed: () async {
                  this.signInWithSMS();
                },
              ),
              new RaisedButton(
                child: new Text("Press to sign in with Email"),
                onPressed: () async {
                this.signInWithEmail();
                },
              )
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter plugin for Sign in with SMS/Email via AccountKit.

Repository (GitLab)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on plugin_social