flutter-packages icon indicating copy to clipboard operation
flutter-packages copied to clipboard

Split google_fonts.dart into multiple files

Open marchellodev opened this issue 5 years ago • 2 comments

Right now it is impossible to navigate through google_fonts.dart. Since it weights about 3mb, Intellij's code navigation feature is not available. Therefore, it is impossible to jump to the source code from the IDE. It is impossible to view this file on GitHub too: (Sorry about that, but we can’t show files that are this big right now.)

Is it possible to split this file into multiple pieces?

image

marchellodev avatar Dec 05 '20 18:12 marchellodev

This is a good idea, I've been frustrated by that before too, never thought to split out the generated code.

I feel like we could split it out by number, letter, or groups of letters, depending on how many files we want.

For example

  1. src/google_fonts_1.dart
  2. src/google_fonts_a.dart
  3. src/google_fonts_a_f.dart

Then google_fonts.dart would just be written to export the other generated files (that way the library still works the same with import 'package:google_fonts/google_fonts.dart'

@clocksmith WDYT?

johnsonmh avatar Dec 07 '20 15:12 johnsonmh

Now that I think about it, I'm not sure how that would work with the GoogleFonts.foo API, because if the methods are in separate files, they can't all be inside the single GoogleFonts class.

Curious to hear thoughts/ideas for addressing this.

johnsonmh avatar Dec 08 '20 15:12 johnsonmh