CopyFlutter

Flutter Helper Code — Copy-Paste Dart Utilities

Copy-paste production-ready Flutter & Dart helper files (app_colors.dart, app_sizes.dart, responsive_helper.dart, validators, formatters, and more). Zero external packages.

Flutter Helper Code Files (20)

  • app_colors.dart – Centralized semantic color palette for light and dark themes, surfaces, borders, status tones, and brand gradients.
  • app_sizes.dart – Consistent 4pt/8pt spacing scale, border radii, icon metrics, control heights, and reusable EdgeInsets tokens.
  • app_typography.dart – Scalable Material 3 typography hierarchy with crisp display, headline, body, label, and monospace code styles.
  • app_theme.dart – Complete Material 3 Light and Dark ThemeData builder with consistent buttons, cards, dividers, and input styling.
  • app_shadows.dart – Layered elevation shadows, floating modal drop shadows, and customizable soft accent glows for cards and buttons.
  • responsive_helper.dart – Breakpoint helpers, generic responsive value resolver, adaptive grid column calculator, and ResponsiveBuilder widget.
  • screen_utils.dart – Zero-package MediaQuery utility for viewport dimensions, safe-area insets, keyboard state, and safely clamped font scaling.
  • app_spacing.dart – Const vertical and horizontal gap widgets (`gapH4`..`gapH48`, `gapW4`..`gapW48`) and SliverGap for clean widget trees.
  • app_decorations.dart – Reusable studio BoxDecoration and InputDecoration factories for cards, hover states, glass panels, pills, and search fields.
  • app_animations.dart – Standardized motion durations, tactile easing curves, and smooth fade/slide page route builders.
  • app_validators.dart – Composable FormFieldValidator helpers for required fields, emails, strong passwords, phones, URLs, and numeric ranges.
  • date_formatter.dart – Zero-dependency date, 12h/24h time, relative time-ago, and duration countdown formatting helpers.
  • number_formatter.dart – Compact social counts (1.2K / 3.4M), comma-grouped integers, currency amounts, percentages, and readable byte sizes.
  • string_extensions.dart – Ergonomic String and nullable String extensions for casing, URL slugs, initials, email masking, truncation, and hex colors.
  • context_extensions.dart – Clean BuildContext shorthand getters for ThemeData, ColorScheme, TextTheme, MediaQuery sizes, focus dismissal, and navigation.
  • debouncer.dart – Memory-safe Debouncer for search inputs and Throttler to block duplicate button taps or rapid scroll API floods.
  • app_logger.dart – Structured debug-only console logger with severity tags, error stack traces, and async execution timing that auto-silences in release builds.
  • result.dart – Idiomatic Dart 3 sealed Result<T> (Success / Failure) with exhaustive pattern matching, mapping, and async guard wrapper.
  • app_snackbar.dart – Floating semantic toast/snackbar helper for success, error, warning, and info messages with automatic queue cleanup.
  • clipboard_helper.dart – Safe copy-to-clipboard and paste service with optional haptic feedback and defensive platform error handling.