aws-amplify / amplify-flutter
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 2,222 units with 21,871 lines of code in units (47.9% of code).
    • 6 very long units (1,170 lines of code)
    • 36 long units (2,436 lines of code)
    • 173 medium size units (5,432 lines of code)
    • 382 small units (5,575 lines of code)
    • 1,625 very small units (7,258 lines of code)
5% | 11% | 24% | 25% | 33%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
dart7% | 11% | 19% | 26% | 35%
kt3% | 13% | 25% | 25% | 30%
swift0% | 9% | 43% | 22% | 24%
rb0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
packages/amplify_authenticator11% | 7% | 23% | 21% | 36%
packages/amplify_auth_cognito7% | 9% | 20% | 32% | 29%
packages/amplify_analytics_pinpoint18% | 7% | 30% | 18% | 25%
packages/amplify_api5% | 9% | 45% | 16% | 22%
packages/amplify_datastore0% | 24% | 26% | 24% | 24%
example/lib0% | 17% | 14% | 48% | 20%
packages/amplify_storage_s30% | 8% | 31% | 29% | 30%
packages/amplify_flutter0% | 0% | 23% | 36% | 40%
packages/amplify_datastore_plugin_interface0% | 0% | 11% | 33% | 54%
packages/amplify_test0% | 0% | 64% | 17% | 17%
tool0% | 0% | 93% | 0% | 6%
packages/amplify_core0% | 0% | 0% | 63% | 36%
packages/amplify_auth_plugin_interface0% | 0% | 0% | 0% | 100%
packages/amplify_api_plugin_interface0% | 0% | 0% | 0% | 100%
packages/amplify_storage_plugin_interface0% | 0% | 0% | 0% | 100%
packages/amplify_analytics_plugin_interface0% | 0% | 0% | 0% | 100%
build-support0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
String resolve()
in packages/amplify_authenticator/lib/src/l10n/country_resolver.dart
496 247 2
Exception castAndReturnPlatformException()
in packages/amplify_auth_cognito/lib/amplify_auth_error_handling.dart
158 34 1
50: Color()
in packages/amplify_authenticator/lib/src/theme/amplify_theme.dart
154 1 1
Widget build()
in packages/amplify_analytics_pinpoint/example/lib/main.dart
144 10 1
Widget build()
in packages/amplify_auth_cognito/example/lib/Widgets/SignInWidget.dart
116 2 1
fun subscribe()
in packages/amplify_api/android/src/main/kotlin/com/amazonaws/amplify/amplify_api/FlutterGraphQLApi.kt
102 5 3
String toString()
in packages/amplify_datastore/example/lib/models/ModelWithAppsyncScalarTypes.dart
100 24 0
fun fromSerializedMap()
in packages/amplify_datastore/android/src/main/kotlin/com/amazonaws/amplify/amplify_datastore/types/query/QueryPredicateBuilder.kt
94 9 2
func sendPayload()
in packages/amplify_datastore/ios/Classes/DataStoreHubEventStreamHandler.swift
93 21 1
factory ModelWithAppsyncScalarTypes()
in packages/amplify_datastore/example/lib/models/ModelWithAppsyncScalarTypes.dart
87 15 29
func handleAuthError()
in packages/amplify_auth_cognito/ios/Classes/AuthErrorHandler.swift
83 42 2
String toString()
in packages/amplify_datastore/example/lib/models/CustomTypeWithAppsyncScalarTypes.dart
83 21 0
Widget build()
in packages/amplify_datastore/example/lib/main.dart
82 8 1
Widget build()
in packages/amplify_auth_cognito/example/lib/Widgets/ViewUserAttributes.dart
80 5 1
fun onConfigureDataStore()
in packages/amplify_datastore/android/src/main/kotlin/com/amazonaws/amplify/amplify_datastore/AmplifyDataStorePlugin.kt
77 7 2
Widget build()
in example/lib/Views/SignUpView.dart
75 1 1
Widget build()
in packages/amplify_auth_cognito/example/lib/Widgets/UpdateUserAttributes.dart
72 3 1
Future initPlatformState()
in packages/amplify_datastore/example/lib/main.dart
71 4 0
fun query()
in packages/amplify_api/android/src/main/kotlin/com/amazonaws/amplify/amplify_api/FlutterGraphQLApi.kt
69 6 2
fun mutate()
in packages/amplify_api/android/src/main/kotlin/com/amazonaws/amplify/amplify_api/FlutterGraphQLApi.kt
69 6 2