facebook_auth_desktop 0.0.3 copy "facebook_auth_desktop: ^0.0.3" to clipboard
facebook_auth_desktop: ^0.0.3 copied to clipboard

outdated

macOS support for flutter_facebook_auth

example/lib/main.dart

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

final plugin = FacebookAuthDesktopPlugin();

void main() {
  plugin.webAndDesktopInitialize(
    appId: '1329834907365798',
    cookie: true,
    version: 'v13.0',
    xfbml: true,
  );
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  void _signIn() {
    plugin.login();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: MaterialButton(
            onPressed: _signIn,
            child: const Text('sign in'),
          ),
        ),
      ),
    );
  }
}
1
likes
0
pub points
83%
popularity

Publisher

unverified uploader

macOS support for flutter_facebook_auth

License

unknown (license)

Dependencies

flutter, flutter_facebook_auth_platform_interface, flutter_secure_storage, http

More

Packages that depend on facebook_auth_desktop