1. Add package
2. Run Pub get
3. run the app on Android or ios
4. it crashes immediately
Supporting info to reproduce
iOS screenshot
Android Screenshot
Relevant log output
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
Running Gradle task 'assembleDebug'...
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply
You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply
../../.pub-cache/hosted/pub.dev/stream_chat_flutter_core-7.2.0/lib/src/stream_chat_core.dart:127:45: Error: A value of type 'Stream<List<ConnectivityResult>>' can't be assigned to a variable of type 'Stream<ConnectivityResult>?'.
- 'Stream' is from 'dart:async'.
- 'List' is from 'dart:core'.
- 'ConnectivityResult' is from 'package:connectivity_plus_platform_interface/src/enums.dart' ('../../.pub-cache/hosted/pub.dev/connectivity_plus_platform_interface-2.0.0/lib/src/enums.dart').
connectivityStream ??= Connectivity().onConnectivityChanged;
^
../../.pub-cache/hosted/pub.dev/stream_chat_flutter_core-7.2.0/lib/src/stream_chat_core.dart:129:30: Error: Method 'distinct' cannot be called on 'Stream<ConnectivityResult>?' because it is potentially null.
- 'Stream' is from 'dart:async'.
- 'ConnectivityResult' is from 'package:connectivity_plus_platform_interface/src/enums.dart' ('../../.pub-cache/hosted/pub.dev/connectivity_plus_platform_interface-2.0.0/lib/src/enums.dart').
Try calling using ?. instead.
connectivityStream.distinct().listen((result) {
^^^^^^^^
Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.
* Where:
Script '/Users/zionnite/Developer/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 1419
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/zionnite/Developer/flutter/bin/flutter'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 20s
Error: Gradle task assembleDebug failed with exit code 1
Flutter analyze output
No response
Flutter doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.2, on macOS 14.4.1 23E224 darwin-arm64,
locale en-GB)
[!] Android toolchain - develop for Android devices (Android SDK version
34.0.0)
! Some Android licenses not accepted. To resolve this, run: flutter
doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] IntelliJ IDEA Community Edition (version 2023.3.2)
[✓] VS Code (version 1.88.1)
[✓] Connected device (4 available)
[✓] Network resources
! Doctor found issues in 1 category.
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Which packages are you using?
stream_chat_flutter
On what platforms did you experience the issue?
iOS, Android
What version are you using?
7.2.0-hotfix.1
What happened?
I can't build app either in Android or iOS
Steps to reproduce
Supporting info to reproduce
iOS screenshot
Android Screenshot
Relevant log output
Flutter analyze output
No response
Flutter doctor output
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.19.2, on macOS 14.4.1 23E224 darwin-arm64, locale en-GB) [!] Android toolchain - develop for Android devices (Android SDK version 34.0.0) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [✓] Xcode - develop for iOS and macOS (Xcode 15.3) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.1) [✓] IntelliJ IDEA Community Edition (version 2023.3.2) [✓] VS Code (version 1.88.1) [✓] Connected device (4 available) [✓] Network resources
! Doctor found issues in 1 category.
Code of Conduct