diff --git a/example/pubspec.lock b/example/pubspec.lock index d09fa81..b231f60 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -161,10 +161,10 @@ packages: dependency: "direct main" description: name: go_router - sha256: "530dcbb298dc7c319aea9e3b7c580a61effb2abee2c93825d2dd8d5af0e230f1" + sha256: "8b05bc90a4f8f8d579db351e2bd6bac566813e12953494dc2a9d7461e7c6dbe7" url: "https://pub.dev" source: hosted - version: "18.0.2" + version: "18.1.0" google_fonts: dependency: "direct main" description: @@ -273,10 +273,10 @@ packages: dependency: "direct main" description: name: lucide_icons_flutter - sha256: "50a21003cfe094e33b87e780d62ed5be84c32273dec1ba04547aab7df3cba00c" + sha256: d2a7db37aa98536dc65bd6b4384aaa12baa94423a7a57b186011cf695ec2beb2 url: "https://pub.dev" source: hosted - version: "3.1.20" + version: "4.0.0" matcher: dependency: transitive description: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index af04d1e..422bc3f 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -16,10 +16,10 @@ dependencies: flutter_web_plugins: sdk: flutter font_awesome_flutter: ^11.0.0 - go_router: ^18.0.2 + go_router: ^18.1.0 google_fonts: ^9.0.0 http: ^1.6.0 - lucide_icons_flutter: ^3.1.20 + lucide_icons_flutter: ^4.0.0 morphnext: path: .. reel_text: ^0.5.1 diff --git a/example/test/font_metrics_fidelity_test.dart b/example/test/font_metrics_fidelity_test.dart index 930ece6..4778891 100644 --- a/example/test/font_metrics_fidelity_test.dart +++ b/example/test/font_metrics_fidelity_test.dart @@ -25,6 +25,30 @@ void main() { await _loadIconFonts(manifest); }); + test('every Lucide catalog icon has a usable bundled outline', () async { + final icons = iconCatalog + .where((entry) => entry.family == IconCatalogFamily.lucide) + .toList(); + expect(icons, isNotEmpty); + final font = await _parseFont(_manifestFamily(icons.first.icon)); + for (final entry in icons) { + expect(entry.icon.fontFamily, 'Lucide', reason: entry.name); + expect( + entry.icon.fontPackage, + 'lucide_icons_flutter', + reason: entry.name, + ); + expect(entry.icon.matchTextDirection, isFalse, reason: entry.name); + expect( + font.glyphIndexForCodePoint(entry.icon.codePoint), + isNotNull, + reason: entry.name, + ); + final outline = font.glyphForCodePoint(entry.icon.codePoint); + expect(outline.contours, isNotEmpty, reason: entry.name); + expect(outline.advanceWidth, greaterThan(0), reason: entry.name); + } + }); testWidgets('representative font faces use native Icon metrics', ( tester, ) async { @@ -170,6 +194,11 @@ List<_FontCase> _fontCases() { icon('menu', IconCatalogFamily.material), icon('abc', IconCatalogFamily.material), ), + _FontCase( + 'Lucide', + icon('house', IconCatalogFamily.lucide), + icon('cpu_ai', IconCatalogFamily.lucide), + ), _FontCase( 'Font Awesome Brands', icon('github', IconCatalogFamily.fontAwesome),