Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrollable TabBar display bug in --release build #23339

Closed
Kapranov98 opened this issue Oct 20, 2018 · 7 comments
Closed

Scrollable TabBar display bug in --release build #23339

Kapranov98 opened this issue Oct 20, 2018 · 7 comments
Labels
a: fidelity Matching the OEM platforms better f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Comments

@Kapranov98
Copy link

Kapranov98 commented Oct 20, 2018

Hello. There is a problem with the display of the Scrollable TabBar in --release assemblies. I took the sample code from the official documentation, made 5 tabs and got the result as in the screenshot. The first tab is partially outside the left edge of the screen. There is no problem in the --debug build.

Code main.dart

Logs

Analyzing tabview_sample...

   info - Unused import: 'package:tabview_sample/main.dart' - test\widget_test.dart:11:8 - unused_import
  error - The constructor returns type 'dynamic' that isn't of expected type 'Widget' - test\widget_test.dart:16:29 -
         strong_mode_invalid_cast_new_expr
  error - Undefined class 'MyApp' - test\widget_test.dart:16:33 - undefined_class

3 issues found. (ran in 4.4s)
[√] Flutter (Channel master, v0.10.1-pre.108, on Microsoft Windows [Version 10.0.17763.104], locale ru-RU)
    • Flutter version 0.10.1-pre.108 at D:\Programs\flutter
    • Framework revision 8007e1bc2f (24 hours ago), 2018-10-19 14:18:47 -0700
    • Engine revision 2707b74338
    • Dart version 2.1.0-dev.7.1.flutter-b99bcfd309

[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at D:\Programs\Android_SDK
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = D:\Programs\Android_SDK
    • Java binary at: D:\Programs\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[√] Android Studio (version 3.2)
    • Android Studio at D:\Programs\Android Studio
    • Flutter plugin version 29.1.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[!] Connected device
    ! No devices available

Screenshot

screenshot_2018-10-21-00-45-04-320_com example tabviewsample

@zoechi zoechi added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. a: fidelity Matching the OEM platforms better labels Oct 23, 2018
@zoechi zoechi added this to the Goals milestone Oct 23, 2018
@jason-simmons
Copy link
Member

This is a race between the embedder providing the viewport dimensions and the TabBar widget calculating the scroll offset. The embedder may initially claim that the viewport has zero width/height, and if the TabBar framework code runs before the real values arrive then the resulting offset will be wrong. The framework does not appear to recalculate the offset when the viewport metrics are updated.

@HansMuller

@jelly-cai
Copy link

how to solve this problem

@kunkun12
Copy link

kunkun12 commented Jan 2, 2019

this problem also happed to me, not solved

@ghost
Copy link

ghost commented Jan 10, 2019

我碰到这个bug, 思考了两个多星期,通过qq群问人,有人通过 添加动画来 规避 这个bug。
我是通过添加 启动页 来规避这个bug的。 启动页项目参考:https://github.com/bowen919446264/demowelcome.git

@kunkun12
Copy link

upgrade newest flutter sdk ,It is solved

@HansMuller
Copy link
Contributor

Based on #23339 (comment) I'm going to close this issue. If there's still a problem, please reopen it.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: fidelity Matching the OEM platforms better f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

No branches or pull requests

6 participants