flutter_social_button 1.1.1 copy "flutter_social_button: ^1.1.1" to clipboard
flutter_social_button: ^1.1.1 copied to clipboard

outdated

Flutter Social Button is a flutter package to create social media login buttons easily to any flutter app.

Flutter Social Button #

pub package pub points LinkedIn Youtube

Flutter Social Button is a flutter package to create social media login buttons easily to any flutter app.

Screenshot #

#Mobile View

Image

#Web View

Image

Getting started #

Usage #

Add the dependency in pubsec.yaml file.

dart
  dependencies:
    flutter:
      sdk: flutter
    flutter_social_button: any

Usage Example #

import flutter_social_button.dart


import 'package:flutter_social_button/flutter_social_button.dart';

For built-in buttons. #


// for full width Buttons

            //For default Button Its return a Email Button
               FlutterSocialButton(
                   onTap: () {}, ), 
                   
            //For facebook Button   
            
             FlutterSocialButton(
                onTap: () {},
                buttonType: ButtonType.facebook, // Button type for different type buttons
              ),
              
          //For google Button
          
               FlutterSocialButton(
                onTap: () {},
                buttonType: ButtonType.google, // Button type for different type buttons
                iconColor: Colors.black,  // for change icons colors
              ),  

           // for Mini Circle Button

                 FlutterSocialButton(
                    onTap: () {},
                    mini: true,   //just pass true for mini circle buttons
                    buttonType: ButtonType.phone,  // Button type for different type buttons
                  ),

Button Types #

  • Facebook
  • Google
  • Twitter
  • Linkedin
  • Whatsapp
  • Apple
  • Github
  • Phone
  • Email

Example #

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

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Social Buttons"),
        centerTitle: true,
      ),
      body: Center(
        child: SingleChildScrollView(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              //For default Button
              FlutterSocialButton(
                onTap: () {},
              ),
              const SizedBox(
                height: 2,
              ),

              //For facebook Button
              FlutterSocialButton(
                onTap: () {},
                buttonType: ButtonType.facebook,
              ),
              const SizedBox(
                height: 2,
              ),

              //For google Button
              FlutterSocialButton(
                onTap: () {},
                buttonType: ButtonType.google,
              ),
              const SizedBox(
                height: 2,
              ),

              //For phone Button
              FlutterSocialButton(
                onTap: () {},
                buttonType: ButtonType.phone,
              ),

              const SizedBox(
                height: 2,
              ),

              //For Whatsapp Button
              FlutterSocialButton(
                onTap: () {},
                buttonType: ButtonType.whatsapp,
              ),
              const SizedBox(
                height: 2,
              ),

              const Divider(
                color: Colors.black,
                thickness: 2.5,
              ),
              Row(
                mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                children: [
                  FlutterSocialButton(
                    onTap: () {},
                    mini: true,
                  ),
                  FlutterSocialButton(
                    onTap: () {},
                    mini: true,
                    buttonType: ButtonType.facebook,
                  ),
                  FlutterSocialButton(
                    onTap: () {},
                    mini: true,
                    buttonType: ButtonType.google,
                  ),
                  FlutterSocialButton(
                    onTap: () {},
                    mini: true,
                    buttonType: ButtonType.phone,
                  ),
                ],
              )
            ],
          ),
        ),
      ),
    );
  }
}


Contributing #

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

38
likes
0
pub points
92%
popularity

Publisher

unverified uploader

Flutter Social Button is a flutter package to create social media login buttons easily to any flutter app.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, font_awesome_flutter

More

Packages that depend on flutter_social_button