v0.0.5
authentication_buttons
要輕鬆地向任何Flutter應用添加社群媒體登入按鈕,請使用Authentication Buttons Flutter套件。
19喜歡 95近 30 天下載160Pub 分數
AndroidiOSWebmacOSWindowsLinux
Flutter 認證按鈕套件
以下為英文專案原文快照,最新內容請造訪 GitHub。
Authentication Buttons allows users to build social media authentication buttons for all popular SSO systems.
Add the dependency in pubsec.yaml file.
dependencies:
flutter:
sdk: flutter
authentication_buttons: 0.0.5
AuthenticationButton(
authenticationMethod: AuthenticationMethod.google,
onPressed: () {},
)
Additional parameters that you might supply include:
AuthenticationMethod
ButtonSize
ShowLoader
Below is the example with all arguments supplied:
AuthenticationButton(
authenticationMethod: AuthenticationMethod.apple,
onPressed: () {},
showLoader: true,
),
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,
),
],
),
],
),
);
}
}
Pull requests are welcome 🙏
For major changes, please open an issue on github
依賴清單 3 項
{"sdk":"flutter"}{"sdk":"flutter"}^2.0.2先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗