Skip to content

fabrik_utils

pub.dev

fabrik_utils is a lightweight, real-world-first utility package for Flutter apps.
It includes essential extensions, helpers, and utilities used across real products — crafted to improve DX and save development time.


  • 🗓 DateTime extensions (isToday, timeAgo, weekdayName, etc.)
  • 🔠 String casing helpers (camelCase, PascalCase, titleCase, etc.)
  • 🧼 String validation and formatting (isNullOrBlank, capitalizeFirst)
  • ⏱ Duration formatting and splitting
  • 🔁 Debounce & Throttle classes with status stream support
  • 🔽 Scroll helpers (isApproachingScrollEnd)
  • 🔢 Tuple-style time splitting for seconds

Add the package to your pubspec.yaml:

dependencies:
fabrik_utils: ^0.1.0

Then run:

Terminal window
flutter pub get

Import it in your Dart files:

import 'package:fabrik_utils/fabrik_utils.dart';

// "Hello World"
'hello world'.titleCase
// "fabrikUtils"
'FABRIK Utils'.camelCase
// "this_is_a_test"
'this is a test'.snakeCase
// "text-case"
'TextCase'.kebabCase
// true
DateTime.now().isToday
// "just now"
DateTime.now().timeAgo
// "September 7, 2025 2:30 PM"
someDate.fullDateTime
// "01:01:05"
formatDuration(Duration(seconds: 3665))
// (hours: "01", minutes: "01", seconds: "05")
splitDuration(3665)
final throttle = Throttle<void>(duration: Duration(seconds: 1));
throttle(() => print('Only once per second'));
final debounce = Debounce<void>(duration: Duration(milliseconds: 300));
debounce(() => print('Triggered after pause'));
isApproachingScrollEnd(scrollController)