diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b763cb..44f8886 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## 10.8.0 * Upgrade to Font Awesome 6.6.0 +* Fix linter warnings ## 10.7.0 * Upgrade to Font Awesome 6.5.1 diff --git a/example/lib/main.dart b/example/lib/main.dart index 970340c..016fe9e 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -8,7 +8,7 @@ void main() { } class FontAwesomeGalleryApp extends StatelessWidget { - const FontAwesomeGalleryApp({Key? key}) : super(key: key); + const FontAwesomeGalleryApp({super.key}); @override Widget build(BuildContext context) { @@ -26,7 +26,7 @@ class FontAwesomeGalleryApp extends StatelessWidget { } class FontAwesomeGalleryHome extends StatefulWidget { - const FontAwesomeGalleryHome({Key? key}) : super(key: key); + const FontAwesomeGalleryHome({super.key}); @override State createState() => FontAwesomeGalleryHomeState(); diff --git a/lib/font_awesome_flutter.dart b/lib/font_awesome_flutter.dart index 9a57adb..3555644 100644 --- a/lib/font_awesome_flutter.dart +++ b/lib/font_awesome_flutter.dart @@ -1,4 +1,4 @@ -library font_awesome_flutter; +library; import 'package:flutter/widgets.dart'; import 'package:font_awesome_flutter/src/icon_data.dart'; diff --git a/lib/src/fa_icon.dart b/lib/src/fa_icon.dart index 42c299f..a774018 100644 --- a/lib/src/fa_icon.dart +++ b/lib/src/fa_icon.dart @@ -22,13 +22,13 @@ class FaIcon extends StatelessWidget { /// The [size] and [color] default to the value given by the current [IconTheme]. const FaIcon( this.icon, { - Key? key, + super.key, this.size, this.color, this.semanticLabel, this.textDirection, this.shadows, - }) : super(key: key); + }); /// The icon to display. Available icons are listed in [FontAwesomeIcons]. /// diff --git a/lib/src/icon_data.dart b/lib/src/icon_data.dart index b3db429..66711cc 100644 --- a/lib/src/icon_data.dart +++ b/lib/src/icon_data.dart @@ -1,4 +1,4 @@ -library font_awesome_flutter; +library; import 'package:flutter/widgets.dart'; @@ -6,9 +6,8 @@ import 'package:flutter/widgets.dart'; /// /// Code points can be obtained from fontawesome.com class IconDataBrands extends IconData { - const IconDataBrands(int codePoint) + const IconDataBrands(super.codePoint) : super( - codePoint, fontFamily: 'FontAwesomeBrands', fontPackage: 'font_awesome_flutter', ); @@ -18,9 +17,8 @@ class IconDataBrands extends IconData { /// /// Code points can be obtained from fontawesome.com class IconDataSolid extends IconData { - const IconDataSolid(int codePoint) + const IconDataSolid(super.codePoint) : super( - codePoint, fontFamily: 'FontAwesomeSolid', fontPackage: 'font_awesome_flutter', ); @@ -30,9 +28,8 @@ class IconDataSolid extends IconData { /// /// Code points can be obtained from fontawesome.com class IconDataRegular extends IconData { - const IconDataRegular(int codePoint) + const IconDataRegular(super.codePoint) : super( - codePoint, fontFamily: 'FontAwesomeRegular', fontPackage: 'font_awesome_flutter', ); @@ -43,9 +40,8 @@ class IconDataRegular extends IconData { /// /// Code points can be obtained from fontawesome.com class IconDataLight extends IconData { - const IconDataLight(int codePoint) + const IconDataLight(super.codePoint) : super( - codePoint, fontFamily: 'FontAwesomeLight', fontPackage: 'font_awesome_flutter', ); @@ -63,9 +59,8 @@ class IconDataDuotone extends IconData { /// but has to be an [IconData] object. final IconData? secondary; - const IconDataDuotone(int codePoint, {this.secondary}) + const IconDataDuotone(super.codePoint, {this.secondary}) : super( - codePoint, fontFamily: 'FontAwesomeDuotone', fontPackage: 'font_awesome_flutter', ); @@ -76,9 +71,8 @@ class IconDataDuotone extends IconData { /// /// Code points can be obtained from fontawesome.com class IconDataThin extends IconData { - const IconDataThin(int codePoint) + const IconDataThin(super.codePoint) : super( - codePoint, fontFamily: 'FontAwesomeThin', fontPackage: 'font_awesome_flutter', );