Skip to content

MonthViewBuilders on MonthView Object has not used generic type of MonthView Object #524

@dzakybrori

Description

@dzakybrori

MonthViewBuilders on MonthViewState Object has not used generic type of MonthView Object, causing an error while using generic type to secure our own logic.

Current MonthViewBuilders on MonthViewState

/// State of month view.
class MonthViewState<T extends Object?> extends State<MonthView<T>> {
  late DateTime _minDate;
  late DateTime _maxDate;
.
.
.
  late MonthViewStyle _monthViewStyle = widget.monthViewStyle;
  late MonthViewBuilders _monthViewBuilders = widget.monthViewBuilders;
  late MonthViewThemeSettings _monthViewThemeSettings =
      widget.monthViewThemeSettings;

Should be

/// State of month view.
class MonthViewState<T extends Object?> extends State<MonthView<T>> {
  late DateTime _minDate;
  late DateTime _maxDate;
.
.
.
  late MonthViewStyle _monthViewStyle = widget.monthViewStyle;
  late MonthViewBuilders<T> _monthViewBuilders = widget.monthViewBuilders;
  late MonthViewThemeSettings _monthViewThemeSettings =
      widget.monthViewThemeSettings;

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions