oh_my_flutter 0.6.1
oh_my_flutter: ^0.6.1 copied to clipboard
Empower Flutter with utilities that make development 10x faster.
oh_my_flutter #
Small, strongly typed utilities for common Flutter application tasks.
Installation #
Add the latest compatible release from pub.dev:
flutter pub add oh_my_flutter
Or add it directly to your pubspec.yaml:
dependencies:
oh_my_flutter: ^0.6.0
Import the public library wherever you need it:
import 'package:oh_my_flutter/oh_my_flutter.dart';
Quick start #
Extensions make common transformations concise while preserving Flutter and Dart types:
import 'package:flutter/material.dart';
import 'package:oh_my_flutter/oh_my_flutter.dart';
final accent = const Color(0xFFFF4A4B);
final lighterAccent = accent.lighten(0.12);
final hex = lighterAccent.toHex();
final oklch = lighterAccent.toOklch();
Extensions #
DateTime relative time #
DateTime.timeAgo maps elapsed time to application-owned callbacks, so callers
control localization and the result type.
Color transformations #
ColorExtension lightens, darkens, converts Flutter colors to hexadecimal, and
starts OKLCH conversion.
OKLCH colors #
Oklch provides perceptually uniform lightness, chroma, and hue values with
conversion to and from Flutter colors.
Velocity classification #
VelocityExtension classifies directional swipe velocity while leaving
distance, progress, and interaction policy to the application.
Widgets #
ControlledVisibility #
ControlledVisibility lets parent-owned state show or hide a child with
optional directional transitions and optional unmounting.
Morph #
Morph animates matching widgets between layouts and routes, selecting a
specialized transition for supported content and a generic transition for
other widgets.
Motion #
Motion applies reusable one-shot or looping effects, including shakes, to any
widget with configurable startup and controller-driven playback.
TextMotion #
TextMotion applies the same motion effects to each visible grapheme in short
display text with configurable startup and controller-driven playback.
Marquee #
Marquee repeatedly moves an ordered strip through a clipped viewport, with
gapless or single-strip cycle layouts.
PauseAnimations #
PauseAnimations temporarily mutes ticker callbacks for a widget subtree.
Sequence #
Sequence presents one child at a time with controller-owned navigation and
optional directional transitions.
RouteSettled #
RouteSettled shows route chrome or controls only while the enclosing route is
settled and no navigator gesture is active.
Networking #
Offline Dio errors #
OfflineErrorDioInterceptor turns conservatively classified offline Dio
failures into a typed error that callers can detect without repeating
connectivity probes.
Utilities #
Telephony #
Telephony sanitizes an international phone number and asks the platform to
start a call.
WhatsApp #
Whatsapp opens a chat with an optional message through the native application
or web fallback.
Documentation #
- Run the complete public-API example.
- Read the generated API reference for exhaustive contracts and defaults.
Scope #
oh_my_flutter provides portable utility APIs. It intentionally does not own
application state, routing, localization, design components, or
application-specific domain logic.