Skip to content

OttomanDeveloper/andro_meda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌌 Chronos β€” A Journey Through the History of the Universe

Live Demo Flutter License: CC BY 4.0 PRs Welcome

Chronos is a scroll-driven, single-page experience that animates the entire history of the cosmos β€” from the Big Bang to the present day and beyond β€” across nine hand-painted eras, ending in a developer portfolio reveal. Every scene is drawn with Flutter CustomPainters and animated from a single ticker, so the whole journey is pure Dart with no image-based animation.

It's a showcase of what Flutter can do for rich, interactive, fully responsive storytelling on the web (and mobile, and desktop).

πŸ‘‰ Experience it live

πŸ’» Best viewed on a desktop browser β€” the cursor-driven parallax and hover-to-reveal moments need a mouse, and the wide scenes have room to breathe. It stays fully responsive on tablet and phone, just without the pointer effects.


🎬 A Flutter animation showcase

Everything in the timeline is drawn and moved in pure Dart. No GIFs, videos, Lottie files, or pre-rendered sprites, just Canvas calls running every frame.

  • More than 30 CustomPainters render every star, galaxy, planet, creature, and particle by hand.
  • One Ticker drives all of it. It feeds a single time value through a Provider, and only the on-screen era listens, so dozens of scenes hold 60fps without dozens of AnimationControllers.
  • Scroll is the timeline. Page position maps to progress through each era, so you scrub 13.8 billion years by scrolling.
  • Procedural, not keyframed. Flames flicker, galaxies wind, comets follow real conic-section orbits, and dinosaurs walk, all from math.

It is built to show how far Flutter's rendering and animation can go on the web.

✨ Features

  • Nine custom-painted eras β€” Big Bang β†’ Cosmic Dark Ages β†’ First Stars β†’ Galaxies β†’ Solar System β†’ Life Begins β†’ Age of Giants β†’ Rise of Humanity β†’ The Future, then a portfolio reveal.
  • Scroll is the timeline β€” your scroll position drives every animation and era transition; a tap-to-jump progress bar lets you skip around.
  • Hand-built scenes β€” supernovae, colliding galaxies, orbiting planets and rogue comets, single-celled life, fighting dinosaurs, an ice-age mammoth hunt, a forest sabertooth ambush, a campfire that grows into a city skyline.
  • Interactive moments β€” drag to spin galaxies, tap to ignite stars, tap (or hover) to reveal the dinosaur titans.
  • Fully responsive β€” purpose-built mobile, tablet, and desktop behavior with touch-first interactions and width-aware layouts.
  • Performant by design β€” one Ticker feeds a Provider; only the on-screen era subscribes to per-frame updates (visibility-gated via EraScope), and each era is wrapped in a RepaintBoundary.

πŸ› οΈ Tech Stack

Area Choice
Framework Flutter (Web, Android, iOS, desktop)
Language Dart
State provider β€” no setState, all state flows through ChangeNotifiers
Rendering CustomPainter / Canvas for every scene
Fonts google_fonts
Links url_launcher
CI / Deploy GitHub Actions β†’ GitHub Pages

πŸ—οΈ Architecture

The whole experience is one long SingleChildScrollView. Each era is a SizedBox that is twice the viewport tall, so scrolling reveals a tall scene a viewport at a time.

Ticker (JourneyPage)
  └─ AnimationProvider.time        // global clock, ticks every frame
ScrollController
  └─ ScrollProvider               // overall + per-era progress, current era
MouseRegion
  └─ CursorProvider               // pointer-driven parallax (desktop)

Each era:
  EraScope        // subscribes to time/cursor ONLY when its era is on-screen
    └─ EraWrapper // headline + description + background gradient + parallax
        └─ CustomPaint layers (StarField, Nebula, scene painters, InfoLabels…)

Key ideas worth reading the code for:

  • EraScope (lib/components/journey/era_scope.dart) β€” visibility gating. Only the active era (and its neighbors) rebuilds per frame, so 9 animated scenes don't all run at once.
  • EraWrapper (lib/components/journey/era_wrapper.dart) β€” shared title / description / entrance animation, with responsive scale factors.
  • InfoLabelPainter (lib/components/painters/info_label_painter.dart) β€” shared floating epoch annotations that flip inward on narrow screens.

πŸ“ Project Structure

Every CustomPainter lives in its own file under a painters/ folder; widget files never contain a painter.

lib/
β”œβ”€β”€ main.dart                   # App entry β€” providers + JourneyPage
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ hooks/hooks.dart        # Barrel export used across the app
β”‚   β”œβ”€β”€ provider/               # ScrollProvider, AnimationProvider, CursorProvider
β”‚   └── utils/                  # AppSettings, AppColors, AppText, Responsive
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ journey/
β”‚   β”‚   β”œβ”€β”€ journey_page.dart   # The scrolling journey scaffold
β”‚   β”‚   └── painters/           # CursorTrailPainter
β”‚   β”œβ”€β”€ eras/                   # One widget per era (the nine scenes)
β”‚   β”‚   └── painters/           # One painter per file, per era scene (22 of them)
β”‚   └── portfolio/              # Final developer reveal screen
β”œβ”€β”€ layouts/                    # Per-breakpoint layouts (mobile/tablet/desktop)
└── components/
    β”œβ”€β”€ journey/                # ProgressBar, EraWrapper, EraScope
    β”œβ”€β”€ interactive/
    β”‚   β”œβ”€β”€ *.dart              # StarIgniter, GalaxyRotator, CreatureRevealer
    β”‚   └── painters/           # Their painters (galaxy spiral, titan dust, …)
    └── painters/               # Shared, reusable painters (StarField, Nebula, …)

πŸš€ Getting Started

Prerequisites

  • Flutter SDK 3.27+ (Dart 3.12+)
  • A browser (Chrome recommended) for the web target

Run it

# 1. Clone
git clone https://github.com/OttomanDeveloper/andro_meda.git
cd andro_meda

# 2. Install dependencies
flutter pub get

# 3. Run on the web
flutter run -d chrome

On Flutter web, if CanvasKit fails to load from the CDN, run with flutter run -d chrome --no-web-resources-cdn to serve CanvasKit locally.

Other targets

flutter run                 # any connected device / emulator
flutter build web --release
flutter build apk --release

πŸ§ͺ Development

flutter analyze     # static analysis (must be clean)
dart format .       # formatting (CI checks this)
flutter test        # smoke tests

Please read CONTRIBUTING.md before opening a PR β€” it covers the project conventions (notably: state goes through Provider, never setState) and how scenes are built.

🀝 Contributing

Contributions are welcome! New eras, richer scenes, performance work, and accessibility improvements are all great places to start. See CONTRIBUTING.md to get started. Found a security issue? Please follow the Security Policy.

πŸ“„ License

Released under the Creative Commons Attribution 4.0 International License (CC BY 4.0). You're free to use, share, and adapt this work β€” even commercially β€” as long as you give appropriate credit to Muhammad Usman, link to the license, and indicate any changes.

πŸ‘€ Author

Muhammad Usman β€” Senior Flutter Developer

If this project helped or inspired you, please consider giving it a ⭐.

About

A scroll-driven journey through the history of the universe, told in nine hand-painted Flutter scenes. Pure Dart CustomPainter, no image assets.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors