Skip to content

Commit 72590fe

Browse files
committed
Update to font awesome version 6.1.1
1 parent 2f71c7c commit 72590fe

File tree

8 files changed

+53
-28
lines changed

8 files changed

+53
-28
lines changed
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
package io.flutter.plugins;
22

3-
import androidx.annotation.Keep;
4-
import androidx.annotation.NonNull;
5-
import io.flutter.Log;
6-
7-
import io.flutter.embedding.engine.FlutterEngine;
3+
import io.flutter.plugin.common.PluginRegistry;
84

95
/**
106
* Generated file. Do not edit.
11-
* This file is generated by the Flutter tool based on the
12-
* plugins that support the Android platform.
137
*/
14-
@Keep
158
public final class GeneratedPluginRegistrant {
16-
private static final String TAG = "GeneratedPluginRegistrant";
17-
public static void registerWith(@NonNull FlutterEngine flutterEngine) {
9+
public static void registerWith(PluginRegistry registry) {
10+
if (alreadyRegisteredWith(registry)) {
11+
return;
12+
}
13+
}
14+
15+
private static boolean alreadyRegisteredWith(PluginRegistry registry) {
16+
final String key = GeneratedPluginRegistrant.class.getCanonicalName();
17+
if (registry.hasPlugin(key)) {
18+
return true;
19+
}
20+
registry.registrarFor(key);
21+
return false;
1822
}
1923
}

example/lib/icons.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@ final icons = <ExampleIcon>[
370370
ExampleIcon(FontAwesomeIcons.chevronRight, 'chevronRight'),
371371
ExampleIcon(FontAwesomeIcons.chevronUp, 'chevronUp'),
372372
ExampleIcon(FontAwesomeIcons.child, 'child'),
373+
ExampleIcon(FontAwesomeIcons.childDress, 'childDress'),
374+
ExampleIcon(FontAwesomeIcons.childReaching, 'childReaching'),
373375
ExampleIcon(FontAwesomeIcons.childRifle, 'childRifle'),
374376
ExampleIcon(FontAwesomeIcons.children, 'children'),
375377
ExampleIcon(FontAwesomeIcons.chrome, 'chrome'),

lib/font_awesome_flutter.dart

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export 'package:font_awesome_flutter/src/icon_data.dart';
77

88
// THIS FILE IS AUTOMATICALLY GENERATED!
99

10-
/// Icons based on font awesome 6.1.0
10+
/// Icons based on font awesome 6.1.1
1111
class FontAwesomeIcons {
1212
/// Solid 0 icon
1313
///
@@ -2289,6 +2289,16 @@ class FontAwesomeIcons {
22892289
/// https://fontawesome.com/icons/child?style=solid
22902290
static const IconData child = IconDataSolid(0xf1ae);
22912291

2292+
/// Solid Child Dress icon
2293+
///
2294+
/// https://fontawesome.com/icons/child-dress?style=solid
2295+
static const IconData childDress = IconDataSolid(0xe59c);
2296+
2297+
/// Solid Child Reaching icon
2298+
///
2299+
/// https://fontawesome.com/icons/child-reaching?style=solid
2300+
static const IconData childReaching = IconDataSolid(0xe59d);
2301+
22922302
/// Solid Child Rifle icon
22932303
///
22942304
/// https://fontawesome.com/icons/child-rifle?style=solid

lib/fonts/fa-brands-400.ttf

20 Bytes
Binary file not shown.

lib/fonts/fa-regular-400.ttf

44 Bytes
Binary file not shown.

lib/fonts/fa-solid-900.ttf

928 Bytes
Binary file not shown.

lib/src/fa_icon.dart

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ class FaIcon extends StatelessWidget {
2020
///
2121
/// The [size] and [color] default to the value given by the current [IconTheme].
2222
const FaIcon(
23-
this.icon, {
24-
Key? key,
25-
this.size,
26-
this.color,
27-
this.semanticLabel,
28-
this.textDirection,
29-
}) : super(key: key);
23+
this.icon, {
24+
Key? key,
25+
this.size,
26+
this.color,
27+
this.semanticLabel,
28+
this.textDirection,
29+
}) : super(key: key);
3030

3131
/// The icon to display. Available icons are listed in [FontAwesomeIcons].
3232
///
@@ -105,7 +105,8 @@ class FaIcon extends StatelessWidget {
105105
@override
106106
Widget build(BuildContext context) {
107107
assert(this.textDirection != null || debugCheckHasDirectionality(context));
108-
final TextDirection textDirection = this.textDirection ?? Directionality.of(context);
108+
final TextDirection textDirection =
109+
this.textDirection ?? Directionality.of(context);
109110

110111
final IconThemeData iconTheme = IconTheme.of(context);
111112

@@ -125,8 +126,10 @@ class FaIcon extends StatelessWidget {
125126
}
126127

127128
Widget iconWidget = RichText(
128-
overflow: TextOverflow.visible, // Never clip.
129-
textDirection: textDirection, // Since we already fetched it for the assert...
129+
overflow: TextOverflow.visible,
130+
// Never clip.
131+
textDirection: textDirection,
132+
// Since we already fetched it for the assert...
130133
text: TextSpan(
131134
text: String.fromCharCode(icon!.codePoint),
132135
style: TextStyle(
@@ -165,7 +168,8 @@ class FaIcon extends StatelessWidget {
165168
@override
166169
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
167170
super.debugFillProperties(properties);
168-
properties.add(IconDataProperty('icon', icon, ifNull: '<empty>', showName: false));
171+
properties.add(
172+
IconDataProperty('icon', icon, ifNull: '<empty>', showName: false));
169173
properties.add(DoubleProperty('size', size, defaultValue: null));
170174
properties.add(ColorProperty('color', color, defaultValue: null));
171175
}

test/fa_icon_test.dart

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ void main() {
2424
expect(text.text.style!.color, const Color(0xFF666666).withOpacity(0.5));
2525
});
2626

27-
testWidgets('Icon sizing - no theme, default size', (WidgetTester tester) async {
27+
testWidgets('Icon sizing - no theme, default size',
28+
(WidgetTester tester) async {
2829
await tester.pumpWidget(
2930
const Directionality(
3031
textDirection: TextDirection.ltr,
@@ -38,7 +39,8 @@ void main() {
3839
expect(renderObject.size, equals(const Size.square(24.0)));
3940
});
4041

41-
testWidgets('Icon sizing - no theme, explicit size', (WidgetTester tester) async {
42+
testWidgets('Icon sizing - no theme, explicit size',
43+
(WidgetTester tester) async {
4244
await tester.pumpWidget(
4345
const Directionality(
4446
textDirection: TextDirection.ltr,
@@ -72,7 +74,8 @@ void main() {
7274
expect(renderObject.size, equals(const Size.square(36.0)));
7375
});
7476

75-
testWidgets('Icon sizing - sized theme, explicit size', (WidgetTester tester) async {
77+
testWidgets('Icon sizing - sized theme, explicit size',
78+
(WidgetTester tester) async {
7679
await tester.pumpWidget(
7780
const Directionality(
7881
textDirection: TextDirection.ltr,
@@ -92,7 +95,8 @@ void main() {
9295
expect(renderObject.size, equals(const Size.square(48.0)));
9396
});
9497

95-
testWidgets('Icon sizing - sizeless theme, default size', (WidgetTester tester) async {
98+
testWidgets('Icon sizing - sizeless theme, default size',
99+
(WidgetTester tester) async {
96100
await tester.pumpWidget(
97101
const Directionality(
98102
textDirection: TextDirection.ltr,
@@ -109,7 +113,8 @@ void main() {
109113
expect(renderObject.size, equals(const Size.square(24.0)));
110114
});
111115

112-
testWidgets("Changing semantic label from null doesn't rebuild tree ", (WidgetTester tester) async {
116+
testWidgets("Changing semantic label from null doesn't rebuild tree ",
117+
(WidgetTester tester) async {
113118
await tester.pumpWidget(
114119
const Directionality(
115120
textDirection: TextDirection.ltr,
@@ -139,4 +144,4 @@ void main() {
139144
// semanticLabel to make sure the subtree was not rebuilt.
140145
expect(richText2, same(richText1));
141146
});
142-
}
147+
}

0 commit comments

Comments
 (0)