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
908 stars 334 forks source link

StreamChannelHeader with title and subtitle causes overflow when higher text scale is used #1982

Closed Jonny1987 closed 4 days ago

Jonny1987 commented 2 months ago

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

Android

What version are you using?

7.1.0 flutter: 3.22.0

What happened?

Overflow error: A RenderFlex overflowed by 1.00 pixels on the bottom.

Steps to reproduce

Create a Widget which returns a Scaffold with a StreamChannelHeader for the appBar which contains both title and subtitle, and then increase the font size in phone settings:

    return Scaffold(
      appBar: StreamChannelHeader(
        onImageTap: () =>
            context.pushNamed(AppRoute.chatMembers.name, extra: widget.channel),
        title: Text(
          widget.channel.name!,
          style: Theme.of(context).textTheme.bodyLarge!.copyWith(
                fontWeight: FontWeight.bold,
              ),
        ),
        subtitle: Text(
          dateString,
          style: const TextStyle(
            fontSize: 14,
          ),
        ),
      ),
      body: ...
    ),
  );

### Supporting info to reproduce

_No response_

### Relevant log output

_No response_

### Flutter analyze output

```shell
No issues found!

Flutter doctor output

[✓] Flutter (Channel stable, 3.22.0, on Ubuntu 22.04.4 LTS 6.5.0-41-generic, locale en_US.UTF-8)
    • Flutter version 3.22.0 on channel stable at /home/john/dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5dcb86f68f (9 weeks ago), 2024-05-09 07:39:20 -0500
    • Engine revision f6344b75dc
    • Dart version 3.4.0
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/john/Android/Sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /opt/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11609105)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 14.0.0-1ubuntu1.1
    • cmake version 3.22.1
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[✓] Android Studio (version 2024.1)
    • Android Studio at /opt/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 17.0.10+0-17.0.10b1087.21-11609105)

[✓] VS Code (version 1.90.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.92.0

[✓] Connected device (3 available)
    • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 14 (API 34) (emulator)
    • Linux (desktop)              • linux         • linux-x64      • Ubuntu 22.04.4 LTS 6.5.0-41-generic
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 125.0.6422.141

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

• No issues found!

Code of Conduct

github-actions[bot] commented 1 month ago

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

Jonny1987 commented 1 month ago

Can anyone look into this or suggest a workaround?

Jonny1987 commented 1 month ago

bump

github-actions[bot] commented 1 week ago

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

github-actions[bot] commented 4 days ago

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

Jonny1987 commented 4 days ago

Can anyone look at this? It's common for users to increase the text scale on their device and this causes an overflow error when they do so