Skip to content

Commit

Permalink
chore(deps): update dependency flutter_lints to v3 (#917)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency flutter_lints to v3

* chore(deps): dependencies maintenance

* style: fix linting errors

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Co-authored-by: Joshua Tang <[email protected]>
  • Loading branch information
3 people authored Nov 15, 2023
1 parent f81368c commit 1d14d73
Show file tree
Hide file tree
Showing 69 changed files with 163 additions and 185 deletions.
8 changes: 4 additions & 4 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ packages:
dependency: "direct dev"
description:
name: flutter_lints
sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7
url: "https://pub.dev"
source: hosted
version: "2.0.3"
version: "3.0.1"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -158,10 +158,10 @@ packages:
dependency: transitive
description:
name: lints
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "3.0.0"
logging:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies:
dev_dependencies:
flutter_driver:
sdk: flutter
flutter_lints: 2.0.3
flutter_lints: 3.0.1
flutter_test:
sdk: flutter
integration_test:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:appainter/widgets/widgets.dart';

abstract class AbstractIconThemeEditor<T extends AbstractIconThemeCubit>
extends ExpansionPanelItem {
const AbstractIconThemeEditor({Key? key}) : super(key: key);
const AbstractIconThemeEditor({super.key});

String? get keyPrefix;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';

abstract class AbstractTextStyleEditor<T extends AbstractTextStyleCubit>
extends ExpansionPanelItem {
const AbstractTextStyleEditor({Key? key}) : super(key: key);
const AbstractTextStyleEditor({super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/advanced_theme/views/advanced_editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import 'package:appainter/widgets/widgets.dart';
import 'package:flutter/material.dart';

class AdvancedEditor extends StatelessWidget {
const AdvancedEditor({Key? key}) : super(key: key);
const AdvancedEditor({super.key});

@override
Widget build(BuildContext context) {
Expand Down
8 changes: 4 additions & 4 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ class MyApp extends StatelessWidget {
final AnalyticsRepository analyticsRepo;

const MyApp({
Key? key,
super.key,
required this.homeRepo,
required this.fontRepo,
required this.analyticsRepo,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -206,7 +206,7 @@ class MyApp extends StatelessWidget {
}

class _MaterialApp extends StatefulWidget {
const _MaterialApp({Key? key}) : super(key: key);
const _MaterialApp();

@override
State<_MaterialApp> createState() => _MaterialAppState();
Expand Down Expand Up @@ -238,7 +238,7 @@ class _MaterialAppState extends State<_MaterialApp> {
}

class _LoadingPage extends StatelessWidget {
const _LoadingPage({Key? key}) : super(key: key);
const _LoadingPage();

@override
Widget build(BuildContext context) {
Expand Down
24 changes: 12 additions & 12 deletions lib/app_bar_theme/view/app_bar_theme_editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

class AppBarThemeEditor extends ExpansionPanelItem {
const AppBarThemeEditor({Key? key}) : super(key: key);
const AppBarThemeEditor({super.key});

@override
String get header => 'App bar';
Expand Down Expand Up @@ -51,7 +51,7 @@ class AppBarThemeEditor extends ExpansionPanelItem {
}

class _BackgroundColorPicker extends StatelessWidget {
const _BackgroundColorPicker({Key? key}) : super(key: key);
const _BackgroundColorPicker();

@override
Widget build(BuildContext context) {
Expand All @@ -73,7 +73,7 @@ class _BackgroundColorPicker extends StatelessWidget {
}

class _ForegroundColorPicker extends StatelessWidget {
const _ForegroundColorPicker({Key? key}) : super(key: key);
const _ForegroundColorPicker();

@override
Widget build(BuildContext context) {
Expand All @@ -95,7 +95,7 @@ class _ForegroundColorPicker extends StatelessWidget {
}

class _ElevationTextField extends StatelessWidget {
const _ElevationTextField({Key? key}) : super(key: key);
const _ElevationTextField();

@override
Widget build(BuildContext context) {
Expand All @@ -119,7 +119,7 @@ class _ElevationTextField extends StatelessWidget {
}

class _ShadowColorPicker extends StatelessWidget {
const _ShadowColorPicker({Key? key}) : super(key: key);
const _ShadowColorPicker();

@override
Widget build(BuildContext context) {
Expand All @@ -140,7 +140,7 @@ class _ShadowColorPicker extends StatelessWidget {
}

class _CenterTitleSwitch extends StatelessWidget {
const _CenterTitleSwitch({Key? key}) : super(key: key);
const _CenterTitleSwitch();

@override
Widget build(BuildContext context) {
Expand All @@ -164,7 +164,7 @@ class _CenterTitleSwitch extends StatelessWidget {
}

class _TitleSpacingTextField extends StatelessWidget {
const _TitleSpacingTextField({Key? key}) : super(key: key);
const _TitleSpacingTextField();

@override
Widget build(BuildContext context) {
Expand All @@ -189,7 +189,7 @@ class _TitleSpacingTextField extends StatelessWidget {
}

class _ToolBarHeightTextField extends StatelessWidget {
const _ToolBarHeightTextField({Key? key}) : super(key: key);
const _ToolBarHeightTextField();

@override
Widget build(BuildContext context) {
Expand All @@ -215,7 +215,7 @@ class _ToolBarHeightTextField extends StatelessWidget {

class _ActionsIconThemeCard
extends AbstractIconThemeEditor<AppBarActionsIconThemeCubit> {
const _ActionsIconThemeCard({Key? key}) : super(key: key);
const _ActionsIconThemeCard({super.key});

@override
String get keyPrefix => 'appBarThemeEditor_actionsIconThemeCard';
Expand All @@ -233,7 +233,7 @@ class _ActionsIconThemeCard
}

class _IconThemeCard extends AbstractIconThemeEditor<AppBarIconThemeCubit> {
const _IconThemeCard({Key? key}) : super(key: key);
const _IconThemeCard({super.key});

@override
String get keyPrefix => 'appBarThemeEditor_iconThemeCard';
Expand All @@ -252,7 +252,7 @@ class _IconThemeCard extends AbstractIconThemeEditor<AppBarIconThemeCubit> {

class _TitleTextStyleCard
extends AbstractTextStyleEditor<AppBarTitleTextStyleCubit> {
const _TitleTextStyleCard({Key? key}) : super(key: key);
const _TitleTextStyleCard({super.key});

@override
String get header => 'Title text style';
Expand All @@ -263,7 +263,7 @@ class _TitleTextStyleCard

class _ToolbarTextStyleCard
extends AbstractTextStyleEditor<AppBarToolbarTextStyleCubit> {
const _ToolbarTextStyleCard({Key? key}) : super(key: key);
const _ToolbarTextStyleCard({super.key});

@override
String get header => 'Toolbar text style';
Expand Down
6 changes: 3 additions & 3 deletions lib/app_bar_theme/widgets/system_overlay_style_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class SystemOverlayStyleCard extends ExpansionPanelItem {
}

class _StatusBarColorPicker extends StatelessWidget {
const _StatusBarColorPicker({Key? key}) : super(key: key);
const _StatusBarColorPicker();

@override
Widget build(BuildContext context) {
Expand All @@ -52,7 +52,7 @@ class _StatusBarColorPicker extends StatelessWidget {
}

class _StatusBarBrightnessDropdown extends StatelessWidget {
const _StatusBarBrightnessDropdown({Key? key}) : super(key: key);
const _StatusBarBrightnessDropdown();

@override
Widget build(BuildContext context) {
Expand All @@ -78,7 +78,7 @@ class _StatusBarBrightnessDropdown extends StatelessWidget {
}

class _StatusBarIconBrightnessDropdown extends StatelessWidget {
const _StatusBarIconBrightnessDropdown({Key? key}) : super(key: key);
const _StatusBarIconBrightnessDropdown();

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/basic_theme/view/basic_theme_editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

class BasicThemeEditor extends StatelessWidget {
const BasicThemeEditor({Key? key}) : super(key: key);
const BasicThemeEditor({super.key});

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

class BottomNavigationBarThemeEditor extends ExpansionPanelItem {
const BottomNavigationBarThemeEditor({Key? key}) : super(key: key);
const BottomNavigationBarThemeEditor({super.key});

@override
String get header => 'Bottom navigation bar';
Expand Down Expand Up @@ -213,7 +213,7 @@ class _ElevationTextField extends StatelessWidget {

class _LabelTextStyleCard
extends AbstractTextStyleEditor<BottomNavigationBarLabelTextStyleCubit> {
const _LabelTextStyleCard({Key? key}) : super(key: key);
const _LabelTextStyleCard({super.key});

@override
String get header => 'Label text style';
Expand All @@ -224,7 +224,7 @@ class _LabelTextStyleCard

class _UnselectedLabelTextStyleCard extends AbstractTextStyleEditor<
BottomNavigationBarUnselectedLabelTextStyleCubit> {
const _UnselectedLabelTextStyleCard({Key? key}) : super(key: key);
const _UnselectedLabelTextStyleCard({super.key});

@override
String get header => 'Unselected label text style';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';

abstract class AbstractButtonStyleEditor<T extends AbstractButtonStyleCubit>
extends ExpansionPanelItem {
const AbstractButtonStyleEditor({Key? key}) : super(key: key);
const AbstractButtonStyleEditor({super.key});

Widget buildBackgroundColorPickers(BuildContext context);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import 'package:appainter/button_theme/button_theme.dart';
import 'package:appainter/color_theme/color_theme.dart';
import 'package:flutter/material.dart';

abstract class AbstractFlatButtonStyleCubit extends AbstractButtonStyleCubit {
AbstractFlatButtonStyleCubit({required ColorThemeCubit colorThemeCubit})
: super(colorThemeCubit: colorThemeCubit);
AbstractFlatButtonStyleCubit({required super.colorThemeCubit});

void backgroundColorChanged(Color color) {
emitWithButtonStyle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
abstract class AbstractFlatButtonStyleEditor<
T extends AbstractFlatButtonStyleCubit>
extends AbstractButtonStyleEditor<T> {
const AbstractFlatButtonStyleEditor({Key? key}) : super(key: key);
const AbstractFlatButtonStyleEditor({super.key});

@override
Color fallbackForegroundDefaultColor(ColorScheme colorScheme) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import 'package:appainter/button_theme/button_theme.dart';
import 'package:appainter/color_theme/color_theme.dart';
import 'package:flutter/material.dart';

class ElevatedButtonThemeCubit extends AbstractButtonStyleCubit {
ElevatedButtonThemeCubit({required ColorThemeCubit colorThemeCubit})
: super(colorThemeCubit: colorThemeCubit);
ElevatedButtonThemeCubit({required super.colorThemeCubit});

@override
OutlinedBorder get defaultShape {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ElevatedButtonThemeEditor
extends AbstractButtonStyleEditor<ElevatedButtonThemeCubit> {
static const _baseElevation = 2.0;

const ElevatedButtonThemeEditor({Key? key}) : super(key: key);
const ElevatedButtonThemeEditor({super.key});

@override
Color fallbackForegroundDefaultColor(ColorScheme colorScheme) {
Expand Down
10 changes: 5 additions & 5 deletions lib/button_theme/models/outlined_border_enum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ class OutlinedBorderEnum extends EnumModel<OutlinedBorder> {
@override
String? convertToString(OutlinedBorder? value) {
switch (value.runtimeType) {
case BeveledRectangleBorder:
case const (BeveledRectangleBorder):
return 'Beveled rectangle';
case CircleBorder:
case const (CircleBorder):
return 'Circle';
case ContinuousRectangleBorder:
case const (ContinuousRectangleBorder):
return 'Continuous rectangle';
case RoundedRectangleBorder:
case const (RoundedRectangleBorder):
return 'Rounded rectangle';
case StadiumBorder:
case const (StadiumBorder):
return 'Stadium';
default:
return null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import 'package:appainter/button_theme/button_theme.dart';
import 'package:appainter/color_theme/color_theme.dart';
import 'package:flutter/material.dart';

class OutlinedButtonThemeCubit extends AbstractFlatButtonStyleCubit {
OutlinedButtonThemeCubit({required ColorThemeCubit colorThemeCubit})
: super(colorThemeCubit: colorThemeCubit);
OutlinedButtonThemeCubit({required super.colorThemeCubit});

@override
OutlinedBorder get defaultShape {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import 'package:appainter/button_theme/button_theme.dart';
import 'package:flutter/material.dart';

class OutlinedButtonThemeEditor
extends AbstractFlatButtonStyleEditor<OutlinedButtonThemeCubit> {
const OutlinedButtonThemeEditor({Key? key}) : super(key: key);
const OutlinedButtonThemeEditor({super.key});

@override
String get header => 'Outlined button';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import 'package:appainter/button_theme/button_theme.dart';
import 'package:appainter/color_theme/color_theme.dart';
import 'package:flutter/material.dart';

class TextButtonThemeCubit extends AbstractFlatButtonStyleCubit {
TextButtonThemeCubit({required ColorThemeCubit colorThemeCubit})
: super(colorThemeCubit: colorThemeCubit);
TextButtonThemeCubit({required super.colorThemeCubit});

@override
OutlinedBorder get defaultShape {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import 'package:appainter/button_theme/button_theme.dart';
import 'package:flutter/material.dart';

class TextButtonThemeEditor
extends AbstractFlatButtonStyleEditor<TextButtonThemeCubit> {
const TextButtonThemeEditor({Key? key}) : super(key: key);
const TextButtonThemeEditor({super.key});

@override
String get header => 'Text button';
Expand Down
2 changes: 1 addition & 1 deletion lib/checkbox_theme/view/checkbox_theme_editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

class CheckboxThemeEditor extends ExpansionPanelItem {
const CheckboxThemeEditor({Key? key}) : super(key: key);
const CheckboxThemeEditor({super.key});

@override
String get header => 'Checkbox';
Expand Down
Loading

0 comments on commit 1d14d73

Please sign in to comment.