Skip to content

Gallery SliverAppBar Text better centered under iOS theme than Android. #9212

Closed

Description

@lubi888

Hi,

Seems to be TextAlign issue with SliverAppBar from home.dart in flutter_gallery example. The Android text is missing when the iOS theme is applied.

If i input 'title: new Text('Animate Slowly ----real slowly'), ' in line 173 of home.dart then it's enough to fill up the page width under the iOS theme but it's clearly not visible when under Android theme. The text is not centered and characters are missing.

I'm not sure if I could adjust this line with something like CenterAlign, whether it's related to FlexibleSpaceBar, or other theme files. I don't have an iphone to check.

Here are some shots with the theme changing the text alignment;

Android theme home page
flutter android home-screenshot from 2017-04-05 11-22-44

iOS theme home page
flutter ios home-screenshot from 2017-04-05 11-23-33

Android drawer theme selected
flutter androiddrawer-screenshot from 2017-04-05 11-29-44

iOS drawer theme selected
flutter ios home-screenshot from 2017-04-05 11-30-23

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Apr 5, 2017
  2. eseidelGoogle commented on Apr 5, 2017

    @eseidelGoogle
    Contributor

    @HansMuller might know.

  3. lubi888 commented on Apr 5, 2017

    @lubi888
    Author

    Sorry guys, the actual code i have;
    flexibleSpace: new FlexibleSpaceBar(
    title: new Text('Flut home SliverAppBar ---'), //main page banner bottom txt, doesn't wrap
    // TODO(abarth): Wire up to the parallax in a way that doesn't pop during hero transition.

    You can see from the photos that about 6 characters are missing.

    If you need any logs or outputs just let me know.

  4. davidamey commented on Aug 2, 2017

    @davidamey

    Ah, was about to raise a similar issue.
    It seems that, on Android, the title is always allowing for the potential of a menu button. At least that's my assumption. I don't have one and I'd like the space back!
    Lines 143-5 of flexible_space_bar.dart show a 72.0 which I believe is the space.

              padding: new EdgeInsets.only(
                left: effectiveCenterTitle ? 0.0 : 72.0,
                bottom: 16.0
              ),
    
  5. added
    c: contributor-productivityTeam-specific productivity, code health, technical debt.
    customer: galleryRelating to flutter/gallery repository. Please transfer non-framework issues there.
    on Dec 21, 2018
  6. added this to the milestone on Dec 21, 2018
  7. github-actions commented on Aug 17, 2021

    @github-actions

    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.

  8. locked as resolved and limited conversation to collaborators on Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: contributor-productivityTeam-specific productivity, code health, technical debt.customer: galleryRelating to flutter/gallery repository. Please transfer non-framework issues there.frameworkflutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packageswaiting for PR to land (fixed)A fix is in flight

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions