stream-chat-flutter icon indicating copy to clipboard operation
stream-chat-flutter copied to clipboard

../../../.pub-cache/hosted/pub.dev/stream_chat_flutter-5.3.0/lib/src/bottom_sheets/stream_channel_info_bottom_sheet.dart:322:1: Error: Expected 0 type arguments.

Open omkargavhane11 opened this issue 1 year ago • 5 comments

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

iOS, MacOS

What version are you using?

5.3.0

What happened?

Unable to make app build due to below error.

../../../.pub-cache/hosted/pub.dev/stream_chat_flutter-5.3.0/lib/src/bottom_sheets/stream_channel_info_bottom_sheet.dart:322:1: Error: Expected 0 type arguments.

Tried updating version upto 7.0.2 but error still persisted.

Steps to reproduce

1) Install the package
2) Use with in_app_purchase package 
3) run the project on xcode 15 or above

Supporting info to reproduce

No response

Relevant log output

No response

Flutter analyze output

No Issues

Flutter doctor output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

omkargavhane11 avatar Feb 25 '24 22:02 omkargavhane11

Happening on Flutter 3.19. (I had to downgrade to 3.16.9 because of this)

pixnbit avatar Feb 26 '24 04:02 pixnbit

If you want to made this running also in flutter 3.19 just edit the file in your local cache (in this case in ../../../.pub-cache/hosted/pub.dev/stream_chat_flutter-5.3.0/lib/src/bottom_sheets/stream_channel_info_bottom_sheet.dart) and remove all <T> from this lines:

https://github.com/GetStream/stream-chat-flutter/blob/2cf6d7fe53d51f92ddb78f777e5a9817e4d4644b/packages/stream_chat_flutter/lib/src/bottom_sheets/stream_channel_info_bottom_sheet.dart#L324-L355

after this change it will work again and your file should seems like:

PersistentBottomSheetController showChannelInfoBottomSheet({
  required BuildContext context,
  required Channel channel,
  Color? backgroundColor,
  double? elevation,
  BoxConstraints? constraints,
  AnimationController? transitionAnimationController,
  Clip? clipBehavior = Clip.hardEdge,
  ShapeBorder? shape = _kDefaultChannelInfoBottomSheetShape,
  void Function(Member)? onMemberTap,
  VoidCallback? onViewInfoTap,
  VoidCallback? onLeaveChannelTap,
  VoidCallback? onDeleteConversationTap,
  VoidCallback? onCancelTap,
}) =>
    showBottomSheet(
      context: context,
      backgroundColor: backgroundColor,
      elevation: elevation,
      shape: shape,
      clipBehavior: clipBehavior,
      constraints: constraints,
      transitionAnimationController: transitionAnimationController,
      builder: (BuildContext context) => StreamChannelInfoBottomSheet(
        channel: channel,
        onMemberTap: onMemberTap,
        onViewInfoTap: onViewInfoTap,
        onLeaveChannelTap: onLeaveChannelTap,
        onDeleteConversationTap: onDeleteConversationTap,
        onCancelTap: onCancelTap,
      ),
    );

dagyu avatar Feb 26 '24 13:02 dagyu

I faced the same problem.

Ignacio1110 avatar Mar 01 '24 04:03 Ignacio1110

This is also stopping me from upgrading to Flutter 3.19.2

justinschier avatar Mar 02 '24 05:03 justinschier

Hello everyone! Let me shed some light on this issue. The last 2 Flutter minor versions are introducing breaking changes:

  • 3.16.x uses material 3 by default, this breaks our golden tests and therefore our UI components are compromised. We are working on fixing them in our v8.0.0 beta version.
  • 3.19.x breaks the use of showBottomSheet, which is an easy fix, but doesn't really matter as in order to get to this version you will also have t use Material3. This fix is in PR for v8.0.0 beta version.

Unfortunately, for the above reasons we cannot "officially" support 3.19 in our stable version yet. I know it is frustrating, and we are working on stabilizing our beta version soon.

esarbanis avatar Mar 04 '24 10:03 esarbanis

This issue is stale because it has been open for 20 days with no activity.

github-actions[bot] avatar Mar 24 '24 12:03 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar Mar 31 '24 12:03 github-actions[bot]