cafebazaar_flutter
cafebazaar_flutter copied to clipboard
isLoggedIn method does not work in Flutter 3.7
The isLoggedIn method does not work and does not return anything. It doesn't even return an error! I try to use it like this:
Future<bool> launchPurchaseFlow() async {
bool success = false;
try {
bool? isLoggedIn = await _bazaar.isLoggedIn();
if (isLoggedIn == null || isLoggedIn == false) {
_showProperMessage(isLoggedIn);
return success;
} else {
final PurchaseInfo? purchaseInfo = await inapp.purchase(AppConfig.productSKU, payLoad: "payLoad");
if (purchaseInfo != null) {
success = await _getPurchaseAtBazaar();
}
}
} catch (e) {
_showCafeBazaarErrorState();
}
return success;
}
And this is my Flutter doctor -v results:
PS C:\Users\hossein\projects\flutter\haazerr> Flutter doctor -v
[√] Flutter (Channel stable, 3.7.0, on Microsoft Windows [Version 10.0.19044.2604], locale en-US)
• Flutter version 3.7.0 on channel stable at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision b06b8b2710 (5 weeks ago), 2023-01-23 16:55:55 -0800
• Engine revision b24591ed32
• Dart version 2.19.0
• DevTools version 2.20.1
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at C:\Users\hossein\AppData\Local\Android\sdk
• Platform android-33-ext4, build-tools 33.0.1
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2022.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)
[√] VS Code (version 1.75.1)
• VS Code at C:\Users\hossein\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.58.0
[√] Connected device (4 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 12 (API 31) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.2604]
• Chrome (web) • chrome • web-javascript • Google Chrome 110.0.5481.177
• Edge (web) • edge • web-javascript • Microsoft Edge 110.0.1587.50
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.