HeatmapCalendar<T extends Comparable<T>> class
Constructors
-
HeatmapCalendar({Key? key, required DateTime startDate, required DateTime endedDate, int firstDay = DateTime.sunday, bool withUTC = false, Map<DateTime, T>? selectedMap, Map<T, Color>? colorMap, Map<T, Color>? valueColorMap, Locale? locale, HeatmapCalendarStyle? style, Size cellSize = defaultCellSize, double cellSpaceBetween = defualtCellSpaceBetween, Size? weekLabalCellSize, double weekLabelSpaceBetweenHeatmap = defualtCellSpaceBetween, int colorTipNum = 5, Widget? colorTipLeftHelper, Widget? colorTipRightHelper, Size? colorTipCellSize, double colorTipCellBetweem = defualtCellSpaceBetween, double colorTipSpaceBetweenHeatmap = defualtCellSpaceBetween, HeatmapLayoutParameters layoutParameters = const HeatmapLayoutParameters.defaults(), HeatmapSwitchParameters switchParameters = const HeatmapSwitchParameters.defaults(), ScrollController? controller, HeatmapCallbackModel<T>? callbackModel, Duration cellChangeAnimateDuration = const Duration(milliseconds: 300), AnimatedSwitcherTransitionBuilder? cellChangeAnimateTransitionBuilder, CellItemBuilder? cellBuilder, MonthLabelValueBuilder? monthLabelItemBuilder, WeekLabelValueBuilder? weekLabelValueBuilder})
-
const
Properties
-
callbackModel
→ HeatmapCallbackModel<T>?
-
some callbacks, see HeatmapCallbackModel
final
-
cellBuilder
→ CellItemBuilder?
-
Custom heatmap cell builder
e.g. (add tootips):
final
-
cellChangeAnimateDuration
→ Duration
-
final
-
cellChangeAnimateTransitionBuilder
→ AnimatedSwitcherTransitionBuilder?
-
final
-
cellSize
→ Size
-
Heatmap cell size
final
-
cellSpaceBetween
→ double
-
Distance between Heatmap cells
final
-
colorMap
→ Map<T, Color>?
-
Provide a map that defines how the cell in 'selectedMap'
should change color in the heatmap
e.g. {1: Colors.red, 10: Colors.blue}
color of heatmap cell: (-inf,1) defualt, [1, 10) red, [10,inf) blue
final
-
colorTipCellBetweem
→ double
-
Distance between heatmap color tips
final
-
colorTipCellSize
→ Size?
-
Heatmap color tips cell size, recomannd equal or smaller than
cellSize
final
-
colorTipLeftHelper
→ Widget?
-
cusom color tips left helper text
final
-
colorTipNum
→ int
-
Displayed color tip number, color defined in
colorMap
,
Select n colors uniformly from colorMap
,
if set num larger than colorMap.length
, show num as colorMap.length
final
-
colorTipRightHelper
→ Widget?
-
cusom color tips right helper text
final
-
colorTipSpaceBetweenHeatmap
→ double
-
Distance between color tip row and heatmap body
final
-
endedDate
→ DateTime
-
Heatmap ended date
final
-
firstDay
→ int
-
Heatmap first day of week, See weekday define in DateTime
static const int monday = 1;
...
static const int sunday = 7;
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
key
→ Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
layoutParameters
→ HeatmapLayoutParameters
-
Heatmap layout options, see HeatmapLayoutParameters
final
-
locale
→ Locale?
-
i18n, also see flutter docs
Internationalizing Flutter apps
or
example in example/lib/page_localization.dart
;
final
-
monthLabelItemBuilder
→ MonthLabelValueBuilder?
-
Customn month label builder
e.g.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
selectedMap
→ Map<DateTime, T>?
-
final
-
startDate
→ DateTime
-
Heatmap start date
final
-
style
→ HeatmapCalendarStyle?
-
Heatmap style options, see HeatmapCalendarStyle
final
-
switchParameters
→ HeatmapSwitchParameters
-
Heatmap switch options, see HeatmapSwitchParameters
final
-
valueColorMap
→ Map<T, Color>?
-
Provide a map that defines how the cell value in 'selectedMap'
should change color in the heatmap
This map is generally used in color maps when some colors in the map
are too close to the value colors, making it difficult to distinguish them
e.g. colorMap = {0: Colors.white, 10: Colors.black, 20: Colors.blue}
valueColorMap = {0: Colors.Black, 10: Colors.white}
final
-
weekLabalCellSize
→ Size?
-
Heatmap week label size, recommand set same width with
cellSize
final
-
weekLabelSpaceBetweenHeatmap
→ double
-
Distance between week label column and heatmap cell columns
final
-
weekLabelValueBuilder
→ WeekLabelValueBuilder?
-
Custom week label builder
e.g.
final
-
withUTC
→ bool
-
Handling time using UTC
final