creativecreatorormaybenot's entry to the Flutter Clock challenge.

Overview

clock demo article video Twitter

creativecreatorormaybenot's playful entry to the Flutter clock challenge (is it weird to say it like that?).
This is a clock display that uses exclusively the Flutter Canvas to draw everything you see on screen. That means that there are no assets, no plugins, and not even prebuilt widgets used, i.e. every RenderObject in the tree is custom made by me.

Quick screen capture showing the final result of the submission

The code entry point for the clock face is canvas_clock/lib/main.dart .

Notes

I was inspired by the design of an old analog barometer and hygrometer kind of device initially and took many design ideas away from that. Later on, many other inspirations came my way :)

You can follow my whole process of building the clock face in this repository, i.e. every bit of it. Maybe it helps someone :)
Additionally, I wrote a whole article about the technical implementation of my submission. You can read it here.

Web version

  • You can view the clock face running on Flutter web here.

  • 2021 note: this is still the build from Feb 2020, using the Flutter web beta version from Feb 2020. Expect it to not run as well as today's Flutter web apps.

  • Notice: some features are not supported on web, e.g. some of the weather icon animations because trimming paths does not yet work in Flutter web. Same goes for some of the shaders, which are also still unimplemented. The sections in code have documentation or comments that link to Flutter GitHub issues discussing these problems.

  • Apart from unsupported features, the web version looks slightly different in general because some features of the framework are currently implemented differently in Flutter web. Ironically, the radial gradients look so much sweeter - you should really see the vibrant dark palette running on Flutter web!

Implementation

  • No plugins were used at all (check pubspec.yaml ). No premade widgets from the framework were used in my own code, i.e. every RenderObject in the tree of the clock was custom created by me.

  • Accessibility was implemented customly and it had to because I did not use any prebuilt widgets that come with Semantics implementations. Instead I overrode RenderObject.describeSemanticsConfiguration for every component with semantic relevancy.

  • Last but not least, no assets were used - I think you also get it now (: I wanted to stress it to show what Flutter is capable of.

I did not go with the raw layer (here is an old demonstration of the Flutter raw layer I did) nor the rendering layer exclusively.
This was not compatible with the ClockCustomizer and is also not convenient for working with data at all. The Flutter trees are pretty neat, so we should use them (they make the app reactive) :)

Hand bouncing

For the animation of the second hand (and minute hand) bouncing of the analog clock, I enjoyed looking at this slow motion capture of a watch (the important part is blurry (:, yes).

Custom fonts

You can view the custom-fonts branch for a version of the clock face with fonts that better match the rest of the design. Watch a demo of this (note: this is not part of the design submitted to the Flutter Clock challenge).

The code

If you want to build the app yourself, make sure to run flutter create . in canvas_clock before flutter run in order to generate required directories first. Note that the repo size is ~100 MB due to the screen-captures and gh-pages branches. You can download as ZIP, which will only contain the master branch without any commits saving a lot of space. If you want to navigate through my process, however, you will need to clone the repo.

Understanding the code

As this is a complex project, it will probably be difficult for you to get into the code and understand the structure and reasoning for the parts. This was also the case for HaMMeReD on Reddit. Thanks to them, I have written this extensive elaboration on the structure and logic behind the project. Reading it should give you a good idea of how to navigate the repository and why I chose to do certain things.

Mistakes in code

Trying to fix some issues, trying to optimize, or just by being human in general, I introduced some bad practices and mistakes into the code on accident that I noticed now after the challenge period has ended.
I will not fix these issues to keep the code how it was when I submitted it - just note that there are things I did not intend to write the way they are and I would have normally fixed :)

Gallery

See the clock display in all of its glory and some other captures of it below.

Screenshot of the vibrant light palette

Screenshot of the vibrant dark palette

Capture of the assembly of two single frames with vibrant palettes from Skia debugger

Screenshot of the vibrant dark palette with the ball in the air

Screenshot of the subtle light palette

Screenshot of the subtle dark palette

Capture of the assembly of two single frames with subtle palettes from Skia debugger

Screen capture of the clock face with baseline debug paint enabled

Screen capture of the clock face showing semantics

Screen capture of the clock face with the repaint rainbow enabled

Gratitude

Thanks to Pants for being awesome and patiently giving me some design feedback, to the Flutter team for creating this challenge and the framework, actively working with the open source community, and providing awesome content like the Flutter Interact sessions, to everyone who shared Flutter Clock progress, which inspired me and helped to keep me motivated, and to all other creators of resources I linked to in the TODO section (in this README.md file) throughout the development of this entry.

You might also like...

Binary clock - Flutter binary clock with Dark mode support

Binary clock - Flutter binary clock with Dark mode support

Binary Clock This is a binary clock created using Flutter containing both Light and Dark modes Getting Started This project is a starting point for a

Dec 31, 2019

Clock loader - Highly versatile Widget display the smooth and creative loader named as clock loader

Clock loader - Highly versatile Widget display the smooth and creative loader named as clock loader

Clock Loader Highly versatile Widget display the smooth and creative loader name

Dec 30, 2022

My participation on the Flutter Clock Challenge of 2020 with Francisco Frutuoso design

My participation on the Flutter Clock Challenge of 2020 with Francisco Frutuoso design

Cloom Clock ๐ŸŒŸ "Visual Beauty Winner" of the 2020 Clock Challenge, announcement post ๐Ÿ”– You can read our blog post describing the process here How to

Dec 26, 2022

Humanbeans Flutter Clock Challenge Submission

Humanbeans Flutter Clock Challenge Submission

Eventually Humanbeans Flutter Clock Challenge Submission by Milen Trendafilov (design, concept) and Boris Brestnichki (development) Concept: Bird visi

Nov 24, 2022

Iso Clock - Flutter Challenge

 Iso Clock - Flutter Challenge

Iso Clock - Flutter Challenge This is my take on a classic digital clock look with a modern 3D "flat" design and playful animations. I come from a web

Oct 22, 2022

Scenery-FlutterClock - This is a Scenery Clock prepared for #FlutterClock challenge.

Scenery-FlutterClock - This is a Scenery Clock prepared for #FlutterClock challenge.

Flutter Clock This is a Scenery Clock prepared for #FlutterClock challenge. See flutter.dev/clock to know more about the dev challenge. Scenery Clock

Nov 23, 2022

Challenge cannabis - Challenge for Slicing UI Cannabis from FLutter Fan Indonesia

Challenge cannabis - Challenge for Slicing UI Cannabis from FLutter Fan Indonesia

challenge_cannabis Challenge buat Slicing UI Cannabis dari om Kipas Angin FLutte

May 11, 2022

A Flutter clock face with moving bars

A Flutter clock face with moving bars

BarBar Clock | Web demo ๐Ÿ† Listed in Honorable Mentions at flutter.dev/clock ๐Ÿ† Clock face for the Flutter Clock Challenge. This clock face shows time

Jun 29, 2022

A clock made in Flutter for smart clocks, with a cute snake that follows you all day long.

A clock made in Flutter for smart clocks, with a cute snake that follows you all day long.

Snake Clock This is an original and fun clock face where a snake lives its day along yours. Itโ€™s my first ever Flutter app! I built it for the Flutter

Nov 7, 2022
Comments
  • Flutter lots of issues

    Flutter lots of issues

    I am so new in programming but I don't get it, why I am getting things like that ? I can't even run the preset flutter in emulator. I am too bored from that...

    I tried to write flutter create . to console. And I didn't watch any lesson videos from anywhere because I just wanted to see the preset works on emulator. But I couldn't see that... :/

    help

    question 
    opened by PeacErtemli 3
  • Why do I have to do flutter create . to build?

    Why do I have to do flutter create . to build?

    Just wondering why it's not simple to build and run?

    I had to run flutter create .

    Got this error: AndroidManifest.xml could not be found. Please check /home/steve/google/clock/canvas_clock/android/AndroidManifest.xml for errors. No application found for TargetPlatform.android_x64. Is your project missing an android/AndroidManifest.xml? Consider running "flutter create ." to create one.

    question 
    opened by sgehrman 2
This is my entry for the Flutter Clock Face Contest.

Star Clock This is my entry for the Flutter Clock Face Contest. Build instructions below. TLRD: Clone with --recurse-submodules Here's a small demo vi

Philipp Bauer 47 Oct 22, 2022
The Grand Prize-winning entry of the #FlutterClock challenge.

Flutter Particle Clock For my entry in the Flutter Clock Challenge I wanted to build something colorful, animated and playful that changes appearance

Mickel 888 Dec 31, 2022
Google's Flutter Clock Challenge Novelty ๐Ÿš€ of Idea Award ๐Ÿ† winner (https://flutter.dev/clock)

Sunset Reflections Clock My submission to the Flutter Clock Challenge, winner of the Novelty of Idea award: a cold cathode display clock (aka nixie cl

Vรญctor Morilla 52 Dec 26, 2022
Clock for the Flutter clock challenge

Agent clock A visualization of a clock using simple agents and physics. Description The digits of the clock are basically letters or svg paths. These

null 12 Jun 29, 2022
A clock created for the Flutter Clock challenge which achieved an honourable mention.

Circle Clock A clock created for the Flutter Clock challenge. Shaded circles representing hour, minute and second hands move across the screen, while

Max 11 Apr 18, 2022
Conic Clock for Flutter Clock challenge

Conic Clock Conic Clock is a dynamic clock written in Flutter. It is a project by me (ZHENG HAOTIAN / Justin Fincher) for the Flutter Clock challenge.

JustZht 61 Dec 30, 2022
Flutter-Clock - Flutter Clock Contest Submission

Flutter-Clock Build a beautiful clock face UI with Flutter for the Lenovo Smart Clock for a chance to win an iMac Pro, Lenovo Smart Display, or Lenovo

Piyush Sinha 1 Oct 5, 2020
Scaffolding code for the clock in the Flutter Clock contest

Flutter Clock Helper This package provides scaffolding code for the clock in the Flutter Clock contest. Contestants: Do not edit this code. Model Prov

Abdullah waheed 0 Nov 17, 2021
Dots Clock is a digital clock written in Flutter, Dart

Dots Clock Dots Clock is a digital clock written in Flutter, Dart. It was developed for the Flutter Clock challenge. Table of Contents Clock Variation

Kain 32 Oct 16, 2022
Google's & Lenovo awarded Steampunk clock (Flutter Clock contest) ๐Ÿ†

?? english ฤeskรฝ ั€ัƒััะบะธะน Steampunk Clock for Flutter Clock contest ??๏ธ This project is one of the winning submissions in Google's & Lenovo dev/design

Roman Cinis 17 Dec 26, 2022