flutter_screwdriver library

Classes

ClearFocusNavigatorObserver
Clears current focus when navigation happens.
DirectionalAffinity
Represents a widget that allows to place a widget before and after the child widget which is controlled by affinity in either horizontal or vertical direction.
FadeScalePageRoute<T>
Provides page route with fade-scale material transition from animations package.
FadeThroughPageRoute<T>
Provides page route with fade-through material transition from animations package.
Gap
A widget that adds some space between widgets inside Flex widgets such as Columns and Rows or scrolling views. This is alternative to SizedBox inside row/column such that you don't have to know the main direction of the parent widget.
HideKeyboard
Hides keyboard on tap outside tap-able widgets. This should be used as the parent of your MaterialApp. This way, it will detect any touches outside text fields and other touchable areas and will close the soft keyboard if open. Flag hide can be used to toggle this behavior. e.g.
HorizontalAffinity
Represents a widget that allows to place a widget before and after the child widget in horizontal direction which is controlled by affinity.
Hoverable
A widget that detects mouse hover events and notifies its child. This widget is useful when you want to change the appearance of a widget when the mouse hovers over it.
PostFrame
Provides a widget that runs a callback after the first frame is rendered.
SharedAxisPageRoute<T>
Provides page route with shared axis material transition from animations package. User SharedAxisTransitionType.vertical for (y-axis) page transition. User SharedAxisTransitionType.horizontal for (x-axis) page transition. User SharedAxisTransitionType.scaled for (z-axis) page transition.
TickingInterface
A ticking interface that provides methods to control the ticking of the widget.
TickingWidget
A widget that rebuilds itself at a given interval. This widget is useful for building widgets that need to be updated at a given interval. For example, this widget can be used to build clocks, timers, stopwatches, and countdowns. This widget can be used to build any widget that needs to be updated at a given interval. Example:
VerticalAffinity
Represents a widget that allows to place a widget above and below the child widget in horizontal direction which is controlled by affinity.

Enums

Affinity
Represents the affinity of the widget's leading and trailing widgets in HorizontalAffinity widget.
TickingMode
Represents the mode of ticking. It can be millisecond, second, minute, or hour. This is used to determine when to rebuild the widget. For example, if the mode is set to TickingMode.second, the widget will rebuild every second. If the mode is set to TickingMode.minute, the widget will rebuild every minute. If the mode is set to TickingMode.hour, the widget will rebuild every hour. If the mode is set to TickingMode.millisecond, the widget will rebuild every millisecond. The default mode is TickingMode.second. The mode can be changed at runtime using TickingInterface.setMode method.

Mixins

AppLifecycleObserver<T extends StatefulWidget>
Allows to observe app lifecycle without any boilerplate code. It registers a listener to receive lifecycle events and auto disposes it when the widget is disposed.
PostFrameCallbackMixin<T extends StatefulWidget>
Provides a mixin that runs a callback after the first frame is rendered.
TickingStateMixin<T extends StatefulWidget>
A mixin class that provides the ticking functionality to the widget. This mixin class can be used with the State class to provide the ticking functionality to the widget.

Extensions

BrightnessFS on Brightness
provides extensions for Widget
ColorFS on Color
Provides extensions for Color
ContextExtension on BuildContext
provides extension to get a dependency from provider
DoubleFS on double
provides extensions for double
GlobalKeyExtension on GlobalKey<State<StatefulWidget>>
provides extensions for Widget
IntFS on int
provides extensions for int
RouteFS on Route<T>
provides extensions for Route
StateFS on State<T>
provides extensions for State
StringFS on String
provides extensions for String
TextEditingControllerFS on TextEditingController
provides extensions on TextEditingController
WidgetFS on Widget
provides extensions for Widget

Functions

closeApp({bool animated = true}) Future<void>
Alias for closing the app by invoking SystemNavigator.pop
hideKeyboard(BuildContext context) → void
hides soft keyboard using platform channel

Typedefs

Disposable = void Function()
Represents a function that is responsible for disposing listeners.
HoverWidgetBuilder = Widget Function(BuildContext context, bool hovering, Widget? child)
Builder function type for Hoverable where hovering is a boolean indicating whether the widget is currently being hovered or not. child is the child widget of Hoverable which won't be rebuilt when hovering changes.
Space = Gap
An alias name for the Gap widget.
TickingWidgetBuilder = Widget Function(BuildContext context, DateTime currentTime, Widget? child)
A builder function type that is used to build the ticking widget.