promptbet_sdk 1.2.1
promptbet_sdk: ^1.2.1 copied to clipboard
PromptBet SDK for Flutter
PromptBet SDK for Flutter
Add Android Permissions: #
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
Environment #
Use initializeV2 with a token and pass the desired environment so the SDK talks to the matching API and WebView hosts.
final sdk = PromptbetSdk();
final ok = await sdk.initializeV2(
yourToken,
(event) { /* handle events for close, bet, ... */ },
params: { 'environment': 'production' }, // 'dev' | 'staging' | 'production'
);
if (ok) {
await sdk.launch(context);
}
Add iOS Permissions: #
<key>NSMicrophoneUsageDescription</key>
<string>Need microphone access for recording audio</string>
Add iOS Podfile extension: #
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
'PERMISSION_MICROPHONE=1',
]
end
end
end