Skip to content

Commit

Permalink
style: stricter linting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamizes committed Jan 9, 2022
1 parent 6c07f6d commit e191f64
Show file tree
Hide file tree
Showing 47 changed files with 74 additions and 104 deletions.
15 changes: 9 additions & 6 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import 'package:eo_color/eo_color.dart';
import 'package:eo_color_example/contrast.dart';
import 'package:flutter/material.dart';

import 'contrast.dart';

void main() {
runApp(const ExampleApp());
}
Expand Down Expand Up @@ -70,16 +69,20 @@ class SwatchWidget extends StatelessWidget {

/// Brown swatch.
const SwatchWidget.browns({Key? key})
: this(const Browns(), const Contrast.forBrown(), "Brown", key: key);
: this(const Browns(), const Contrast.forBrown(), 'Brown', key: key);

/// Blue-Grey swatch.
const SwatchWidget.blueGreys({Key? key})
: this(const BlueGreys(), const Contrast.forBlueGrey(), "Blue-Grey",
key: key);
: this(
const BlueGreys(),
const Contrast.forBlueGrey(),
'Blue-Grey',
key: key,
);

/// Grey swatch.
const SwatchWidget.greys({Key? key})
: this(const Greys(), const Contrast.forGrey(), "Grey", key: key);
: this(const Greys(), const Contrast.forGrey(), 'Grey', key: key);

final Swatch _swatch;
// Text contrast colors.
Expand Down
10 changes: 5 additions & 5 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
Expand Down Expand Up @@ -49,7 +49,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.9"
version: "2.1.0"
fake_async:
dependency: transitive
description:
Expand All @@ -73,7 +73,7 @@ packages:
name: lint
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.3"
version: "1.8.1"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -155,7 +155,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.15.0-7.0.dev <3.0.0"
flutter: ">=1.17.0"
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
lint: ^1.5.3
lint: ^1.8.1
2 changes: 1 addition & 1 deletion lib/src/gradient.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:ui';

import 'swatch.dart';
import 'package:eo_color/swatches.dart';

/// Represents a color gradient.
///
Expand Down
6 changes: 2 additions & 4 deletions lib/src/gradient_immut.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import 'dart:ui';

import 'package:eo_color/src/palette.dart';

import 'gradient.dart';
import 'swatch_base.dart';
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

/// Convenience [Gradient] that retrieves immutable lists of colors.
abstract class GradientImmut extends SwatchBase implements Gradient {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/gradient_swatch.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:ui';

import 'gradient.dart';
import 'swatch.dart';
import 'package:eo_color/gradients.dart';
import 'package:eo_color/swatches.dart';

/// A [Gradient] from a [Swatch] instance.
abstract class GradientSwatch implements Gradient {
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/amber/amber_accents.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'amber_accent.dart';

/// Material Design shades of amber accent.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/amber/ambers.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'amber.dart';

/// Material Design shades of amber.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/blue/blue_accents.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'blue_accent.dart';

/// Material Design shades of blue accent.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/blue/blues.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'blue.dart';

/// Material Design shades of blue.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/blue_grey/blue_greys.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'blue_grey.dart';

/// Material Design shades of blue-grey.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/brown/browns.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'brown.dart';

/// Material Design shades of brown.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/cyan/cyan_accents.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'cyan_accent.dart';

/// Material Design shades of cyan accent.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/cyan/cyans.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'cyan.dart';

/// Material Design shades of cyan.
///
/// See also
Expand Down
6 changes: 3 additions & 3 deletions lib/src/material/deep_orange/deep_orange_accents.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'deep_orange_accent.dart';

/// Material Design shades of deep orange accent.
///
/// See also
/// - [deep orange accent](https://api.flutter.dev/flutter/material/Colors/deep orangeAccent-constant.html)
class DeepOrangeAccents extends SwatchBase {
/// Four shades of deep orange accent; the higher the index, the darker the color.
/// Four shades of deep orange accent; the higher the index, the darker the
/// color.
///
/// There are 4 valid indexes
/// - 0, light ≡ 100
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/deep_orange/deep_oranges.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'deep_orange.dart';

/// Material Design shades of deep orange.
///
/// See also
Expand Down
6 changes: 3 additions & 3 deletions lib/src/material/deep_purple/deep_purple_accents.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'deep_purple_accent.dart';

/// Material Design shades of deep purple accent.
///
/// See also
/// - [deep purple accent](https://api.flutter.dev/flutter/material/Colors/deepPurpleAccent-constant.html)
class DeepPurpleAccents extends SwatchBase {
/// Four shades of deep purple accent; the higher the index, the darker the color.
/// Four shades of deep purple accent; the higher the index, the darker the
/// color.
///
/// There are 4 valid indexes
/// - 0, light ≡ 100
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/deep_purple/deep_purples.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'deep_purple.dart';

/// Material Design shades of deep purple.
///
/// See also
Expand Down
4 changes: 2 additions & 2 deletions lib/src/material/grad_of.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../../swatches.dart';
import '../gradient_swatch.dart';
import 'package:eo_color/gradients.dart';
import 'package:eo_color/swatches.dart';

/// The gradient of the shades of a Material Design color.
///
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/green/green_accents.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'green_accent.dart';

/// Material Design shades of green accent.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/green/greens.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'green.dart';

/// Material Design shades of green.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/grey/greys.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'grey.dart';

/// Material Design shades of grey.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/indigo/indigo_accents.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'indigo_accent.dart';

/// Material Design shades of indigo accent.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/indigo/indigos.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'indigo.dart';

/// Material Design shades of indigo.
///
/// See also
Expand Down
2 changes: 1 addition & 1 deletion lib/src/material/light_blue/light_blue.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../../../eo_color.dart';
import 'package:eo_color/palettes.dart';

/// Material Design light blue.
///
Expand Down
6 changes: 3 additions & 3 deletions lib/src/material/light_blue/light_blue_accents.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'light_blue_accent.dart';

/// Material Design shades of light blue accent.
///
/// Equivalence between constructor and shade index
Expand All @@ -13,7 +12,8 @@ import 'light_blue_accent.dart';
/// See also
/// - [light blue accent](https://api.flutter.dev/flutter/material/Colors/lightBlueAccent-constant.html)
class LightBlueAccents extends SwatchBase {
/// Four shades of light blue accent; the higher the index, the darker the color.
/// Four shades of light blue accent; the higher the index, the darker the
/// color.
///
/// There are 4 valid indexes
/// - 0, light ≡ 100
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/light_blue/light_blues.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'light_blue.dart';

/// Material Design shades of light blue.
///
/// See also
Expand Down
6 changes: 3 additions & 3 deletions lib/src/material/light_green/light_green_accents.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'light_green_accent.dart';

/// Material Design shades of light green accent.
///
/// Equivalence between constructor and shade index
Expand All @@ -13,7 +12,8 @@ import 'light_green_accent.dart';
/// See also
/// - [light green accent](https://api.flutter.dev/flutter/material/Colors/lightGreenAccent-constant.html)
class LightGreenAccents extends SwatchBase {
/// Four shades of light green accent; the higher the index, the darker the color.
/// Four shades of light green accent; the higher the index, the darker the
/// color.
///
/// There are 4 valid indexes
/// - 0, light ≡ 100
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/light_green/light_greens.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'light_green.dart';

/// Material Design shades of light green.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/lime/lime_accents.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'lime_accent.dart';

/// Material Design shades of lime accent.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/lime/limes.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'lime.dart';

/// Material Design shades of lime.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/orange/orange_accents.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'orange_accent.dart';

/// Material Design shades of orange accent.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/orange/oranges.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'orange.dart';

/// Material Design shades of orange.
///
/// See also
Expand Down
3 changes: 1 addition & 2 deletions lib/src/material/pink/pink_accents.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:eo_color/palettes.dart';
import 'package:eo_color/swatches.dart';

import 'pink_accent.dart';

/// Material Design shades of pink accent.
///
/// See also
Expand Down
Loading

0 comments on commit e191f64

Please sign in to comment.