Please refer to this document
- iOS 15.0 or later (required by the native
Pokepaypod as of 2.3.0) - Android
minSdkVersion26 or later
In your app's ios/Podfile, set the platform and raise the deployment target of
every pod. Both are required: APIKit (a transitive dependency of Pokepay)
declares iOS 9.0 and the Flutter pod declares 11.0, and Xcode 26 and later
refuse to build anything below 15.0.
platform :ios, '15.0'
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
# Must come after flutter_additional_ios_build_settings, which resets it.
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
end
end
endAlso set IPHONEOS_DEPLOYMENT_TARGET to 15.0 for the Runner target itself
(Xcode: Runner → General → Minimum Deployments).
- In the pubspec.yaml of the project, add the following:
dependencies:
pokepay_sdk: ^YOUR_VERSION- Then run this
flutter pub get- Then you can use Pokepay SDK in your project.
- How to use OAthClient with FlutterWebAuth
PokepayOAuthClient oauthClient = PokepayOAuthClient(clientId: YOUR_CLIENT_ID,clientSecret: YOUR_CLIENT_SCRET, env: APIEnv.DEVELOPMENT);
String authUrl = oauthClient.getAuthorizationUrl();
String result = await FlutterWebAuth.authenticate(url: authUrl, callbackUrlScheme: 'pocketchange'));
AccessToken accessToken = await oauthClient.getAccessToken(Uri.parse(result).queryParameters['code']));
- How to use the client
PokepayAPI(env: APIEnv.YOUR_ENV,accessToken: YOUR_ACCESS_TOKEN,);
- Call API, for example, create account
PokepayAPI api = PokepayAPI(env: APIEnv.YOUR_ENV,accessToken: YOUR_ACCESS_TOKEN,);
Account createdAccount = await api.createAccount(name:your_wallet_name, privateMoneyId: your_private_money_id);
lib/generated/ 以下と android/.../AutogenMethodHandlers.java /
ios/Classes/AutogenMethodHandlers.swift はコードジェネレーターによる
自動生成ファイルです。手で編集しないでください。
再生成後は build_runner で .g.dart を更新します:
flutter pub run build_runner build --delete-conflicting-outputsDart が送るメソッド名・引数キーとネイティブプラグイン側の読み取りの 食い違い (実行時に null になる) を検出します。CI でも実行されます。
dart tool/check_native_links.dart # エラーのみ fail
dart tool/check_native_links.dart --strict # warning も fail