lerp method Null safety

SfThemeData lerp(
  1. SfThemeData? a,
  2. SfThemeData? b,
  3. double t
)

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)!,
      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)!);
}