title: Is there a way to create a seperate file with hundreds of fonts and choose them in the json file in flutter
body: <p>So i have this json file which i use for the style:</p>
  <pre><code># style.json
  {
  
    &quot;view_background_color&quot;: &quot;0xFF018A2C&quot;,
    &quot;app_bar_color&quot;: &quot;0xFF0645B1&quot;,
    &quot;text_color&quot;: &quot;0xFFFCDE02&quot;,
    &quot;font_size&quot;: &quot;24&quot;,
    &quot;font_weight&quot;: &quot;bold&quot;,
    &quot;font_family&quot;: &quot;Raleway&quot;
  }
  </code></pre>
  <p>My question is if i can make a seperate file with hundreds of font_family(which i can update with more font_family) and specify a font_family from fonts.json inside style.json. I want only be able to update style.json if i want to update for example the font_family in flutter:</p>
  <pre><code># app.dart
  
  Future&lt;ThemeData&gt; initializeThemeData() async {
    String jsonData = await rootBundle.loadString('assets/styles.json');
    Map&lt;String, dynamic&gt; data = jsonDecode(jsonData);
    return ThemeData(
      scaffoldBackgroundColor: Color(int.parse(data['view_background_color'])),
      appBarTheme: AppBarTheme(
        color: Color(int.parse(data['app_bar_color'])),
      ),
      textTheme: TextTheme(
        bodyText2: TextStyle(
          fontSize: double.parse(data['font_size']),
          fontFamily: data['font_family'],
          color: Color(int.parse(data['text_color'])),
        ),
      ),
    );
  }
  </code></pre>
  <p>The reason why i am asking this is because the only way to make custom fonts in flutter is to add the fonts inside pubspec.yaml but if i want to change between hundreds of fonts then i need a seperate file because then the pubspec.yaml file will be cluttered</p>