A new Flutter package to enable the hover effect on Flutter web.
dependencies:
hovering: ^1.0.4
import"package:hovering/hovering.dart";
-Simply changes one widget to another on Hover.
-Also uses onHover property.
-Hover effect on a Container Widget
-Gives a Hover effect with a fade animation.
-Transition between two widgets.
4. HoverAnimatedContainer
-Creates a Container widget with an Animation.
-Duration can be provided.
-Creates a Button widget with hover effect.
HoverWidget({
Key? key,
required Widget child,
required Widget hoverChild,
required void Function(PointerEnterEvent) onHover
})
HoverCrossFadeWidget({
Key? key,
MouseCursor cursor = SystemMouseCursors.basic,
required Widget firstChild,
required Widget secondChild,
required Duration duration,
AlignmentGeometry alignmentry = Alignment.center,
Curve firstCurve = Curves.linear,
Duration? reverseDuration,
Curve secondCurve = Curves.linear,
Curve sizeCurve = Curves.linear})
HoverContainer({
Key? key,
AlignmentGeometry? alignment,
AlignmentGeometry? hoveraAlignment,
Color? color,
Color? hoverColor,
double? width,
double? hoverWidth,
double? height,
double? hoverHeight,
Decoration? decoration,
Decoration? hoverDecoration,
Decoration? foregroundDecoration,
Decoration? hoverForegroundDecoration,
Widget? child,
Clip clipBehavior = Clip.none,
BoxConstraints? constraints,
EdgeInsetsGeometry? margin,
EdgeInsetsGeometry? hoverMargin,
EdgeInsetsGeometry? padding,
EdgeInsetsGeometry? hoverPadding,
Matrix4? transform,
MouseCursor cursor = SystemMouseCursors.basic,
Matrix4? hoverTransform})
HoverAnimatedContainer({
Key? key,
AlignmentGeometry? alignment,
AlignmentGeometry? hoveraAlignment,
Color? color,
Duration duration = const Duration(milliseconds: 200),
Color? hoverColor,
double? width,
double? hoverWidth,
double? height,
double? hoverHeight,
Decoration? decoration,
Decoration? hoverDecoration,
Decoration? foregroundDecoration,
Decoration? hoverForegroundDecoration,
Widget? child,
BoxConstraints? constraints,
EdgeInsetsGeometry? margin,
EdgeInsetsGeometry? hoverMargin,
EdgeInsetsGeometry? padding,
EdgeInsetsGeometry? hoverPadding,
Matrix4? transform,
Curve curve = Curves.linear,
MouseCursor cursor = SystemMouseCursors.basic,
Matrix4? hoverTransform})
HoverButton({
Key? key,
required void Function() onpressed,
Duration? animationDuration,
bool autofocus = false,
Widget? child,
Clip clipBehavior = Clip.none,
Color? color,
Brightness? colorBrightness,
Color? disabledColor,
double? disabledElevation,
Color? disabledTextColor,
double elevation = 4.0,
bool enableFeedback = true,
Color? focusColor,
double? focusElevation,
FocusNode? focusNode,
double? height,
Color? highlightColor,
double? highlightElevation,
Color? hoverColor,
double hoverElevation = 8.0,
MaterialTapTargetSize? materialTapTargetSize,
double? minWidth,
MouseCursor mouseCursor = SystemMouseCursors.click,
void Function(bool)? onHighlightChanged,
void Function()? onLongPress,
EdgeInsetsGeometry? padding,
EdgeInsetsGeometry hoverPadding = const EdgeInsets.all(2.0), ShapeBorder shape = const StadiumBorder(),
Color? splashColor,
Color? textColor,
ButtonTextTheme? textTheme,
VisualDensity? visualDensity,
ShapeBorder? hoverShape,
Color? hoverTextColor,
ButtonTextTheme? hoverTextTheme,
Brightness? hoverColorBrightness})