Skip to content

Commit

Permalink
style: fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
zeshuaro committed Nov 15, 2023
1 parent 7118193 commit 7e98333
Show file tree
Hide file tree
Showing 64 changed files with 147 additions and 169 deletions.
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
2 changes: 1 addition & 1 deletion lib/color_theme/view/color_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 ColorThemeEditor extends ExpansionPanelItem {
const ColorThemeEditor({Key? key}) : super(key: key);
const ColorThemeEditor({super.key});

@override
String get header => 'Colors';
Expand Down
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 FloatingActionButtonThemeEditor extends ExpansionPanelItem {
const FloatingActionButtonThemeEditor({Key? key}) : super(key: key);
const FloatingActionButtonThemeEditor({super.key});

@override
String get header => 'Floating action button';
Expand Down
2 changes: 1 addition & 1 deletion lib/font/widgets/font_picker.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 FontPicker extends StatelessWidget {
const FontPicker({Key? key, required this.onChanged}) : super(key: key);
const FontPicker({super.key, required this.onChanged});

final ValueChanged<FontData> onChanged;

Expand Down
Loading

0 comments on commit 7e98333

Please sign in to comment.