ChartTitle<D> constructor

ChartTitle<D>(
  1. String title, {
  2. BehaviorPosition? behaviorPosition,
  3. int? innerPadding,
  4. int? layoutMinSize,
  5. int? layoutPreferredSize,
  6. int? outerPadding,
  7. MaxWidthStrategy? maxWidthStrategy,
  8. ChartTitleDirection? titleDirection,
  9. OutsideJustification? titleOutsideJustification,
  10. int? titlePadding,
  11. TextStyleSpec? titleStyleSpec,
  12. String? subTitle,
  13. TextStyleSpec? subTitleStyleSpec,
})

Constructs a ChartTitle.

title contains the text for the chart title.

Implementation

ChartTitle(String title,
    {BehaviorPosition? behaviorPosition,
    int? innerPadding,
    int? layoutMinSize,
    int? layoutPreferredSize,
    int? outerPadding,
    MaxWidthStrategy? maxWidthStrategy,
    ChartTitleDirection? titleDirection,
    OutsideJustification? titleOutsideJustification,
    int? titlePadding,
    TextStyleSpec? titleStyleSpec,
    String? subTitle,
    TextStyleSpec? subTitleStyleSpec})
    : _config = _ChartTitleConfig(
        behaviorPosition: behaviorPosition ?? _defaultBehaviorPosition,
        innerPadding: innerPadding ?? _defaultInnerPadding,
        layoutMinSize: layoutMinSize,
        layoutPreferredSize: layoutPreferredSize,
        outerPadding: outerPadding ?? _defaultOuterPadding,
        maxWidthStrategy: maxWidthStrategy ?? _defaultMaxWidthStrategy,
        title: title,
        titleDirection: titleDirection ?? _defaultTitleDirection,
        titleOutsideJustification:
            titleOutsideJustification ?? _defaultTitleOutsideJustification,
        titlePadding: titlePadding ?? _defaultTitlePadding,
        titleStyleSpec: titleStyleSpec ?? _defaultTitleStyle,
        subTitle: subTitle,
        subTitleStyleSpec: subTitleStyleSpec ?? _defaultSubTitleStyle,
      ) {
  _lifecycleListener =
      LifecycleListener<D>(onAxisConfigured: _updateViewData);
}