GetStream / stream-chat-flutter

Flutter Chat SDK - Build your own chat app experience using Dart, Flutter and the Stream Chat Messaging API.
https://getstream.io/chat/sdk/flutter/
Other
924 stars 340 forks source link

Error: The parameter 'borderRadius' can't have a value of 'null' because of its type 'BorderRadius', but the implicit default value is 'null'. #1560

Closed talkbiz closed 1 year ago

talkbiz commented 1 year ago

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

iOS, Android

What version are you using?

stream_chat_flutter: ^6.1.0

What happened?

When I tried to build my project to an iPhone simulator, I ran into this error:

`Error (Xcode): ../../.pub-cache/hosted/pub.dev/stream_chat_flutter-6.1.0/lib/src/avatars/group_avatar.dart:61:36: Error: The argument type 'BorderRadius?' can't be assigned to the parameter type 'BorderRadiusGeometry' because 'BorderRadius?' is nullable and 'BorderRadiusGeometry' isn't.

Could not build the application for the simulator. Error launching application on iPhone 14 Pro Max.`

Steps to reproduce

Build iOS
...

Supporting info to reproduce

No response

Relevant log output

Error (Xcode): ../../.pub-cache/hosted/pub.dev/stream_chat_flutter-6.1.0/lib/src/avatars/group_avatar.dart:61:36: Error: The argument type 'BorderRadius?' can't be assigned to the parameter type 'BorderRadiusGeometry' because 'BorderRadius?' is nullable and 'BorderRadiusGeometry' isn't.

Could not build the application for the simulator.
Error launching application on iPhone 14 Pro Max.

Flutter analyze output

No response

Flutter doctor output

[✓] Flutter (Channel master, 3.11.0-10.0.pre.44, on macOS 12.6 21G115 darwin-x64, locale en-NG)
    • Flutter version 3.11.0-10.0.pre.44 on channel master at /Users/xxxxxxx/StudioProjects/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ab573048e7 (32 hours ago), 2023-05-20 11:32:26 -0400
    • Engine revision aac0919568
    • Dart version 3.1.0 (build 3.1.0-129.0.dev)
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/xxxxxxx/Library/Android/sdk
    • Platform android-33, build-tools 32.0.0
    • Java binary at: /Applications/Android Studio Preview.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Applications/Android Studio Preview.app/Contents
    • 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-8887301)

[✓] VS Code (version 1.74.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.60.0

[✓] Connected device (4 available)
    • SM G998B (mobile)          • R5CR20VTY6K                          • android-arm64  • Android 13 (API 33)
    • iPhone 14 Pro Max (mobile) • 44EC6460-004B-4DF9-917E-D59735DD0D00 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
    • macOS (desktop)            • macos                                • darwin-x64     • macOS 12.6 21G115 darwin-x64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 113.0.5672.126

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Code of Conduct

xsahil03x commented 1 year ago

Hey @talkbiz, I am not able to find this error. Can you try running it with the stable flutter channel?

talkbiz commented 1 year ago

Yes, sure, although I later tampered with your code to temporary fix it. Let me try and revert. Thanks

xsahil03x commented 1 year ago

Sure, feel free to re-open if it's an bug in the stable channel too.

mal33k-eden commented 1 year ago

Having same issue with the same setup mentioned above

mal33k-eden commented 1 year ago

worked after i updated my flutter channel to the stable channel

csandovalgt commented 1 year ago

When are you planning to update stream_chat_flutter to support this? seems like this is going to be implemented on stable channel soon @xsahil03x ?

xsahil03x commented 1 year ago

I will do it once it's released on stable.

totzk9 commented 1 year ago

Bumping this. Flutter just release 3.13.0

miguelfs commented 1 year ago

Hi, I'm also getting this error. Is there a workaround for handling it?

> flutter run

Launching lib/main.dart on iPhone 14 Pro Max in debug mode...
Running pod install...                                              3,7s
Running Xcode build...
Xcode build done.                                           43,4s
Failed to build iOS app
Error (Xcode): ../../../.pub-cache/hosted/pub.dev/stream_chat_flutter-6.1.0/lib/src/avatars/group_avatar.dart:61:36: Error: The argument type 'BorderRadius?' can't be
assigned to the parameter type 'BorderRadiusGeometry' because 'BorderRadius?' is nullable and 'BorderRadiusGeometry' isn't.

Could not build the application for the simulator.
Error launching application on iPhone 14 Pro Max.

> flutter doctor --verbose

❯ flutter doctor --verbose
[✓] Flutter (Channel stable, 3.13.0, on macOS 13.5 22G74 darwin-arm64, locale pt-BR)
    • Flutter version 3.13.0 on channel stable at /Users/miguel/Developer/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision efbf63d9c6 (6 days ago), 2023-08-15 21:05:06 -0500
    • Engine revision 1ac611c64e
    • Dart version 3.1.0
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/miguel/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A5219j
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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 17.0.6+0-17.0.6b829.9-10027231)

[✓] VS Code (version 1.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] Connected device (4 available)
    • iPhone Mini de Miguel (mobile) • 00008101-000B39C81EE3003A            • ios            • iOS 17.0 21A5312c
    • iPhone 14 Pro Max (mobile)     • C906B3F8-AA2E-4708-A7A6-9DD93D3DECB3 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
    • macOS (desktop)                • macos                                • darwin-arm64   • macOS 13.5 22G74 darwin-arm64
    • Chrome (web)                   • chrome                               • web-javascript • Google Chrome 116.0.5845.96

[✓] Network resources
    • All expected network resources are available.

• No issues found!

> flutter --version

Flutter 3.13.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision efbf63d9c6 (6 days ago) • 2023-08-15 21:05:06 -0500
Engine • revision 1ac611c64e
Tools • Dart 3.1.0 • DevTools 2.25.0
xsahil03x commented 1 year ago

Already released as part of v6.9.0

CodeAndShfra commented 1 year ago

I have the same problem , any solution note: my flutter channel is stable

natebgurutech commented 1 year ago

I have the same problem , any solution note: my flutter channel is stable

After trying to debug this for a while, my solution was to go back to the previous stable version, 3.10.6. Nothing in the patch notes for 3.13.0 was a game changer for my app. Seems prudent to just wait this one out.

xsahil03x commented 1 year ago

Already released as part of v6.9.0

Can you try updating to v6.9.0? @miguelfs @natebgurutech @CodeAndShfra

syeduzairdev commented 11 months ago

I have the same problem , any solution channel stable

Error (Xcode): ../../../../.pub-cache/hosted/pub.dev/stream_chat_flutter-6.5.0/lib/src/avatars/group_avatar.dart:69:36: Error: The argument type 'BorderRadius?' can't be assigned to the parameter type 'BorderRadiusGeometry' because 'BorderRadius?' is nullable and 'BorderRadiusGeometry' isn't. Could not build the application for the simulator. Error launching application on iPhone 15.

Flutter 3.13.3 • channel stable • https://github.com/flutter/flutter.git Framework • revision 2524052335 (8 weeks ago) • 2023-09-06 14:32:31 -0700 Engine • revision b8d35810e9 Tools • Dart 3.1.1 • DevTools 2.25.0