getTheme function

GbtFluentThemeData getTheme({
  1. required MaterialColor brandColor,
})

Implementation

GbtFluentThemeData getTheme({
  required MaterialColor brandColor,
}) {
  final fluentColors = convert(brandColor);

  return GbtFluentThemeData(

    splashColor: Colors.transparent,
    splashFactory: NoSplash.splashFactory,
    useMaterial3: true,
    fontFamily:
        defaultTargetPlatform == TargetPlatform.iOS ? 'SF Pro' : 'Roboto',
    fluentBrandColors: fluentColors,
    fluentTextTheme: MixedFluentTextTheme(
      caption2: MixedFluentTextStyle(
        fluentSize: 12,
        fluentLineHeight: 1.35,
        fluentWeight: MixedFluentFontWeight.regular,
      ),
      caption1: MixedFluentTextStyle(
        fluentSize: 13,
        fluentLineHeight: 1.4,
        fluentWeight: MixedFluentFontWeight.regular,
      ),
      caption1Strong: MixedFluentTextStyle(
        fluentSize: 13,
        fluentLineHeight: 1.4,
        fluentWeight: MixedFluentFontWeight.semibold,
      ),
      body2: MixedFluentTextStyle(
        fluentSize: 15,
        fluentLineHeight: 1.35,
        fluentWeight: MixedFluentFontWeight.regular,
      ),
      body2Strong: MixedFluentTextStyle(
        fluentSize: 15,
        fluentLineHeight: 1.35,
        fluentWeight: MixedFluentFontWeight.semibold,
      ),
      body1: MixedFluentTextStyle(
        fluentSize: 17,
        fluentLineHeight: 1.3,
        fluentWeight: MixedFluentFontWeight.regular,
      ),
      body1Strong: MixedFluentTextStyle(
        fluentSize: 17,
        fluentLineHeight: 1.3,
        fluentWeight: MixedFluentFontWeight.semibold,
      ),
      title3: MixedFluentTextStyle(
        fluentSize: 20,
        fluentLineHeight: 1.25,
        fluentWeight: MixedFluentFontWeight.regular,
      ),
      title2: MixedFluentTextStyle(
        fluentSize: 22,
        fluentLineHeight: 1.3,
        fluentWeight: MixedFluentFontWeight.semibold,
      ),
      title1: MixedFluentTextStyle(
        fluentSize: 28,
        fluentLineHeight: 1.22,
        fluentWeight: MixedFluentFontWeight.bold,
      ),
      largeTitle: MixedFluentTextStyle(
        fluentSize: 34,
        fluentLineHeight: 1.21,
        fluentWeight: MixedFluentFontWeight.bold,
      ),
      display: MixedFluentTextStyle(
        fluentSize: 60,
        fluentLineHeight: 1.17,
        fluentWeight: MixedFluentFontWeight.bold,
      ),
    ),
    fluentShadowTheme: MixedFluentShadowTheme(
      shadow2: MixedFluentShadow.lowElevation(2),
      shadow4: MixedFluentShadow.lowElevation(4),
      shadow8: MixedFluentShadow.lowElevation(8),
      shadow16: MixedFluentShadow.lowElevation(16),
      shadow28: MixedFluentShadow.hightElevation(28),
      shadow64: MixedFluentShadow.hightElevation(64),
      brandShadow2:
          MixedFluentShadow.brandColor(2, brandColor, ElevationRamp.low),
      brandShadow4:
          MixedFluentShadow.brandColor(4, brandColor, ElevationRamp.low),
      brandShadow8:
          MixedFluentShadow.brandColor(8, brandColor, ElevationRamp.low),
      brandShadow16:
          MixedFluentShadow.brandColor(16, brandColor, ElevationRamp.low),
      brandShadow28:
          MixedFluentShadow.brandColor(28, brandColor, ElevationRamp.hight),
      brandShadow64:
          MixedFluentShadow.brandColor(64, brandColor, ElevationRamp.hight),
    ),
    fluentStrokeTheme: MixedFluentStrokeTheme(
      stroke1: MixedFluentStrokeStyle(
        color: FluentColors.neutralStroke1Rest,
        thickness: FluentStrokeThickness.strokeWidth05,
        cornerRadius: MixedFluentCornerRadius.none,
      ),
      stroke2: MixedFluentStrokeStyle(
        color: FluentColors.neutralStroke2Rest,
        thickness: FluentStrokeThickness.strokeWidth05,
        cornerRadius: MixedFluentCornerRadius.none,
      ),
      strokeAccessible: MixedFluentStrokeStyle(
        color: FluentColors.neutralStrokeAccessibleRest,
        thickness: FluentStrokeThickness.strokeWidth10,
        cornerRadius: MixedFluentCornerRadius.none,
      ),
      strokeDisabled: MixedFluentStrokeStyle(
        color: FluentColors.neutralStrokeDisabledRest,
        thickness: FluentStrokeThickness.strokeWidth10,
        cornerRadius: MixedFluentCornerRadius.xLarge,
      ),
    ),
    colorScheme: ColorScheme.fromSeed(seedColor: brandColor),
  );
}