oh_my_flutter library
Focused, strongly typed utilities for Flutter applications.
Import this library to use every public utility:
import 'package:oh_my_flutter/oh_my_flutter.dart';
Classes
- ControlledVisibility
- A controller-driven wrapper that shows or hides child.
-
Debouncer<
T> - Delays a value-producing callback until calls have stopped for delay.
- Device
- Groups device utilities behind one injectable entry point.
- DeviceDisplay
- Provides information about and interaction with the device display.
- DeviceLocation
- Manages foreground location permission and retrieves device location data.
- DeviceLocationAddress
- Describes a device-formatted address for geographic coordinates.
- DeviceLocationCoordinates
- Describes geographic coordinates reported by the device.
- FadeInMotionEffect
- Fades a child from transparent to fully opaque.
- FloatingMotionEffect
- Moves a child gently above and below its layout position.
- InteractiveSwipeDismiss
- Lets a user drag any child away to request its dismissal.
- InteractiveSwipeDismissDragConfig
- Configures how pointer travel moves and dismisses an InteractiveSwipeDismiss child.
- InteractiveSwipeDismissHandle
- Makes the wrapped area a drag handle for InteractiveSwipeDismiss.
- Marquee
- Continuously moves an ordered strip of widgets across a clipped viewport.
- MaybeSafeArea
- Keeps a compact child away from device cutouts and system UI, but only when the child reaches an unsafe edge.
- MaybeSafeAreaHandle
- Read the space occupied by safe-area-adjusted content from another renderer.
- Morph
- Animates a widget between two matching locations.
- MorphDescendant
- Configures how child participates in its nearest ancestor Morph.
-
MorphEndpoint<
T> - Describes how a shared element looks at one end of a MorphFlight.
- MorphEndpointContext
- Information available when describing one end of a Morph transition.
-
MorphFlight<
T> - Customize a shared element throughout a Morph transition.
- MorphFlightConfig
- Chooses how a shared element appears while moving between matching widgets.
-
MorphFlightDelegate<
T> - Defines how a custom shared element changes during a Morph transition.
- Enables Morph transitions between the routes of a Navigator.
- MorphSibling
- Coordinates child with a matching Morph transition outside its subtree.
- MorphTarget
- Connects a shared visual with the widgets that accompany its appearance.
- Motion
- Applies one or more reusable MotionEffects to child.
- MotionController
- Provides imperative control over attached motion widgets.
- MotionEffect
- Describes a visual motion treatment shared by Motion and TextMotion.
- MotionEffectBounds
- Declares a visual range that Motion must keep available for a MotionEffect.
- MotionEffectTransform
- Collects the visual operations applied by MotionEffect.apply.
- MoveMotionEffect
- Moves a child between two logical-pixel offsets.
- NativeSelectableText
- Displays selectable text with the operating system's selection menu.
- OfflineErrorDioInterceptor
-
A
Interceptorthat wraps connection-typeDioExceptions into aDioExceptionwhoseDioException.erroris an OfflineConnectionDioException whenever a real connectivity check confirms the device is offline. - Oklch
- An OKLCH color representation (lightness, chroma, hue).
- PauseAnimations
- Mutes ticker-driven animations in child.
- PhoneNumber
- Provides a consistent way to interact with a phone number.
- RouteSettled
- A visibility wrapper that shows child after its route settles.
- SafeAreaObserver
- Measures how much of a region overlaps the device's unsafe edges.
- SafeAreaObserverHandle
- Reads unsafe edge overlap and observes changes for one SafeAreaObserver.
- ScaleInMotionEffect
- Scales a child from scale to its normal size.
- ScaleOutMotionEffect
- Scales a child from its normal size to scale.
- Sequence
- Shows one widget at a time from an ordered sequence.
- SequenceController
- Controls and observes the selected child of a Sequence.
- ShakeMotionEffect
- Shakes a child along offset before returning it to its layout position.
- Skeleton
- A loading placeholder that replaces a widget subtree's painted content with skeleton bones.
- SkeletonAnimatedEffectBase
- A skeleton effect that repeats over an animation interval.
- SkeletonDescendant
- Customizes how one subtree is represented inside an enabled Skeleton.
- SkeletonEffect
- A reusable paint treatment for skeleton bones.
- SkeletonFadeEffect
- A gentle opacity cycle applied to skeleton bones.
- SkeletonShimmerEffect
- A highlight band that repeatedly sweeps across skeleton bones.
- SkeletonStaticEffectBase
- A skeleton effect that does not run an animation ticker.
- SkeletonStyle
- The visual configuration applied to a Skeleton.
- TextMotion
- Applies one or more MotionEffects to each visible character in child.
- VisibilityController
- Controls whether a ControlledVisibility widget is shown or hidden.
- Provides a consistent way to interact with a WhatsApp recipient.
Enums
- Country
- Work with countries and territories consistently across your application.
- DeviceLocationExceptionReason
- Identifies why a device-location operation could not be completed.
- DeviceLocationPermissionStatus
- Describes the application's foreground location permission state.
- InteractiveSwipeDismissDirection
- The physical direction in which an interactive dismissal progresses.
- MarqueeDirection
- Physical direction in which a marquee moves its children.
- MaybeSafeAreaBehavior
- How a MaybeSafeArea responds when its painted position changes.
- MorphDescendantFlightBehavior
-
Strategies for representing a
MorphDescendantduring a Morph flight. - MorphFlightKind
- Describes what caused a Morph transition.
- MotionPlayback
- Playback behaviors supported by a MotionEffect.
- MotionStartup
- Behavior applied when a Motion or TextMotion first mounts.
- SkeletonDescendantBehavior
- Controls how an annotated subtree appears inside an enabled Skeleton.
- TimeAgoFallback
- Selects how DateTimeExtension.timeAgo walks when the matched bucket's callback is missing.
Extensions
- ColorExtension on Color
- Utilities for transforming Flutter Color values and producing hex output.
- DateTimeExtension on DateTime
- Shared helpers for DateTime values.
- DoubleExtension on double
- Utilities for double values.
- ObjectExtension on Object?
- Utilities for nullable Object values.
- OklchExtension on Oklch
- Utilities for Oklch values.
- StringExtension on String
- Utilities for String values.
- VelocityExtension on Velocity
- Utilities for Flutter Velocity values.
Typedefs
Exceptions / Errors
- DebouncerCanceledException
- Signals that a debounced result was canceled before it could be delivered.
- DeviceLocationException
- Reports why a requested device-location operation could not be completed.
- OfflineConnectionDioException
- Thrown when the device has no active internet connection and a network request cannot be completed.