Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use time format based on system settings #1457

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dawidd6
Copy link

@dawidd6 dawidd6 commented Nov 3, 2024

Closes: #1289

Please make sure that your Pull Request meet the following acceptance criteria:

  • Code formatting and import sorting has been done with dart format lib/ test/ and dart run import_sorter:main --no-comments
  • The commit message uses the format of Conventional Commits
  • The commit message describes what has been changed, why it has been changed and how it has been changed
  • Every new feature or change of the design/GUI is linked to an approved design proposal in an issue
  • Every new feature in the app or the build system has a strategy how this will be tested and maintained from now on for every release, e.g. a volunteer who takes over maintainership

Pull Request has been tested on:

  • Android
  • iOS
  • Browser (Chromium based)
  • Browser (Firefox based)
  • Browser (WebKit based)
  • Desktop Linux
  • Desktop Windows
  • Desktop macOS

Comment on lines +31 to +32
MediaQuery.alwaysUse24HourFormatOf(context) ||
L10n.of(context).alwaysUse24HourFormat == 'true'

Choose a reason for hiding this comment

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

Looking at the documentation (https://api.flutter.dev/flutter/widgets/MediaQueryData/alwaysUse24HourFormat.html) this seems to need different behavior depending on the platform. On android MediaQuery.alwaysUse24HourFormatOf should fully dictate the decision, but on IOS it should only force it on when true but use L10n.of(context).alwaysUse24HourFormat when false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

24-hour time format
2 participants