NavbarBadge class

A customized badge/dot class for NavbarRouter. Based on badges package of flutter.

Constructors

Use padding of badgeStyle or fontSize of badgeTextStyle to change size of the badge/dot.
const

Properties

animationDuration Duration
Duration of the badge animations when the badgeContent changes. The default value is Duration(milliseconds: 500).
final
badgeAnimation → BadgeAnimation?
Contains all badge animation properties.
final
badgeContent Widget?
Content inside badge. Please choose either badgeText or badgeContent.
final
badgeStyle → BadgeStyle
Contains all badge style properties.
final
badgeText String
Your badge content, can be number (as string) of text. Please choose either badgeText or badgeContent.
final
badgeTextStyle TextStyle?
Text style for badge
final
color Color?
Background color of the badge. The default value is white.
final
hashCode int
The hash code for this object.
no setteroverride
ignorePointer bool
Can make your badgeContent interactive. The default value is false. Make it true to make badge intercept all taps Make it false and all taps will be passed through the badge
final
key Key?
final
onTap → (dynamic Function()?)
Will be called when you tap on the badge Important: if the badge is outside of the child the additional padding will be applied to make the full badge clickable
final
position → BadgePosition?
Allows to set custom position of badge according to child. If child is null, it doesn't make sense to use it.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showBadge bool
Allows you to hide or show entire badge. The default value is false.
final
stackFit StackFit
Allows to edit fit parameter to Stack widget. The default value is StackFit.loose.
final
textColor Color?
Text color of the badge. The default value is black.
final

Methods

copyWith({String? badgeText, TextStyle? badgeTextStyle, Widget? badgeContent, bool? showBadge, Duration? animationDuration, Color? color, Color? textColor, BadgeStyle? badgeStyle, BadgeAnimation? badgeAnimation, BadgePosition? position, bool? ignorePointer, StackFit? stackFit, dynamic onTap()?, Key? key}) NavbarBadge
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override