Repository: flutter
Issue: Can't handle width inside an appBar of a Scaffold
Labels: framework,f: material design,d: api docs,team-design,triaged-design

Hello,

i can't manage to handle width of any child of an appBar ( on web or mobile ) and i was wondering if this is something considered a bug or part of Material UI ? 

Thanks a lot

## Steps to Reproduce

1. Run `flutter create appbar_width `.
2. Update the files as follows: 

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Testing appbar width',
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final desiredWidth = 200.0;
    return Scaffold(
      appBar: PreferredSize(
        preferredSize: Size(desiredWidth, 80),
        child: AppBar(
          flexibleSpace: Container(
            width: desiredWidth,
            height: 80,
            color: Colors.red,
          ),
          title: Text('Testing appbar width'),
        ),
      ),
      body: Center(
        child: Text(
          'What a great app',
        ),
      ), 
    );
  }
}
```

3. Run your app

**Expected results:**
A red container of width 200

**Actual results:** <!-- what did you see? -->
A red container of screen width

```
flutter analyze
Analyzing appbar_width...
No issues found! (ran in 1.6s)
```


```
flutter doctor -v
[✓] Flutter (Channel master, v1.18.0-6.0.pre.4, on Mac OS X 10.15.3 19D76, locale fr-FR)
    • Flutter version 1.18.0-6.0.pre.4 at /Users/jocelynkerouanton/Dev/flutter
    • Framework revision fe41c9726a (34 hours ago), 2020-04-13 06:45:02 -0400
    • Engine revision 521c1d4431
    • Dart version 2.8.0 (build 2.8.0-dev.20.0 c9710e5059)


[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/jocelynkerouanton/Library/Android/sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Users/jocelynkerouanton/Library/Application
      Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.6010548/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.4, Build version 11E146
    • CocoaPods version 1.8.4

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.5)
    • Android Studio at /Users/jocelynkerouanton/Library/Application
      Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.6010548/Android
      Studio.app/Contents
    • Flutter plugin version 42.1.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[!] VS Code (version 1.41.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
    • Chrome     • chrome     • web-javascript • Google Chrome 81.0.4044.92
    • Web Server • web-server • web-javascript • Flutter Tools

! Doctor found issues in 1 category.
```