Skip to content

Instantly share code, notes, and snippets.

View definev's full-sized avatar
💙
Fluttering

Bui Dai Duong definev

💙
Fluttering
View GitHub Profile

This technical documentation outlines the engineering foundation of ZenClock. It focuses on the high-performance rendering of radial UI, a decoupled architecture using custom internal libraries, and a robust monetization layer.


1. Tech Stack

ZenClock is built to be lightweight, performant, and visually precise.

  • Framework: Flutter (Channel Stable)
  • Language: Dart 3.x (Utilizing records, patterns, and class modifiers)
@definev
definev / ZENCLOCK_MARKETING.md
Created February 12, 2026 07:34
ZENCLOCK_MARKETING.md

Product Proposal: ZenClock — Circle Reminder


1. Problem Statement

The "Scroll Fatigue" of Modern Productivity

Traditional digital calendars are designed as vertical lists or dense grids—a format inherited from 1980s office software. While efficient for data entry, this linear "endless scroll" creates significant psychological friction for the modern user:

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:zenrouter/zenrouter.dart';
import 'package:zenrouter_devtools/zenrouter_devtools.dart';
void main() {
runApp(const MainApp());
}
class MainApp extends StatelessWidget {
@definev
definev / redirect_main.dart
Created December 31, 2025 18:17
How to use redirect
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:zenrouter/zenrouter.dart';
final authState = ValueNotifier(true);
abstract class AppRoute extends RouteTarget with RouteUnique {}
typedef RedirectFunction =
@definev
definev / two_panel_layout.dart
Last active December 31, 2025 05:28
How to customize two panel layout in ZenRouter
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:zenrouter/zenrouter.dart';
// ==================== Base Route Classes ====================
abstract class AppRoute extends RouteTarget with RouteUnique {}
// ==================== Master-Detail Layout ====================
@definev
definev / tab_layout_example.dart
Last active December 29, 2025 10:58
Minimal example for tab layout
/// A minimal example demonstrating how to create a Tab-based navigation using ZenRouter.
///
/// Key concepts:
/// - [TabLayoutCoordinator]: Manages the routing state, specifically the [IndexedStackPath] for tabs.
/// - [TabLayout]: A [RouteLayout] that provides the UI structure (e.g., [BottomNavigationBar]) for its children.
/// - [IndexedStackPath]: Maintains the state of each tab, allowing for preservation of state when switching tabs.
///
/// To run this example:
/// 1. Fix imports if necessary.
/// 2. Run the `main()` function defined at the bottom of this file.
@definev
definev / main_restoration.dart
Last active December 24, 2025 11:24
An example to show how to enable Restoration in ZenRouter with only ONE line of code :-) (Require zenrouter v0.5.0)
import 'package:flutter/material.dart';
import 'package:zenrouter/zenrouter.dart';
abstract class AppRoute extends RouteTarget with RouteUnique {}
class Home extends AppRoute {
@override
Uri toUri() => Uri.parse('/');
@override
@definev
definev / two_panel_example.dart
Created December 23, 2025 02:10
How to build 2-panel layout and able to correct URL reflection
import 'package:flutter/material.dart';
import 'package:zenrouter/zenrouter.dart';
import 'package:zenrouter_devtools/zenrouter_devtools.dart';
void main() {
runApp(MainApp());
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@definev
definev / main.dart
Last active December 22, 2025 15:35
Initial loading splash screen in ZenRouter
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:zenrouter/zenrouter.dart';
import 'package:zenrouter_devtools/zenrouter_devtools.dart';
bool loggedIn = false;
bool loaded = false;
Future<bool> _authCheck() async {
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
import 'package:zenrouter/zenrouter.dart';
import '(auth)/_layout.dart';
import '(auth)/login.dart' deferred as auth_login;
import '(auth)/register.dart' deferred as auth_register;
import 'about.dart' deferred as about;
import 'index.dart' deferred as index;