Small items found during the audit, grouped because none justifies its own issue.
lib/src/models/item_span.dart:48 uses bool operator ==(covariant ItemSpan other). The covariant inserts a runtime downcast, so comparing an ItemSpan with any other type throws TypeError instead of returning false. Use Object other with an is check.
lib/src/models/item_span.dart:57 omits rawValue from hashCode while == includes it. Legal, but spans differing only in rawValue collide unnecessarily.
pubspec.yaml depends on url_launcher_ios directly. It is an endorsed implementation of url_launcher; depending on it pins an implementation package callers should never see.
example/lib/smart_text.dart is 104 lines and imported by nothing.
lib/src/extensions/string.dart:4 matches startsWith('http'), which also matches httpfoo, and the Uri.parse on the next line can throw inside build.
lib/src/extensions/item_span_default_config.dart:85 uses canLaunchUrl then launchUrl, the check-then-act pattern url_launcher's own docs advise against.
lib/src/extensions/item_span_default_config.dart:45-47 has a comment in the datetime branch that talks about "the formatted phone number" and "the phone field".
TextClassifier.swift and NSDataDetectorExtension.swift both open with // SmartTextFlutterBridge.swift and // Runner headers from whatever file they began as.
flutter_lints: ^2.0.0 is several majors behind.
Good first issue material.
Found during the v0.4.0 codebase audit.
Small items found during the audit, grouped because none justifies its own issue.
lib/src/models/item_span.dart:48usesbool operator ==(covariant ItemSpan other). Thecovariantinserts a runtime downcast, so comparing anItemSpanwith any other type throwsTypeErrorinstead of returning false. UseObject otherwith anischeck.lib/src/models/item_span.dart:57omitsrawValuefromhashCodewhile==includes it. Legal, but spans differing only inrawValuecollide unnecessarily.pubspec.yamldepends onurl_launcher_iosdirectly. It is an endorsed implementation ofurl_launcher; depending on it pins an implementation package callers should never see.example/lib/smart_text.dartis 104 lines and imported by nothing.lib/src/extensions/string.dart:4matchesstartsWith('http'), which also matcheshttpfoo, and theUri.parseon the next line can throw insidebuild.lib/src/extensions/item_span_default_config.dart:85usescanLaunchUrlthenlaunchUrl, the check-then-act pattern url_launcher's own docs advise against.lib/src/extensions/item_span_default_config.dart:45-47has a comment in thedatetimebranch that talks about "the formatted phone number" and "the phone field".TextClassifier.swiftandNSDataDetectorExtension.swiftboth open with// SmartTextFlutterBridge.swiftand// Runnerheaders from whatever file they began as.flutter_lints: ^2.0.0is several majors behind.Good first issue material.
Found during the v0.4.0 codebase audit.