lerp static method

Linearly interpolate between two themes.

Implementation

static SfThemeData lerp(SfThemeData? a, SfThemeData? b, double t) {
  assert(a != null);
  assert(b != null);
  return SfThemeData.raw(
    brightness: t < 0.5 ? a!.brightness : b!.brightness,
    pdfViewerThemeData: SfPdfViewerThemeData.lerp(
        a!.pdfViewerThemeData, b!.pdfViewerThemeData, t)!,
    chartThemeData:
        SfChartThemeData.lerp(a.chartThemeData, b.chartThemeData, t)!,
    sparkChartThemeData: SfSparkChartThemeData.lerp(
        a.sparkChartThemeData, b.sparkChartThemeData, t)!,
    calendarThemeData: SfCalendarThemeData.lerp(
        a.calendarThemeData, b.calendarThemeData, t)!,
    dataGridThemeData: SfDataGridThemeData.lerp(
        a.dataGridThemeData, b.dataGridThemeData, t)!,
    dataPagerThemeData: SfDataPagerThemeData.lerp(
        a.dataPagerThemeData, b.dataPagerThemeData, t)!,
    dateRangePickerThemeData: SfDateRangePickerThemeData.lerp(
        a.dateRangePickerThemeData, b.dateRangePickerThemeData, t)!,
    barcodeThemeData:
        SfBarcodeThemeData.lerp(a.barcodeThemeData, b.barcodeThemeData, t)!,
    gaugeThemeData:
        SfGaugeThemeData.lerp(a.gaugeThemeData, b.gaugeThemeData, t)!,
    sliderThemeData:
        SfSliderThemeData.lerp(a.sliderThemeData, b.sliderThemeData, t)!,
    rangeSelectorThemeData: SfRangeSelectorThemeData.lerp(
        a.rangeSelectorThemeData, b.rangeSelectorThemeData, t)!,
    rangeSliderThemeData: SfRangeSliderThemeData.lerp(
        a.rangeSliderThemeData, b.rangeSliderThemeData, t)!,
    mapsThemeData: SfMapsThemeData.lerp(a.mapsThemeData, b.mapsThemeData, t)!,
    treemapThemeData:
        SfTreemapThemeData.lerp(a.treemapThemeData, b.treemapThemeData, t)!,
    chatThemeData: SfChatThemeData.lerp(a.chatThemeData, b.chatThemeData, t)!,
  );
}