Skip to content

[web][linux] Material App title is aligned to left  #67932

@nturgut

Description

@nturgut

For a material app, the title is not centered. It is aligned to the left of the page. Example:

BXz4X84nzojnSZr

When running the same Flutter Web application on macOS, the title is centered. The problem observed in Linux:

  1. Modes used for testing: debug, profile, release
  2. Tested browsers: chrome, firefox.

flutter doctor -v

[✓] Flutter (Channel master, 1.23.0-8.0.pre.269, on Linux, locale en_US.UTF-8)
    • Flutter version 1.23.0-8.0.pre.269 at /usr/local/google/home/nurhan/development/engine/src/flutter/.dart_tool/flutter
    • Framework revision 759ddb1ccd (3 days ago), 2020-10-09 22:28:25 +0200
    • Engine revision 36769af310
    • Dart version 2.11.0 (build 2.11.0-203.0.dev)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /usr/local/google/home/nurhan/Android/Sdk/
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = /usr/local/google/home/nurhan/Android/Sdk/
    • Java binary at: /usr/local/google/home/nurhan/code/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

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

[✓] Android Studio (version 3.5)
    • Android Studio at /usr/local/google/home/nurhan/code/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 1.8.0_202-release-1483-b49-5587405)

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

[✓] Connected device (2 available)
    • Web Server (web) • web-server • web-javascript • Flutter Tools
    • Chrome (web)     • chrome     • web-javascript • Google Chrome 86.0.4240.75

Steps to Reproduce

The problem can also be produced using the app in the tests.
Minimum example code block to produce:

// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      key: const Key('mainapp'),
      title: 'Integration Test App',
      home: MyHomePage(title: 'Integration Test App'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  String infoText = 'no-enter';

  // Controller with no inital value;
  final TextEditingController _emptyController = TextEditingController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'Text Editing Test 1',
            ),
            TextFormField(
              key: const Key('empty-input'),
              enabled: true,
              controller: _emptyController,
              decoration: const InputDecoration(
                labelText: 'Empty Input Field:',
              ),
            ),
          ],
        ),
      ),
    );
  }
}

Logs

No error is observed on the logs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listf: material designflutter/packages/flutter/material repository.found in release: 3.3Found to occur in 3.3found in release: 3.7Found to occur in 3.7frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-linuxBuilding on or for Linux specificallyteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions