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
877 stars 313 forks source link

Can't build flutter app on flutter SDK v3.22.2 and Dart v3.4.3 due to dependent package using deprecated textTheme property "bodyText1" #1959

Open IShark01 opened 1 week ago

IShark01 commented 1 week ago

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

iOS, Android

What version are you using?

v7.2.1

What happened?

Fails to build my flutter app

Steps to reproduce

1. Create flutter app on flutter SDK version >3.19.0 that depends on stream_chat_flutter v7.2.1

2. Run `flutter run`

Expected: App builds successfully

Actual: App build fails with the following build output:
pub.dev/audio_video_progress_bar-0.11.0/lib/audio_video_progress_bar.dart:259:61: Error: The getter 'bodyText1' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../flutter/flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'bodyText1'.
    final textStyle = timeLabelTextStyle ?? theme.textTheme.bodyText1;
                                                            ^^^^^^^^^

Supporting info to reproduce

https://docs.flutter.dev/release/breaking-changes/3-19-deprecations

No response

Relevant log output

pub.dev/audio_video_progress_bar-0.11.0/lib/audio_video_progress_bar.dart:259:61: Error: The getter 'bodyText1' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../flutter/flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'bodyText1'.
    final textStyle = timeLabelTextStyle ?? theme.textTheme.bodyText1;
                                                            ^^^^^^^^^

Flutter analyze output

No response

Flutter doctor output

No response

Code of Conduct

deven98 commented 1 week ago

We're working at the minute on upgrading the packages to support 3.22. We're just finalising a few things because we want to support the latest as well as the n-1th version of Flutter so I will give you more updates when we launch the releases.

tarunkhatri commented 1 day ago

hi @deven98 when are you planning to release i am stuck due to this issue.

deven98 commented 1 day ago

@tarunkhatri we have a PR already, doing some final test fixes before we push to pub.

tarunkhatri commented 1 day ago

@deven98 i have fixed that issue but now when i build ios app i am getting following error-

Semantic Issue (Xcode): Use of undeclared identifier 'PHAssetResourceTypePhotoProxy'; did you mean 'PHAssetResourceTypePhoto'? /Users/tarun/.pub-cache/hosted/pub.dev/photo_manager-3.2.0/ios/Classes/core/PHAssetResource+PM_COMMON.m:42:48

trevorFields commented 20 hours ago

I am also getting the : Error (Xcode): ../.pub-cache/hosted/pub.dev/audio_video_progress_bar-0.11.0/lib/audio_video_progress_bar.dart:259:61: Error: The getter 'bodyText1' isn't defined for the class 'TextTheme'.

is this fixed on the beta channel or should i wait for the fix on the stable thread? (this is for a production app)

aome07 commented 1 hour ago

Any update on this . The getter 'bodyText1' isn't defined for the class 'TextTheme' ? For me it is happening because of audio_video_progress_bar package it depends on. I tried the beta, but it's still there.