Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
rydmike committed May 11, 2023
1 parent ba3cc66 commit 099cdda
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 106 deletions.
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ColorPickerDemo extends StatefulWidget {
const ColorPickerDemo({super.key});

@override
_ColorPickerDemoState createState() => _ColorPickerDemoState();
State<ColorPickerDemo> createState() => _ColorPickerDemoState();
}

class _ColorPickerDemoState extends State<ColorPickerDemo> {
Expand Down Expand Up @@ -46,7 +46,7 @@ class ColorPickerPage extends StatefulWidget {
final ValueChanged<ThemeMode> themeMode;

@override
_ColorPickerPageState createState() => _ColorPickerPageState();
State<ColorPickerPage> createState() => _ColorPickerPageState();
}

class _ColorPickerPageState extends State<ColorPickerPage> {
Expand Down
4 changes: 2 additions & 2 deletions example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852
url_launcher_macos: c04e4fa86382d4f94f6b38f14625708be3ae52e2
path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8
url_launcher_macos: 5335912b679c073563f29d89d33d10d459f95451

PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7

Expand Down
2 changes: 1 addition & 1 deletion lib/src/color_indicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class ColorIndicator extends StatefulWidget {
final Color? borderColor;

@override
_ColorIndicatorState createState() => _ColorIndicatorState();
State<ColorIndicator> createState() => _ColorIndicatorState();
}

class _ColorIndicatorState extends State<ColorIndicator> {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/color_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ class ColorPicker extends StatefulWidget {
static const String _selectWheelAnyLabel = 'Wheel';

@override
_ColorPickerState createState() => _ColorPickerState();
State<ColorPicker> createState() => _ColorPickerState();

/// Show the defined [ColorPicker] in a custom alert dialog.
///
Expand Down
2 changes: 1 addition & 1 deletion lib/src/color_wheel_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class ColorWheelPicker extends StatefulWidget {
final bool shouldRequestsFocus;

@override
_ColorWheelPickerState createState() => _ColorWheelPickerState();
State<ColorWheelPicker> createState() => _ColorWheelPickerState();
}

class _ColorWheelPickerState extends State<ColorWheelPicker> {
Expand Down
14 changes: 8 additions & 6 deletions lib/src/universal_widgets/dry_intrisinic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ class DryIntrinsicWidth extends SingleChildRenderObjectWidget {
});

@override
_RenderDryIntrinsicWidth createRenderObject(BuildContext context) =>
_RenderDryIntrinsicWidth();
RenderDryIntrinsicWidth createRenderObject(BuildContext context) =>
RenderDryIntrinsicWidth();
}

class _RenderDryIntrinsicWidth extends RenderIntrinsicWidth {
/// Compute dry layout for DryIntrinsicWidth.
class RenderDryIntrinsicWidth extends RenderIntrinsicWidth {
@override
Size computeDryLayout(BoxConstraints constraints) {
if (child != null) {
Expand Down Expand Up @@ -58,11 +59,12 @@ class DryIntrinsicHeight extends SingleChildRenderObjectWidget {
});

@override
_RenderDryIntrinsicHeight createRenderObject(BuildContext context) =>
_RenderDryIntrinsicHeight();
RenderDryIntrinsicHeight createRenderObject(BuildContext context) =>
RenderDryIntrinsicHeight();
}

class _RenderDryIntrinsicHeight extends RenderIntrinsicHeight {
/// Compute dry layout for DryIntrinsicHeight.
class RenderDryIntrinsicHeight extends RenderIntrinsicHeight {
@override
Size computeDryLayout(BoxConstraints constraints) {
if (child != null) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/color_code_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class ColorCodeField extends StatefulWidget {
final bool shouldUpdate;

@override
_ColorCodeFieldState createState() => _ColorCodeFieldState();
State<ColorCodeField> createState() => _ColorCodeFieldState();
}

// Color code display and entry field.
Expand Down
16 changes: 8 additions & 8 deletions test/color_indicator_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ void main() {
final WidgetPredicate defaultIndicator = (Widget widget) =>
widget is ColorIndicator &&
widget.onSelect == null &&
widget.onSelectFocus == true &&
widget.isSelected == false &&
widget.selectedRequestsFocus == false &&
widget.onSelectFocus &&
!widget.isSelected &&
!widget.selectedRequestsFocus &&
widget.elevation == 0 &&
widget.selectedIcon == Icons.check &&
widget.color == Colors.blue &&
widget.width == 40 &&
widget.height == 40 &&
widget.borderRadius == 10 &&
widget.hasBorder == false &&
!widget.hasBorder &&
widget.borderColor == null;
expect(find.byWidgetPredicate(defaultIndicator), findsOneWidget);
});
Expand Down Expand Up @@ -63,16 +63,16 @@ void main() {
final WidgetPredicate defaultIndicator = (Widget widget) =>
widget is ColorIndicator &&
widget.onSelect != null &&
widget.onSelectFocus == false &&
widget.isSelected == true &&
widget.selectedRequestsFocus == true &&
!widget.onSelectFocus &&
widget.isSelected &&
widget.selectedRequestsFocus &&
widget.elevation == 2 &&
widget.selectedIcon == Icons.circle &&
widget.color == Colors.red &&
widget.width == 50 &&
widget.height == 35 &&
widget.borderRadius == 5 &&
widget.hasBorder == true &&
widget.hasBorder &&
widget.borderColor == Colors.black;
expect(find.byWidgetPredicate(defaultIndicator), findsOneWidget);
});
Expand Down
Loading

0 comments on commit 099cdda

Please sign in to comment.