// GENERATED CODE - DO NOT EDIT // Copyright 2019 The Flutter team. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'dart:ui' as ui; import 'package:flutter/material.dart'; import '../google_fonts_base.dart'; import '../google_fonts_descriptor.dart'; import '../google_fonts_variant.dart'; /// Methods for fonts starting with '{{part}}'. class Part{{part}} { {{#method}} /// Applies the {{fontFamilyDisplay}} font family from Google Fonts to the /// given [textStyle]. /// /// See: /// * {{docsUrl}} static TextStyle {{methodName}}({ TextStyle? textStyle, Color? color, Color? backgroundColor, double? fontSize, FontWeight? fontWeight, FontStyle? fontStyle, double? letterSpacing, double? wordSpacing, TextBaseline? textBaseline, double? height, Locale? locale, Paint? foreground, Paint? background, List? shadows, List? fontFeatures, TextDecoration? decoration, Color? decorationColor, TextDecorationStyle? decorationStyle, double? decorationThickness, }) { final fonts = { {{#fontUrls}} const GoogleFontsVariant(fontWeight: FontWeight.w{{variantWeight}}, fontStyle: FontStyle.{{variantStyle}},): GoogleFontsFile('{{hash}}', {{length}},), {{/fontUrls}} }; return googleFontsTextStyle( textStyle: textStyle, fontFamily: '{{fontFamily}}', color: color, backgroundColor: backgroundColor, fontSize: fontSize, fontWeight: fontWeight, fontStyle: fontStyle, letterSpacing: letterSpacing, wordSpacing: wordSpacing, textBaseline: textBaseline, height: height, locale: locale, foreground: foreground, background: background, shadows: shadows, fontFeatures: fontFeatures, decoration: decoration, decorationColor: decorationColor, decorationStyle: decorationStyle, decorationThickness: decorationThickness, fonts: fonts, ); } /// Applies the {{fontFamilyDisplay}} font family from Google Fonts to every /// [TextStyle] in the given [textTheme]. /// /// See: /// * {{docsUrl}} static TextTheme {{methodName}}TextTheme([TextTheme? textTheme]) { textTheme ??= ThemeData.light().textTheme; return TextTheme( {{#themeParams}} {{value}}: {{methodName}}(textStyle: textTheme.{{value}}), {{/themeParams}} ); } {{/method}} }