From 00f69487e75d0ce7b8cec1e0951cd100dd8dee31 Mon Sep 17 00:00:00 2001 From: Yauhen Landarski Date: Sun, 3 Mar 2024 11:59:25 +0100 Subject: [PATCH] Resolve lint issues --- example/lib/components/blueprint.dart | 4 +- .../engineering_calculator_pad.dart | 8 +-- .../lib/components/interactive_pin_pad.dart | 2 +- example/lib/components/pad_button.dart | 23 ++++---- example/lib/components/pin_pad.dart | 2 +- .../lib/components/simple_calculator_pad.dart | 6 +- .../simple_priority_calculator_pad.dart | 6 +- example/lib/main.dart | 56 +++++++++---------- 8 files changed, 52 insertions(+), 55 deletions(-) diff --git a/example/lib/components/blueprint.dart b/example/lib/components/blueprint.dart index 9def9cc..c2e06d6 100644 --- a/example/lib/components/blueprint.dart +++ b/example/lib/components/blueprint.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import '../theme.dart'; class BlueprintBox extends StatelessWidget { - const BlueprintBox({Key? key}) : super(key: key); + const BlueprintBox({super.key}); @override Widget build(BuildContext context) { @@ -29,7 +29,7 @@ class BlueprintBox extends StatelessWidget { class ContentBlueprintBox extends StatelessWidget { final String text; - const ContentBlueprintBox({Key? key, this.text = ''}) : super(key: key); + const ContentBlueprintBox({super.key, this.text = ''}); @override Widget build(BuildContext context) { diff --git a/example/lib/components/engineering_calculator_pad.dart b/example/lib/components/engineering_calculator_pad.dart index e2d5a6a..7a47243 100644 --- a/example/lib/components/engineering_calculator_pad.dart +++ b/example/lib/components/engineering_calculator_pad.dart @@ -5,7 +5,7 @@ import 'package:grid_pad/grid_pad.dart'; import 'pad_button.dart'; class EngineeringCalculatorPad extends StatelessWidget { - const EngineeringCalculatorPad({Key? key}) : super(key: key); + const EngineeringCalculatorPad({super.key}); @override Widget build(BuildContext context) { @@ -124,7 +124,7 @@ class EngineeringCalculatorPadTheme { class _FunctionTheme extends StatelessWidget { final Widget child; - const _FunctionTheme({Key? key, required this.child}) : super(key: key); + const _FunctionTheme({required this.child}); @override Widget build(BuildContext context) { @@ -144,7 +144,7 @@ class _FunctionTheme extends StatelessWidget { class _ActionTheme extends StatelessWidget { final Widget child; - const _ActionTheme({Key? key, required this.child}) : super(key: key); + const _ActionTheme({required this.child}); @override Widget build(BuildContext context) { @@ -164,7 +164,7 @@ class _ActionTheme extends StatelessWidget { class _RemoveTheme extends StatelessWidget { final Widget child; - const _RemoveTheme({Key? key, required this.child}) : super(key: key); + const _RemoveTheme({required this.child}); @override Widget build(BuildContext context) { diff --git a/example/lib/components/interactive_pin_pad.dart b/example/lib/components/interactive_pin_pad.dart index bfece1e..d6456a5 100644 --- a/example/lib/components/interactive_pin_pad.dart +++ b/example/lib/components/interactive_pin_pad.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'pin_pad.dart'; class InteractivePinPad extends StatefulWidget { - const InteractivePinPad({Key? key}) : super(key: key); + const InteractivePinPad({super.key}); @override State createState() => _InteractivePinPadState(); diff --git a/example/lib/components/pad_button.dart b/example/lib/components/pad_button.dart index 42b26b3..ad804bc 100644 --- a/example/lib/components/pad_button.dart +++ b/example/lib/components/pad_button.dart @@ -7,9 +7,9 @@ class IconPadButton extends StatelessWidget { const IconPadButton( this.iconData, { - Key? key, + super.key, this.onPressed, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -31,9 +31,9 @@ class LargeTextPadButton extends StatelessWidget { const LargeTextPadButton( this.text, { - Key? key, + super.key, this.onPressed, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -51,9 +51,9 @@ class MediumTextPadButton extends StatelessWidget { const MediumTextPadButton( this.text, { - Key? key, + super.key, this.onPressed, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -71,9 +71,9 @@ class SmallTextPadButton extends StatelessWidget { const SmallTextPadButton( this.text, { - Key? key, + super.key, this.onPressed, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -91,11 +91,11 @@ class TextPadButton extends StatelessWidget { final VoidCallback? onPressed; const TextPadButton({ - Key? key, + super.key, required this.text, this.style, this.onPressed, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -115,8 +115,7 @@ class PadButton extends StatelessWidget { final Widget child; final VoidCallback? onPressed; - const PadButton({Key? key, this.onPressed, required this.child}) - : super(key: key); + const PadButton({super.key, this.onPressed, required this.child}); @override Widget build(BuildContext context) { diff --git a/example/lib/components/pin_pad.dart b/example/lib/components/pin_pad.dart index f21c4ea..b850267 100644 --- a/example/lib/components/pin_pad.dart +++ b/example/lib/components/pin_pad.dart @@ -7,7 +7,7 @@ import 'pad_button.dart'; class PinPad extends StatelessWidget { final PadActionCallback? callback; - const PinPad({Key? key, this.callback}) : super(key: key); + const PinPad({super.key, this.callback}); @override Widget build(BuildContext context) { diff --git a/example/lib/components/simple_calculator_pad.dart b/example/lib/components/simple_calculator_pad.dart index 552c5d8..0f7bc3d 100644 --- a/example/lib/components/simple_calculator_pad.dart +++ b/example/lib/components/simple_calculator_pad.dart @@ -5,7 +5,7 @@ import 'package:grid_pad/grid_pad.dart'; import 'pad_button.dart'; class SimpleCalculatorPad extends StatelessWidget { - const SimpleCalculatorPad({Key? key}) : super(key: key); + const SimpleCalculatorPad({super.key}); @override Widget build(BuildContext context) { @@ -105,7 +105,7 @@ extension _ThemeExtension on BuildContext { class _ActionTheme extends StatelessWidget { final Widget child; - const _ActionTheme({Key? key, required this.child}) : super(key: key); + const _ActionTheme({required this.child}); @override Widget build(BuildContext context) { @@ -125,7 +125,7 @@ class _ActionTheme extends StatelessWidget { class _RemoveTheme extends StatelessWidget { final Widget child; - const _RemoveTheme({Key? key, required this.child}) : super(key: key); + const _RemoveTheme({required this.child}); @override Widget build(BuildContext context) { diff --git a/example/lib/components/simple_priority_calculator_pad.dart b/example/lib/components/simple_priority_calculator_pad.dart index 0cb823a..bedf7c4 100644 --- a/example/lib/components/simple_priority_calculator_pad.dart +++ b/example/lib/components/simple_priority_calculator_pad.dart @@ -5,7 +5,7 @@ import 'package:grid_pad/grid_pad.dart'; import 'pad_button.dart'; class SimplePriorityCalculatorPad extends StatelessWidget { - const SimplePriorityCalculatorPad({Key? key}) : super(key: key); + const SimplePriorityCalculatorPad({super.key}); @override Widget build(BuildContext context) { @@ -117,7 +117,7 @@ extension _ThemeExtension on BuildContext { class _ActionTheme extends StatelessWidget { final Widget child; - const _ActionTheme({Key? key, required this.child}) : super(key: key); + const _ActionTheme({required this.child}); @override Widget build(BuildContext context) { @@ -137,7 +137,7 @@ class _ActionTheme extends StatelessWidget { class _RemoveTheme extends StatelessWidget { final Widget child; - const _RemoveTheme({Key? key, required this.child}) : super(key: key); + const _RemoveTheme({required this.child}); @override Widget build(BuildContext context) { diff --git a/example/lib/main.dart b/example/lib/main.dart index 802b37a..427eb4e 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -38,7 +38,7 @@ class MyApp extends StatelessWidget { } class HomePage extends StatelessWidget { - const HomePage({Key? key}) : super(key: key); + const HomePage({super.key}); @override Widget build(BuildContext context) { @@ -52,7 +52,7 @@ class HomePage extends StatelessWidget { } class ListOfPads extends StatelessWidget { - const ListOfPads({Key? key}) : super(key: key); + const ListOfPads({super.key}); @override Widget build(BuildContext context) { @@ -84,10 +84,10 @@ class PadCard extends StatelessWidget { final Widget child; const PadCard({ - Key? key, + super.key, required this.ratio, required this.child, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -112,11 +112,11 @@ class BlueprintCard extends StatelessWidget { final Widget child; const BlueprintCard({ - Key? key, + super.key, this.ratio = 1, this.title, required this.child, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -156,10 +156,10 @@ class WeightGrid extends StatelessWidget { final int columnCount; const WeightGrid({ - Key? key, + super.key, required this.rowCount, required this.columnCount, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -176,7 +176,7 @@ class WeightGrid extends StatelessWidget { } class InteractivePinPadCard extends StatelessWidget { - const InteractivePinPadCard({Key? key}) : super(key: key); + const InteractivePinPadCard({super.key}); @override Widget build(BuildContext context) { @@ -202,7 +202,7 @@ class InteractivePinPadCard extends StatelessWidget { } class EngineeringCalculatorPadCard extends StatelessWidget { - const EngineeringCalculatorPadCard({Key? key}) : super(key: key); + const EngineeringCalculatorPadCard({super.key}); @override Widget build(BuildContext context) { @@ -226,7 +226,7 @@ class EngineeringCalculatorPadCard extends StatelessWidget { } class SimplePriorityCalculatorPadCard extends StatelessWidget { - const SimplePriorityCalculatorPadCard({Key? key}) : super(key: key); + const SimplePriorityCalculatorPadCard({super.key}); @override Widget build(BuildContext context) { @@ -248,7 +248,7 @@ class SimplePriorityCalculatorPadCard extends StatelessWidget { } class SimpleCalculatorPadCard extends StatelessWidget { - const SimpleCalculatorPadCard({Key? key}) : super(key: key); + const SimpleCalculatorPadCard({super.key}); @override Widget build(BuildContext context) { @@ -270,7 +270,7 @@ class SimpleCalculatorPadCard extends StatelessWidget { } class SimpleBlueprintCard extends StatelessWidget { - const SimpleBlueprintCard({Key? key}) : super(key: key); + const SimpleBlueprintCard({super.key}); @override Widget build(BuildContext context) { @@ -285,7 +285,7 @@ class SimpleBlueprintCard extends StatelessWidget { } class CustomSizeBlueprintCard extends StatelessWidget { - const CustomSizeBlueprintCard({Key? key}) : super(key: key); + const CustomSizeBlueprintCard({super.key}); @override Widget build(BuildContext context) { @@ -303,7 +303,7 @@ class CustomSizeBlueprintCard extends StatelessWidget { } class SimpleBlueprintCardWithContent extends StatelessWidget { - const SimpleBlueprintCardWithContent({Key? key}) : super(key: key); + const SimpleBlueprintCardWithContent({super.key}); @override Widget build(BuildContext context) { @@ -331,7 +331,7 @@ class SimpleBlueprintCardWithContent extends StatelessWidget { } class SimpleBlueprintCardWithContentMixOrdering extends StatelessWidget { - const SimpleBlueprintCardWithContentMixOrdering({Key? key}) : super(key: key); + const SimpleBlueprintCardWithContentMixOrdering({super.key}); @override Widget build(BuildContext context) { @@ -367,7 +367,7 @@ class SimpleBlueprintCardWithContentMixOrdering extends StatelessWidget { } class SimpleBlueprintCardWithSpansOverlapped extends StatelessWidget { - const SimpleBlueprintCardWithSpansOverlapped({Key? key}) : super(key: key); + const SimpleBlueprintCardWithSpansOverlapped({super.key}); @override Widget build(BuildContext context) { @@ -411,8 +411,7 @@ class SimpleBlueprintCardPolicy extends StatelessWidget { const SimpleBlueprintCardPolicy( this.mainAxis, this.horizontalPolicy, this.verticalPolicy, - {Key? key}) - : super(key: key); + {super.key}); @override Widget build(BuildContext context) { @@ -448,7 +447,7 @@ class SimpleBlueprintCardPolicy extends StatelessWidget { } class SimpleBlueprintCardPolicyHorizontalSeTb extends StatelessWidget { - const SimpleBlueprintCardPolicyHorizontalSeTb({Key? key}) : super(key: key); + const SimpleBlueprintCardPolicyHorizontalSeTb({super.key}); @override Widget build(BuildContext context) { @@ -461,8 +460,7 @@ class SimpleBlueprintCardPolicyHorizontalSeTb extends StatelessWidget { } class SimpleBlueprintCardPolicyHorizontalSeTbRtl extends StatelessWidget { - const SimpleBlueprintCardPolicyHorizontalSeTbRtl({Key? key}) - : super(key: key); + const SimpleBlueprintCardPolicyHorizontalSeTbRtl({super.key}); @override Widget build(BuildContext context) { @@ -474,7 +472,7 @@ class SimpleBlueprintCardPolicyHorizontalSeTbRtl extends StatelessWidget { } class SimpleBlueprintCardPolicyHorizontalEsTb extends StatelessWidget { - const SimpleBlueprintCardPolicyHorizontalEsTb({Key? key}) : super(key: key); + const SimpleBlueprintCardPolicyHorizontalEsTb({super.key}); @override Widget build(BuildContext context) { @@ -487,7 +485,7 @@ class SimpleBlueprintCardPolicyHorizontalEsTb extends StatelessWidget { } class SimpleBlueprintCardPolicyHorizontalSeBt extends StatelessWidget { - const SimpleBlueprintCardPolicyHorizontalSeBt({Key? key}) : super(key: key); + const SimpleBlueprintCardPolicyHorizontalSeBt({super.key}); @override Widget build(BuildContext context) { @@ -500,7 +498,7 @@ class SimpleBlueprintCardPolicyHorizontalSeBt extends StatelessWidget { } class SimpleBlueprintCardPolicyHorizontalEsBt extends StatelessWidget { - const SimpleBlueprintCardPolicyHorizontalEsBt({Key? key}) : super(key: key); + const SimpleBlueprintCardPolicyHorizontalEsBt({super.key}); @override Widget build(BuildContext context) { @@ -513,7 +511,7 @@ class SimpleBlueprintCardPolicyHorizontalEsBt extends StatelessWidget { } class SimpleBlueprintCardPolicyVerticalSeTb extends StatelessWidget { - const SimpleBlueprintCardPolicyVerticalSeTb({Key? key}) : super(key: key); + const SimpleBlueprintCardPolicyVerticalSeTb({super.key}); @override Widget build(BuildContext context) { @@ -526,7 +524,7 @@ class SimpleBlueprintCardPolicyVerticalSeTb extends StatelessWidget { } class SimpleBlueprintCardPolicyVerticalEsTb extends StatelessWidget { - const SimpleBlueprintCardPolicyVerticalEsTb({Key? key}) : super(key: key); + const SimpleBlueprintCardPolicyVerticalEsTb({super.key}); @override Widget build(BuildContext context) { @@ -539,7 +537,7 @@ class SimpleBlueprintCardPolicyVerticalEsTb extends StatelessWidget { } class SimpleBlueprintCardPolicyVerticalSeBt extends StatelessWidget { - const SimpleBlueprintCardPolicyVerticalSeBt({Key? key}) : super(key: key); + const SimpleBlueprintCardPolicyVerticalSeBt({super.key}); @override Widget build(BuildContext context) { @@ -552,7 +550,7 @@ class SimpleBlueprintCardPolicyVerticalSeBt extends StatelessWidget { } class SimpleBlueprintCardPolicyVerticalEsBt extends StatelessWidget { - const SimpleBlueprintCardPolicyVerticalEsBt({Key? key}) : super(key: key); + const SimpleBlueprintCardPolicyVerticalEsBt({super.key}); @override Widget build(BuildContext context) {