Repository navigation
fix: parse extension enum names with the shared parseEnum - #76
Merged
AdamMusa merged 5 commits intoNov 2, 2026
Merged
Conversation
Nine extension packages compared enum names inline with
e.name.toLowerCase() == value.toLowerCase(), so Ruby snake_case names
such as space_between, not_visible_respect_margin or
best_for_navigation silently fell back to the default. They now call
the core parseEnum, which matches case-insensitively with underscores
removed.
This also fixes the ads template_type and font style parsers, which
compared against the enum's toString() ("TemplateType.small") and so
never matched the plain names Ruby sends.
…o fix/extension-enum-snake-case
…o fix/extension-enum-snake-case
…o fix/extension-enum-snake-case
This was referenced Oct 28, 2026
Brings in the PRs merged since (#25-#75) so #76 merges cleanly. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #63. This branch is stacked on
fix/parse-curve-snake-caseand merges in the latestcodex/engine-initialization. Until #63 merges, review only the commit "fix: parse extension enum names with the shared parseEnum".What
Nine extension packages compared enum names inline:
Ruby snake_case names never matched, so these values silently fell back to the default:
space_between/space_evenly(charts)not_visible_respect_margin,append_dot,set_north,bottom_left(map)best_for_navigation,automotive_navigation(geolocator)aac_lc,voice_recognition,mix_with_others(audio_recorder)first_unlock_this_device(secure_storage)All 22 comparisons now call the shared
parseEnumfrom #63. It matches case-insensitively with underscores removed on both sides, so exact and camelCase names keep working. That includes the enum names that contain underscores in Dart, like flutter_secure_storage'sRSA_ECB_PKCS1Padding. The now-unusedpackage:collectionimports are removed.parseTemplateType,parseNativeTemplateFontStyleparseReleaseModeparseAudioEncoder,parseAndroidAudioSource,parseIosAudioCategoryOptionparseTooltipDirection,parseBarChartAlignment,parseFLHorizontalAlignment,parseRadarShapeparseColumnSizeparseLocationAccuracy,parseActivityTypeparseAttributionAlignment,parsePatternFit,parseCursorRotationBehaviour,parseEvictErrorTileStrategyparseKeychainAccessibility,parseKeyCipherAlgorithm,parseStorageCipherAlgorithm,parseAccessControlFlagparsePlaylistModeBug fixed along the way (ads):
parseTemplateTypeandparseNativeTemplateFontStylecompared againste.toString()("templatetype.small"), note.name. Ruby'snative_ad(template_style: { template_type: "small" })therefore always rendered the medium template, and the text-stylestylewas always ignored. Both now match the plain names Ruby sends.How it was verified
Packages with a
test/dir (ads, charts, datatable2, map, video): each gets a newtest/enum_name_parsing_test.dart(2 tests each). The tests cover camelCase, snake_case and upper-case names; unknown and null names keeping the default; and, for ads,template_type: "small"throughparseNativeTemplateStyle.Packages without a
test/dir (audio, audio_recorder, geolocator, secure_storage):flutter pub get+flutter analyze. Each change is the same one-line substitution intoparseEnum, whose behavior fix: accept snake_case curve and enum names from Ruby #63 tests in core. I also checked every enum's value names in the pinned dependency sources:AudioEncoder.aacLc…,AndroidAudioSource.voiceRecognition…,IosAudioCategoryOption.mixWithOthers…LocationAccuracy.bestForNavigation…,ActivityType.automotiveNavigation…KeychainAccessibility.first_unlock_this_device…,KeyCipherAlgorithm.RSA_ECB_PKCS1Padding…,StorageCipherAlgorithm.AES_GCM_NoPadding…,AccessControlFlag.devicePasscode…ReleaseMode.release/loop/stopNo two values collide once underscores are removed and case is ignored.
team/verify_pr.sh <engine> ""withEXT_PKGSset to all nine touched packages, at head9695276(latest baseb4d3f8emerged in):flutter test+743 (base + fix: accept snake_case curve and enum names from Ruby #63's 9) andflutter analyze lib testclean.test/dir (SKIP).ruflet_audio_recorder(1):manageAudioSessionis deprecated (parseIosRecordConfig). Replacing it withAudioRecorder.ios.manageAudioSessionis an API migration with behavior impact, so I left it out of this PR.ruflet_charts(3): twounnecessary_constincharts.dart:15,25, andproviderimported by the existingcupertino_charts_test.dartwithout a dev_dependency.chore/color-pickers-analyzer(chore: clear ruflet_color_pickers analyzer issues #75).Verify is clean once chore/extension-analyzer-cleanup (#77) merges.