Skip to content

The title of license detail page isn't visible depending on the Theme configuration #63239

@mono0926

Description

@mono0926

I commented at https://github.com/flutter/flutter/pull/57588/files#r466115828 first, and it seems the problem of framework, so I've created an issue.

Steps to Reproduce

  1. Run flutter create bug.
  2. Update the main files as follows:
import 'package:flutter/material.dart';

void main() => runApp(const App());

class App extends StatelessWidget {
  const App({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: const HomePage(),
      theme: ThemeData(
        // A
        primaryColor: Colors.blue,
        // B
        appBarTheme: const AppBarTheme(
          color: Colors.white,
          iconTheme: IconThemeData(
            color: Colors.black,
          ),
          textTheme: TextTheme(
            headline6: TextStyle(
              fontSize: 20,
              color: Colors.black,
            ),
          ),
        ),
      ),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({Key key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Example'),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          showLicensePage(context: context);
        },
      ),
    );
  }
}
  1. Tap FAB and tap a license on the Licenses page.

Expected results:

The title on the AppBar is visible.

Actual results:

The title on the AppBar isn't visible because the color of AppBar and the color of title is same.

list(OK) detail(NG)
Screenshot_1596840404 Screenshot_1596840407

https://github.com/TonicArtos/flutter/blob/cfc0082db7e4cb1ec9da9cbf29fb7ecc5788ca13/packages/flutter/lib/src/material/about.dart#L918 seems to break the color system.

If // A is changed to Colors.yellow(light color), the title is changed to be visible.

list(OK) detail(OK)
Screenshot_1596840554 Screenshot_1596840556

If // B is commented out, the title is changed to be visible.

list(OK) detail(OK)
Screenshot_1596840608 Screenshot_1596840610
Logs
[ +407 ms] DevFS: Sync finished
[        ] Syncing files to device sdk gphone x86... (completed in 491ms)
[        ] Synced 1.4MB.
[        ] <- accept
[   +4 ms] Connected to _flutterView/0xf05c5380.
[   +1 ms] Flutter run key commands.
[   +1 ms] r Hot reload. 🔥🔥🔥
[        ] R Hot restart.
[        ] h Repeat this help message.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] An Observatory debugger and profiler on sdk gphone x86 is available at: http://127.0.0.1:58483/bneNrZDZA7k=/

Analyzing flutter_playground...                                         
No issues found! (ran in 2.8s)
[✓] Flutter (Channel dev, 1.21.0-1.0.pre, on macOS 11.0 20A5343i, locale en-JP)
    • Flutter version 1.21.0-1.0.pre at /Volumes/Macintosh HD/Users/mono/Git/flutter
    • Framework revision f25bd9c55c (3 weeks ago), 2020-07-14 20:26:01 -0400
    • Engine revision 99c2b3a245
    • Dart version 2.9.0 (build 2.9.0-21.0.dev 20bf2fcf56)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/mono/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
    • Xcode at /Applications/Xcode-beta.app/Contents/Developer
    • Xcode 12.0, Build version 12A8179i
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 48.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.47.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.13.2

[✓] Connected device (4 available)
    • sdk gphone x86 (mobile) • emulator-5554                        • android-x86    • Android 11 (API 30) (emulator)
    • iPhone 11 Pro (mobile)  • 9FAEBEFB-D9ED-44D5-A1CB-E75CBFD41E69 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)
    • Web Server (web)        • web-server                           • web-javascript • Flutter Tools
    • Chrome (web)            • chrome                               • web-javascript • Google Chrome 84.0.4147.105

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    f: material designflutter/packages/flutter/material repository.found in release: 1.21Found to occur in 1.21frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions