flutter / tools_metadata
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 33 units with 530 lines of code in units (5.7% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (138 lines of code)
    • 6 medium size units (171 lines of code)
    • 9 small units (125 lines of code)
    • 16 very small units (96 lines of code)
0% | 26% | 32% | 23% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
dart0% | 26% | 32% | 23% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tool/catalog0% | 50% | 30% | 10% | 9%
tool/icon_generator/lib0% | 59% | 23% | 0% | 17%
tool/icons0% | 0% | 66% | 28% | 4%
tool/colors0% | 0% | 30% | 42% | 26%
tool0% | 0% | 0% | 54% | 45%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
Future main()
in tool/catalog/generate_widget_catalog.dart
70 11 1
Widget build()
in tool/icon_generator/lib/main.dart
68 1 1
Map _convertToJson()
in tool/catalog/generate_widget_catalog.dart
42 6 2
void writeColors()
in tool/colors/generate_files.dart
34 9 3
Future main()
in tool/icon_generator/lib/main.dart
27 4 0
Future generateIcons()
in tool/icons/update_icons.dart
26 4 1
Future main()
in tool/icons/update_icons.dart
21 1 0
void generateDart()
in tool/icons/update_icons.dart
21 2 4
void generateProperties()
in tool/icons/update_icons.dart
18 3 3
Future version()
in tool/grind.dart
17 2 0
Future flutterRun()
in tool/common.dart
16 2 1
String _singleLine()
in tool/catalog/generate_widget_catalog.dart
15 4 1
Future generateDartFiles()
in tool/colors/update_colors.dart
14 1 0
void generateJson()
in tool/colors/generate_files.dart
12 1 2
Future main()
in tool/colors/generate_files.dart
11 2 1
void generateProperties()
in tool/colors/generate_files.dart
11 1 2
Future downloadUrl()
in tool/icons/update_icons.dart
11 1 1
Future findAndSave()
in tool/icon_generator/lib/main.dart
10 1 3
Future _captureImage()
in tool/icon_generator/lib/main.dart
10 2 1
10 2 0