getTitle property

GetTitleByIndexFunction? getTitle
final

getTitle is used to draw titles outside the RadarChart getTitle is type of GetTitleByIndexFunction so you should return a valid RadarChartTitle for each index (we provide a default angle = index * 360 / titleCount)

getTitle: (index, angle) {
  switch (index) {
    case 0:
      return RadarChartTitle(text: 'Mobile or Tablet', angle: angle);
    case 2:
      return RadarChartTitle(text: 'Desktop', angle: angle);
    case 1:
      return RadarChartTitle(text: 'TV', angle: angle);
    default:
      return const RadarChartTitle(text: '');
  }
}

Implementation

final GetTitleByIndexFunction? getTitle;