Skip to content

Conversation

@TahaTesser
Copy link
Member

@TahaTesser TahaTesser commented Jul 25, 2023

fixes TimePicker color and visual issues

Description

Code sample

expand to view the code sample
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(useMaterial3: true),
      home: const Example(),
    );
  }
}

class Example extends StatelessWidget {
  const Example({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Sample'),
      ),
      body: Center(
        child: ElevatedButton(
          onPressed: () {
            showTimePicker(
              context: context,
              orientation: Orientation.portrait,
              initialEntryMode: TimePickerEntryMode.input,
              initialTime: TimeOfDay.now(),
              builder: (BuildContext context, Widget? child) {
                return MediaQuery(
                  data: MediaQuery.of(context)
                      .copyWith(alwaysUse24HourFormat: true),
                  child: child!,
                );
              },
            );
          },
          child: const Text('Open Time Picker'),
        ),
      ),
    );
  }
}

Before

ezgif com-video-to-gif

After

ezgif com-video-to-gif (1)

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Jul 25, 2023
@TahaTesser TahaTesser requested a review from gspencergoog July 25, 2023 12:42
Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

Thanks! This may require some changes to the Google test golden files, but I'll look out for that.

@TahaTesser
Copy link
Member Author

Ping @gspencergoog

@gspencergoog
Copy link
Contributor

Sorry, @TahaTesser what did you need from me here? It seems like the Google test is still pending.

@TahaTesser
Copy link
Member Author

Sorry, @TahaTesser what did you need from me here? It seems like the Google test is still pending.

In case you need to check golden images, I didn't rebase. Let me try that.

@TahaTesser TahaTesser added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 28, 2023
@auto-submit auto-submit bot merged commit 7d89617 into flutter:master Jul 28, 2023
@TahaTesser TahaTesser deleted the time_picker_fixes branch July 28, 2023 14:11
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 28, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 28, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jul 28, 2023
flutter/flutter@dd9764e...e81907e

2023-07-28 [email protected] Update Chrome to 115, and remove `bringup: true` from skwasm benchmarks. (flutter/flutter#131430)
2023-07-28 [email protected] Fix `TimePicker` defaults for `hourMinuteTextStyle` and `dayPeriodTextColor` for Material 3 (flutter/flutter#131253)
2023-07-28 [email protected] Roll Flutter Engine from cfa5427dc452 to e97014c71014 (3 revisions) (flutter/flutter#131477)
2023-07-28 [email protected] Roll Flutter Engine from dc8618da9eb0 to cfa5427dc452 (3 revisions) (flutter/flutter#131464)
2023-07-28 [email protected] Roll Flutter Engine from b0d97ba45f46 to dc8618da9eb0 (3 revisions) (flutter/flutter#131460)
2023-07-28 [email protected] Updated integration_tests/platform_interaction test_step.dart (flutter/flutter#131301)
2023-07-28 [email protected] Roll Flutter Engine from 0713d91c2e64 to b0d97ba45f46 (1 revision) (flutter/flutter#131453)
2023-07-28 [email protected] Roll Flutter Engine from 01bb0a3ef922 to 0713d91c2e64 (2 revisions) (flutter/flutter#131451)
2023-07-28 [email protected] Roll Flutter Engine from 196474bd96b0 to 01bb0a3ef922 (3 revisions) (flutter/flutter#131447)
2023-07-27 [email protected] Roll Flutter Engine from 284771da323c to 196474bd96b0 (3 revisions) (flutter/flutter#131443)
2023-07-27 [email protected] [framework] clean up image provider documentation. (flutter/flutter#131416)
2023-07-27 [email protected] Fix template app documentation (flutter/flutter#131125)
2023-07-27 [email protected] Roll Flutter Engine from 9a935ecbf73a to 284771da323c (3 revisions) (flutter/flutter#131439)
2023-07-27 [email protected] â�¡ï¸� Add `ssh://[email protected]/flutter/flutter.git` as a standard remote (flutter/flutter#131333)
2023-07-27 [email protected] Roll Flutter Engine from f3317dbab388 to 9a935ecbf73a (1 revision) (flutter/flutter#131437)
2023-07-27 [email protected] ð��� Only format Dart files for `gen-l10n` (flutter/flutter#131232)
2023-07-27 [email protected] Roll Flutter Engine from 08050cdecf94 to f3317dbab388 (1 revision) (flutter/flutter#131432)
2023-07-27 [email protected] Preliminary PR for engine changes for Expanded/Collapsed Submenu button (flutter/flutter#131359)
2023-07-27 [email protected] Roll Flutter Engine from 9b14c382eebf to 08050cdecf94 (22 revisions) (flutter/flutter#131426)
2023-07-27 [email protected] Roll Packages from a99fc87 to f4ae933 (3 revisions) (flutter/flutter#131422)
2023-07-27 [email protected] Manual roll to engine commit 9b14c382 using Dart SDK version 3.2.x (flutter/flutter#131371)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
LouiseHsu pushed a commit to LouiseHsu/flutter that referenced this pull request Jul 31, 2023
…tColor` for Material 3 (flutter#131253)

fixes [`TimePicker` color and visual issues](flutter#127035)

## Description

- fixes default text style for `TimePicker`s  `hourMinuteTextStyle` and added a todo for flutter#131247
- fixes correct default color not being accessed for  `dayPeriodTextColor`
-  Updates tests

### Code sample

<details> 
<summary>expand to view the code sample</summary> 

```dart
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @OverRide
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(useMaterial3: true),
      home: const Example(),
    );
  }
}

class Example extends StatelessWidget {
  const Example({super.key});

  @OverRide
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Sample'),
      ),
      body: Center(
        child: ElevatedButton(
          onPressed: () {
            showTimePicker(
              context: context,
              orientation: Orientation.portrait,
              initialEntryMode: TimePickerEntryMode.input,
              initialTime: TimeOfDay.now(),
              builder: (BuildContext context, Widget? child) {
                return MediaQuery(
                  data: MediaQuery.of(context)
                      .copyWith(alwaysUse24HourFormat: true),
                  child: child!,
                );
              },
            );
          },
          child: const Text('Open Time Picker'),
        ),
      ),
    );
  }
}

``` 
	
</details>

### Before

![ezgif com-video-to-gif](https://github.com/flutter/flutter/assets/48603081/b791501f-aed3-44f3-8f75-70a1e28038c6)

### After

![ezgif com-video-to-gif (1)](https://github.com/flutter/flutter/assets/48603081/1bb32064-a9b1-416d-8290-7d22b0d4fdb9)
vashworth pushed a commit to vashworth/flutter that referenced this pull request Aug 2, 2023
…tColor` for Material 3 (flutter#131253)

fixes [`TimePicker` color and visual issues](flutter#127035)

## Description

- fixes default text style for `TimePicker`s  `hourMinuteTextStyle` and added a todo for flutter#131247
- fixes correct default color not being accessed for  `dayPeriodTextColor`
-  Updates tests

### Code sample

<details> 
<summary>expand to view the code sample</summary> 

```dart
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @OverRide
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(useMaterial3: true),
      home: const Example(),
    );
  }
}

class Example extends StatelessWidget {
  const Example({super.key});

  @OverRide
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Sample'),
      ),
      body: Center(
        child: ElevatedButton(
          onPressed: () {
            showTimePicker(
              context: context,
              orientation: Orientation.portrait,
              initialEntryMode: TimePickerEntryMode.input,
              initialTime: TimeOfDay.now(),
              builder: (BuildContext context, Widget? child) {
                return MediaQuery(
                  data: MediaQuery.of(context)
                      .copyWith(alwaysUse24HourFormat: true),
                  child: child!,
                );
              },
            );
          },
          child: const Text('Open Time Picker'),
        ),
      ),
    );
  }
}

``` 
	
</details>

### Before

![ezgif com-video-to-gif](https://github.com/flutter/flutter/assets/48603081/b791501f-aed3-44f3-8f75-70a1e28038c6)

### After

![ezgif com-video-to-gif (1)](https://github.com/flutter/flutter/assets/48603081/1bb32064-a9b1-416d-8290-7d22b0d4fdb9)
@TahaTesser TahaTesser mentioned this pull request Aug 3, 2023
8 tasks
auto-submit bot pushed a commit that referenced this pull request Aug 3, 2023
Fix issue reference for #131247 (it was added in the bug fix PR #131253)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TimePicker color and visual issues

2 participants