diff --git a/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java index 539ab02..d007606 100644 --- a/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java +++ b/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java @@ -1,19 +1,23 @@ package io.flutter.plugins; -import androidx.annotation.Keep; -import androidx.annotation.NonNull; -import io.flutter.Log; - -import io.flutter.embedding.engine.FlutterEngine; +import io.flutter.plugin.common.PluginRegistry; /** * Generated file. Do not edit. - * This file is generated by the Flutter tool based on the - * plugins that support the Android platform. */ -@Keep public final class GeneratedPluginRegistrant { - private static final String TAG = "GeneratedPluginRegistrant"; - public static void registerWith(@NonNull FlutterEngine flutterEngine) { + public static void registerWith(PluginRegistry registry) { + if (alreadyRegisteredWith(registry)) { + return; + } + } + + private static boolean alreadyRegisteredWith(PluginRegistry registry) { + final String key = GeneratedPluginRegistrant.class.getCanonicalName(); + if (registry.hasPlugin(key)) { + return true; + } + registry.registrarFor(key); + return false; } } diff --git a/example/lib/icons.dart b/example/lib/icons.dart index 6bfd18c..5e7f201 100644 --- a/example/lib/icons.dart +++ b/example/lib/icons.dart @@ -370,6 +370,8 @@ final icons = [ ExampleIcon(FontAwesomeIcons.chevronRight, 'chevronRight'), ExampleIcon(FontAwesomeIcons.chevronUp, 'chevronUp'), ExampleIcon(FontAwesomeIcons.child, 'child'), + ExampleIcon(FontAwesomeIcons.childDress, 'childDress'), + ExampleIcon(FontAwesomeIcons.childReaching, 'childReaching'), ExampleIcon(FontAwesomeIcons.childRifle, 'childRifle'), ExampleIcon(FontAwesomeIcons.children, 'children'), ExampleIcon(FontAwesomeIcons.chrome, 'chrome'), diff --git a/lib/font_awesome_flutter.dart b/lib/font_awesome_flutter.dart index 3c9c89b..08ca1d8 100644 --- a/lib/font_awesome_flutter.dart +++ b/lib/font_awesome_flutter.dart @@ -7,7 +7,7 @@ export 'package:font_awesome_flutter/src/icon_data.dart'; // THIS FILE IS AUTOMATICALLY GENERATED! -/// Icons based on font awesome 6.1.0 +/// Icons based on font awesome 6.1.1 class FontAwesomeIcons { /// Solid 0 icon /// @@ -2289,6 +2289,16 @@ class FontAwesomeIcons { /// https://fontawesome.com/icons/child?style=solid static const IconData child = IconDataSolid(0xf1ae); + /// Solid Child Dress icon + /// + /// https://fontawesome.com/icons/child-dress?style=solid + static const IconData childDress = IconDataSolid(0xe59c); + + /// Solid Child Reaching icon + /// + /// https://fontawesome.com/icons/child-reaching?style=solid + static const IconData childReaching = IconDataSolid(0xe59d); + /// Solid Child Rifle icon /// /// https://fontawesome.com/icons/child-rifle?style=solid diff --git a/lib/fonts/fa-brands-400.ttf b/lib/fonts/fa-brands-400.ttf index bfe85c6..25ff4bb 100644 Binary files a/lib/fonts/fa-brands-400.ttf and b/lib/fonts/fa-brands-400.ttf differ diff --git a/lib/fonts/fa-regular-400.ttf b/lib/fonts/fa-regular-400.ttf index 08b4126..8afafde 100644 Binary files a/lib/fonts/fa-regular-400.ttf and b/lib/fonts/fa-regular-400.ttf differ diff --git a/lib/fonts/fa-solid-900.ttf b/lib/fonts/fa-solid-900.ttf index da5e883..02bb649 100644 Binary files a/lib/fonts/fa-solid-900.ttf and b/lib/fonts/fa-solid-900.ttf differ diff --git a/lib/src/fa_icon.dart b/lib/src/fa_icon.dart index 7b6aaf1..fd6b434 100644 --- a/lib/src/fa_icon.dart +++ b/lib/src/fa_icon.dart @@ -20,13 +20,13 @@ class FaIcon extends StatelessWidget { /// /// The [size] and [color] default to the value given by the current [IconTheme]. const FaIcon( - this.icon, { - Key? key, - this.size, - this.color, - this.semanticLabel, - this.textDirection, - }) : super(key: key); + this.icon, { + Key? key, + this.size, + this.color, + this.semanticLabel, + this.textDirection, + }) : super(key: key); /// The icon to display. Available icons are listed in [FontAwesomeIcons]. /// @@ -105,7 +105,8 @@ class FaIcon extends StatelessWidget { @override Widget build(BuildContext context) { assert(this.textDirection != null || debugCheckHasDirectionality(context)); - final TextDirection textDirection = this.textDirection ?? Directionality.of(context); + final TextDirection textDirection = + this.textDirection ?? Directionality.of(context); final IconThemeData iconTheme = IconTheme.of(context); @@ -125,8 +126,10 @@ class FaIcon extends StatelessWidget { } Widget iconWidget = RichText( - overflow: TextOverflow.visible, // Never clip. - textDirection: textDirection, // Since we already fetched it for the assert... + overflow: TextOverflow.visible, + // Never clip. + textDirection: textDirection, + // Since we already fetched it for the assert... text: TextSpan( text: String.fromCharCode(icon!.codePoint), style: TextStyle( @@ -165,7 +168,8 @@ class FaIcon extends StatelessWidget { @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { super.debugFillProperties(properties); - properties.add(IconDataProperty('icon', icon, ifNull: '', showName: false)); + properties.add( + IconDataProperty('icon', icon, ifNull: '', showName: false)); properties.add(DoubleProperty('size', size, defaultValue: null)); properties.add(ColorProperty('color', color, defaultValue: null)); } diff --git a/test/fa_icon_test.dart b/test/fa_icon_test.dart index d8f6a94..41ca823 100644 --- a/test/fa_icon_test.dart +++ b/test/fa_icon_test.dart @@ -24,7 +24,8 @@ void main() { expect(text.text.style!.color, const Color(0xFF666666).withOpacity(0.5)); }); - testWidgets('Icon sizing - no theme, default size', (WidgetTester tester) async { + testWidgets('Icon sizing - no theme, default size', + (WidgetTester tester) async { await tester.pumpWidget( const Directionality( textDirection: TextDirection.ltr, @@ -38,7 +39,8 @@ void main() { expect(renderObject.size, equals(const Size.square(24.0))); }); - testWidgets('Icon sizing - no theme, explicit size', (WidgetTester tester) async { + testWidgets('Icon sizing - no theme, explicit size', + (WidgetTester tester) async { await tester.pumpWidget( const Directionality( textDirection: TextDirection.ltr, @@ -72,7 +74,8 @@ void main() { expect(renderObject.size, equals(const Size.square(36.0))); }); - testWidgets('Icon sizing - sized theme, explicit size', (WidgetTester tester) async { + testWidgets('Icon sizing - sized theme, explicit size', + (WidgetTester tester) async { await tester.pumpWidget( const Directionality( textDirection: TextDirection.ltr, @@ -92,7 +95,8 @@ void main() { expect(renderObject.size, equals(const Size.square(48.0))); }); - testWidgets('Icon sizing - sizeless theme, default size', (WidgetTester tester) async { + testWidgets('Icon sizing - sizeless theme, default size', + (WidgetTester tester) async { await tester.pumpWidget( const Directionality( textDirection: TextDirection.ltr, @@ -109,7 +113,8 @@ void main() { expect(renderObject.size, equals(const Size.square(24.0))); }); - testWidgets("Changing semantic label from null doesn't rebuild tree ", (WidgetTester tester) async { + testWidgets("Changing semantic label from null doesn't rebuild tree ", + (WidgetTester tester) async { await tester.pumpWidget( const Directionality( textDirection: TextDirection.ltr, @@ -139,4 +144,4 @@ void main() { // semanticLabel to make sure the subtree was not rebuilt. expect(richText2, same(richText1)); }); -} \ No newline at end of file +}