搜尋套件、儲存庫與 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

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。