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.
https://ottomandeveloper.github.io/piggyToken/
| 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 |
- Scroll-triggered reveals —
AnimatedSectionwidget checks viewport position via centralized scroll observer, triggersAnimationControllerwith fade + slide - Staggered entrances — cards delay by
N * 80msbased on their index - Hero cascade —
HeroEntrancewidget plays once on mount with configurable delay (100ms to 1050ms stagger) - Animated counters —
Tween<double>counting from 0 to target witheaseOutCubiccurve - Floating text —
sin(t * pi) * 5pxoscillation on a 4-secondAnimationControllerloop - FAQ accordion —
AnimatedSize+AnimatedRotation+AnimatedContainerfor smooth expand/collapse - Hover effects —
MouseRegion+AnimatedContainer/AnimatedDefaultTextStylefor smooth transitions
- Frame-batched scroll processing — single
ScrollControllerlistener, dispatched once per frame viaaddPostFrameCallback - Centralized scroll observer — all animated widgets register with
NavProviderinstead 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 anyMediaQueryproperty changeClampingScrollPhysics— native web scroll feel without iOS bounce
- 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
abstract final classfor all constant utility classes- Switch expressions in
Responsivewidget - Record types for drawer navigation items
sealed/finalclass modifiers where appropriate
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
| 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 |
- Flutter SDK 3.44+
- Dart SDK 3.12+
- Chrome
git clone https://github.com/OttomanDeveloper/piggyToken.git
cd piggyToken
flutter pub get
flutter run -d chromeflutter build web --releaseOutput is in build/web/.
MIT
