搜索插件、代码仓与 APP 分类

插件详情v0.0.5

authentication_buttons

要轻松地向任何Flutter应用添加社交媒体登录按钮,请使用Authentication Buttons Flutter包。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
95
喜欢数
19
Pub 分数
160

安装插件

flutter pub add authentication_buttons

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

认证按钮包提供了一种简单而优雅的方式,将社交媒体登录按钮集成到Flutter应用中。它为Google、Facebook、Apple等热门平台提供了预设计且可自定义的按钮,通过极少的代码即可提升用户的注册体验。该包支持Android、iOS、Web、macOS、Windows和Linux等多个平台,确保在不同设备上保持一致的用户界面。通过易于使用的组件和内置的样式选项,开发者可以快速实现认证UI,而无需从零开始设计。非常适合需要快速、视觉吸引力强的登录体验的应用。

适合场景

  • 向移动应用添加社交登录按钮
  • 集成 Google/Facebook/Apple 登录
  • 增强用户入门流程
  • 构建跨平台身份验证 UI
  • 创建现代登录界面

主要特点

  • 预构建的社交登录按钮
  • 跨平台支持
  • 可自定义的按钮样式
  • 与 Flutter 的轻松集成
  • 适用于所有设备的响应式设计

适合对象

  • Flutter 开发人员构建登录屏幕
  • 需要社交认证的应用
  • 项目优先考虑快速的UI实现
  • 希望拥有统一身份验证界面的团队
  • 面向多个平台的开发者

使用建议

  • OAuth 工作流需要额外设置
  • 可能需要为平台特定行为自定义处理
  • 仅限UI组件——不管理身份验证逻辑
  • 依赖外部提供方进行实际身份验证
  • 不适用于非社交登录方式

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

pub package pub points LinkedIn

Authentication Buttons

Authentication Buttons allows users to build social media authentication buttons for all popular SSO systems.

Usage

Add the dependency in pubsec.yaml file.

  dependencies:
    flutter:
      sdk: flutter
    authentication_buttons: 0.0.5

How to Use

  AuthenticationButton(
    authenticationMethod: AuthenticationMethod.google,
    onPressed: () {},
  )

Additional parameters that you might supply include:

  • AuthenticationMethod

    • google
    • apple
    • microsoft
    • facebook
    • reddit
    • twitter
    • linkedin
    • github
    • medium
    • dribbble
    • spotify
    • pinterest
  • ButtonSize

    • small
    • large
  • ShowLoader

    • true
    • false

Below is the example with all arguments supplied:

  AuthenticationButton(
    authenticationMethod: AuthenticationMethod.apple,
    onPressed: () {},
    showLoader: true,
  ),

Screenshots

demo screenshot_1 screenshot_2

Example

import 'package:authentication_buttons/src/authentication_button.dart';
import 'package:authentication_buttons/src/utils/enums/authentication_method.dart';
import 'package:authentication_buttons/src/utils/enums/button_size.dart';
import 'package:flutter/material.dart';

void main() => runApp(
      const MaterialApp(
        title: 'Authentication Buttons',
        home: AuthenticationButtonsExample(),
      ),
    );

class AuthenticationButtonsExample extends StatelessWidget {
  const AuthenticationButtonsExample({
    super.key,
  });

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text(
          'Authentication Buttons',
        ),
      ),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.spaceEvenly,
        children: [
          AuthenticationButton(
            authenticationMethod: AuthenticationMethod.google,
            onPressed: () {},
          ),
          AuthenticationButton(
            authenticationMethod: AuthenticationMethod.pinterest,
            onPressed: () {},
            showLoader: true,
          ),
          AuthenticationButton(
            authenticationMethod: AuthenticationMethod.microsoft,
            onPressed: () {},
            showLoader: true,
          ),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: [
              AuthenticationButton(
                authenticationMethod: AuthenticationMethod.twitter,
                onPressed: () {},
                buttonSize: ButtonSize.small,
              ),
              AuthenticationButton(
                authenticationMethod: AuthenticationMethod.dribbble,
                onPressed: () {},
                buttonSize: ButtonSize.small,
                showLoader: true,
              ),
              AuthenticationButton(
                authenticationMethod: AuthenticationMethod.spotify,
                onPressed: () {},
                buttonSize: ButtonSize.small,
              ),
            ],
          ),
        ],
      ),
    );
  }
}

Contributing

Pull requests are welcome 🙏

For major changes, please open an issue on github

所属分类

源码仓库

使用此插件的项目

暂无相关数据。