flutter / flutter_clock

BSD 3-Clause "New" or "Revised" License
543 stars 328 forks source link

Confusion regarding 12/24 hour formats #62

Closed viconx98 closed 4 years ago

viconx98 commented 4 years ago

Hello to the Flutter team! I am really excited to take part in this challenge but I am confused about requirements.

The requirements restrict any kind of user interaction and at the same time accessibility is one of the judging criteria. Thus I assume it is important to implement support for both 12 and 24 hour formats, But how am I supposed to change the formats from 12 to 24 when the app is not allowed any kind of user interaction?

ptaranat commented 4 years ago

The flutter clock helper allows you to tap on the screen and a cog will appear on the top right. Then you can switch light/dark and other parameters. In your implementation of a clock, you cannot use an user interaction, but you can call variables from the helper clock.

What I managed to get working was use the dark and light themes to change text colors, with a ternary operation for example.

You can do the same with checking if the time format should be HH or hh.

jkurtw commented 4 years ago

Yes, correct answer. Thanks @ptaranat :-)