패키지, 저장소 및 앱 카테고리 검색

GitHub 저장소wh120/uaepass_api

uaepass_api

uaepass_api flutter 패키지

uaepass_api 프로젝트 이미지
스타
2
포크
4
최근 푸시(UTC)
2024. 8. 17.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

uaepass_api

Un-official UAE PASS Flutter package for authentication capability.

Why uaepass_api?

  • 🚀 Easy to use
  • ⚡ Fullscreen window
  • ❤ Supports app installed scenario
  • ❤ Supports app not installed scenario
  • 🛡️ Null safety

Getting Started

  • Add the plugin to your pubspec.yaml file
uaepass_api: ^1.0.3
  • Run flutter pub get
flutter pub get
  • Import the package
import 'package:uaepass_api/uaepass_api.dart';

UaePassAPI uaePassAPI =UaePassAPI(
    clientId: "<clientId>",
    redirectUri: "<redirectUri>",
    clientSecrete: "<clientSecrete>",
    appScheme: "<Your App Scheme>",
    language: "en",
    isProduction: false);
  • Get user code
    String? code =  await uaePassAPI.signIn(context);
  • Get user AccessToken
    String? token =  await uaePassAPI.getAccessToken(code);
  • Get user info
    String? token =  await uaePassAPI.getUserProfile(token);
  • Logout
  await uaePassAPI.logout(context);

iOS Setup

  • Add the following to your Info.plist file
  <key>LSApplicationQueriesSchemes</key>
    <array>
      <string>uaepass</string>
      <string>uaepassqa</string>
      <string>uaepassdev</string>
      <string>uaepassstg</string>
    </array>
  <key>CFBundleURLTypes</key>
  <array>
    <dict>
      <key>CFBundleTypeRole</key>
      <string>Editor</string>
      <key>CFBundleURLName</key>
      <string>You App URL Scheme here</string>
      <key>CFBundleURLSchemes</key>
      <array>
        <string>You App URL Scheme here</string>
      </array>
    </dict>
  </array>

Android Setup

  • Update android:launchMode="singleTask" the AndroidManifest.xml file

 <activity
            android:name=".MainActivity"
            android:exported="true"

            android:launchMode="singleTask"

            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            .....

            </activity>

  • Set up the intent filter in your AndroidManifest.xml file
            <intent-filter >
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />


                <data
                    android:host="success"
                    android:scheme="<Your App Scheme>" />

                <data
                    android:host="failure"
                    android:scheme="<Your App Scheme>" />

            </intent-filter>

Note: incase kotlin error, add the following to your build.gradle file

buildscript {
    // update this line
    ext.kotlin_version = '1.7.10'

Read Common issues

Wael Alhalabi GitHub avatar
GitHub 작성자

Wael Alhalabi ↗

Null
언어C++CMakeDartRubySwiftHTMLCKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 7 개

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗