Skip to content

OttomanDeveloper/piggyToken

Repository files navigation

PiggyToken - Flutter Web Showcase

Website Flutter Dart License

A showcase project demonstrating Flutter web compatibility and performance. Built as a crypto token landing page with scroll-triggered animations, glassmorphism UI, and responsive layouts — all using zero external animation packages.

PiggyToken Screenshot

Live Demo

https://ottomandeveloper.github.io/piggyToken/

Sections

Section Description
Hero Full-viewport header with cascading entrance animations, floating brand text, glassmorphism nav bar
Stats Bar Animated counters (Total Supply, Holders, Burned, Transactions) that count up on scroll
Token Info Tokenomics breakdown with 4 stat cards (Liquidity, Rewards, Marketing, Charity)
Features 6 feature cards with staggered scroll-triggered reveal (80ms delay per card)
Roadmap Vertical timeline with glowing nodes, gradient connectors, and phase cards
How to Buy 4-step guide with scale+fade entrance animation and dashed connectors
Team Member cards with hover glow, avatar ring animation, and role badges
FAQ Accordion with AnimatedSize expand/collapse and AnimatedRotation chevrons
Footer 3-column layout (desktop/tablet), stacked layout (mobile), animated link hovers

Flutter Web Techniques

Animations (all built-in, zero packages)

  • Scroll-triggered revealsAnimatedSection widget checks viewport position via centralized scroll observer, triggers AnimationController with fade + slide
  • Staggered entrances — cards delay by N * 80ms based on their index
  • Hero cascadeHeroEntrance widget plays once on mount with configurable delay (100ms to 1050ms stagger)
  • Animated countersTween<double> counting from 0 to target with easeOutCubic curve
  • Floating textsin(t * pi) * 5px oscillation on a 4-second AnimationController loop
  • FAQ accordionAnimatedSize + AnimatedRotation + AnimatedContainer for smooth expand/collapse
  • Hover effectsMouseRegion + AnimatedContainer / AnimatedDefaultTextStyle for smooth transitions

Performance

  • Frame-batched scroll processing — single ScrollController listener, dispatched once per frame via addPostFrameCallback
  • Centralized scroll observer — all animated widgets register with NavProvider instead of attaching individual listeners
  • RepaintBoundary — each section isolated to prevent full-page repaints
  • Image precaching — all raster assets decoded on startup via precacheImage
  • MediaQuery.sizeOf — rebuilds only on size changes, not on any MediaQuery property change
  • ClampingScrollPhysics — native web scroll feel without iOS bounce

Responsive Design

  • 3 breakpoints — mobile (< 650px), tablet (650-1099px), desktop (>= 1100px) via LayoutBuilder + Dart 3 switch expression
  • Desktop — glassmorphism floating nav bar with active section highlighting, side-by-side layouts
  • Tablet — backdrop-blur app bar, animated hamburger drawer with branding and Buy Now CTA
  • Mobile — centered app bar, stacked layouts, truncated contract address, vertical footer

Dart 3

  • abstract final class for all constant utility classes
  • Switch expressions in Responsive widget
  • Record types for drawer navigation items
  • sealed / final class modifiers where appropriate

Project Structure

lib/
  core/
    functions/    # URL launcher utility
    hooks/        # Barrel file (all exports)
    provider/     # NavProvider (scroll, section tracking)
    utils/        # AppColors, AppAsset, AppText, AppLinks, AppSettings, Responsive
  layouts/
    header/       # Desktop, tablet, mobile header layouts + ContractBar
  pages/
    header/       # Header (responsive switch)
    stats/        # Animated counter stats bar
    introToken/   # Token info + tokenomics cards
    features/     # Feature cards with staggered reveal
    roadmap/      # Timeline with phases
    how_to_buy/   # Step-by-step guide
    team/         # Team member cards
    faq/          # Expandable FAQ accordion
    bottom/       # Footer
    starterScreen/# Root page (scroll container + section composition)
  Widgets/
    header/       # NavButton, GlassNavBar, TabletNav, SocialIcons
    animated_section.dart  # ScrollReveal, AnimatedSection, HeroEntrance

Tech Stack

Layer Choice
Framework Flutter 3.44 (Web)
Language Dart 3.12
State Provider
Fonts Google Fonts (Russo One, Roboto)
SVG flutter_svg
Links url_launcher
Deployment GitHub Pages

Getting Started

Prerequisites

  • Flutter SDK 3.44+
  • Dart SDK 3.12+
  • Chrome

Run

git clone https://github.com/OttomanDeveloper/piggyToken.git
cd piggyToken
flutter pub get
flutter run -d chrome

Build for Production

flutter build web --release

Output is in build/web/.

License

MIT

About

Flutter Web showcase — crypto token landing page with scroll-triggered animations, glassmorphism UI, animated counters, FAQ accordion, and responsive layouts. Zero external animation packages. Built with Flutter 3.44 / Dart 3.12.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors