Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
version: "1.15.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -26,7 +33,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
version: "1.3.0"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -38,13 +45,13 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
version: "2.1.0"
sdks:
dart: ">=2.2.2 <3.0.0"
dart: ">=2.12.0 <3.0.0"
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A new Flutter project.
version: 1.0.0+1

environment:
sdk: ">=2.1.0 <3.0.0"
sdk: ">=2.12.0 <3.0.0"

dependencies:
flutter:
Expand Down
3 changes: 1 addition & 2 deletions lib/geopattern_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ class FullPainter extends CustomPainter {
Color background;
Pattern pattern;

FullPainter({@required this.pattern, @required this.background})
: assert(pattern != null && background != null);
FullPainter({required this.pattern, required this.background});

@override
void paint(Canvas canvas, Size size) {
Expand Down
10 changes: 5 additions & 5 deletions lib/patterns/chevrons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class Chevrons extends Pattern {
final Color strokeColor;

Chevrons(
{@required this.side,
@required this.nx,
@required this.ny,
@required this.fillColors,
@required this.strokeColor})
{required this.side,
required this.nx,
required this.ny,
required this.fillColors,
required this.strokeColor})
: assert(fillColors.length == nx * ny);

Chevrons.fromHash(String hash)
Expand Down
12 changes: 6 additions & 6 deletions lib/patterns/concentric_circles.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ class ConcentricCircles extends Pattern {
final List<Color> fillColors;

ConcentricCircles(
{@required this.radius,
@required this.strokeWidth,
@required this.nx,
@required this.ny,
@required this.strokeColors,
@required this.fillColors})
{required this.radius,
required this.strokeWidth,
required this.nx,
required this.ny,
required this.strokeColors,
required this.fillColors})
: assert(strokeColors.length == nx * ny),
assert(fillColors.length == nx * ny);

Expand Down
12 changes: 6 additions & 6 deletions lib/patterns/diamonds.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ class Diamonds extends Pattern {
final Color strokeColor;

Diamonds(
{@required this.w,
@required this.h,
@required this.nx,
@required this.ny,
@required this.fillColors,
@required this.strokeColor})
{required this.w,
required this.h,
required this.nx,
required this.ny,
required this.fillColors,
required this.strokeColor})
: assert(fillColors.length == nx * ny);

Diamonds.fromHash(String hash)
Expand Down
10 changes: 5 additions & 5 deletions lib/patterns/hexagons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ class Hexagons extends Pattern {
final double _hexHeight;

Hexagons(
{@required this.side,
@required this.nx,
@required this.ny,
@required this.fillColors,
@required this.strokeColor})
{required this.side,
required this.nx,
required this.ny,
required this.fillColors,
required this.strokeColor})
: assert(fillColors.length == nx * ny),
_hexWidth = side * 2,
_hexHeight = side * sqrt(3);
Expand Down
10 changes: 5 additions & 5 deletions lib/patterns/mosaic_squares.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class MosaicSquares extends Pattern {
final Color strokeColor;

MosaicSquares(
{@required this.side,
@required this.nx,
@required this.ny,
@required this.fillColors,
@required this.strokeColor})
{required this.side,
required this.nx,
required this.ny,
required this.fillColors,
required this.strokeColor})
: assert(fillColors.length == 2 * nx * ny);

MosaicSquares.fromHash(String hash)
Expand Down
10 changes: 5 additions & 5 deletions lib/patterns/nested_squares.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class NestedSquares extends Pattern {
final List<Color> strokeColors;

NestedSquares(
{@required this.side,
@required this.outerside,
@required this.nx,
@required this.ny,
@required this.strokeColors})
{required this.side,
required this.outerside,
required this.nx,
required this.ny,
required this.strokeColors})
: assert(strokeColors.length == nx * ny),
assert(outerside > side);

Expand Down
10 changes: 5 additions & 5 deletions lib/patterns/octagons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class Octagons extends Pattern {
final Color strokeColor;

Octagons(
{@required this.side,
@required this.nx,
@required this.ny,
@required this.fillColors,
@required this.strokeColor})
{required this.side,
required this.nx,
required this.ny,
required this.fillColors,
required this.strokeColor})
: assert(fillColors.length == nx * ny);

Octagons.fromHash(String hash)
Expand Down
12 changes: 6 additions & 6 deletions lib/patterns/overlapping_circles.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ class OverlappingCircles extends Pattern {
final int ny;
final List<Color> fillColors;

OverlappingCircles(
{@required this.radius,
@required this.nx,
@required this.ny,
@required this.fillColors})
: assert(fillColors.length == nx * ny);
OverlappingCircles({
required this.radius,
required this.nx,
required this.ny,
required this.fillColors,
}) : assert(fillColors.length == nx * ny);

OverlappingCircles.fromHash(String hash)
: assert(hash.length == 40),
Expand Down
10 changes: 5 additions & 5 deletions lib/patterns/overlapping_rings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class OverlappingRings extends Pattern {
final List<Color> strokeColors;

OverlappingRings(
{@required this.radius,
@required this.strokeWidth,
@required this.nx,
@required this.ny,
@required this.strokeColors})
{required this.radius,
required this.strokeWidth,
required this.nx,
required this.ny,
required this.strokeColors})
: assert(strokeColors.length == nx * ny);

OverlappingRings.fromHash(String hash)
Expand Down
12 changes: 6 additions & 6 deletions lib/patterns/plaid.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ class Plaid extends Pattern {
final int _ny;

Plaid(
{@required this.horizontalOffsets,
@required this.verticalOffsets,
@required this.horizontalSizes,
@required this.verticalSizes,
@required this.horizontalFillColors,
@required this.verticalFillColors})
{required this.horizontalOffsets,
required this.verticalOffsets,
required this.horizontalSizes,
required this.verticalSizes,
required this.horizontalFillColors,
required this.verticalFillColors})
: _nx = horizontalSizes.length,
_ny = verticalSizes.length,
assert(horizontalFillColors.length == horizontalSizes.length),
Expand Down
10 changes: 5 additions & 5 deletions lib/patterns/plus_signs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class PlusSigns extends Pattern {
final double _midh;

PlusSigns(
{@required this.side,
@required this.nx,
@required this.ny,
@required this.fillColors,
@required this.strokeColor})
{required this.side,
required this.nx,
required this.ny,
required this.fillColors,
required this.strokeColor})
: assert(fillColors.length == nx * ny),
_midl = side / 3,
_midh = 2 * side / 3;
Expand Down
10 changes: 5 additions & 5 deletions lib/patterns/sine_waves.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ class SineWaves extends Pattern {
final double _xoff;

SineWaves(
{@required this.period,
@required this.amplitude,
@required this.strokeOffsets,
@required this.strokeWidth,
@required this.strokeColors})
{required this.period,
required this.amplitude,
required this.strokeOffsets,
required this.strokeWidth,
required this.strokeColors})
: _xoff = (period / 4) * .7,
assert(strokeOffsets.length == strokeColors.length);

Expand Down
10 changes: 5 additions & 5 deletions lib/patterns/squares.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class Squares extends Pattern {
final Color strokeColor;

Squares(
{@required this.side,
@required this.nx,
@required this.ny,
@required this.fillColors,
@required this.strokeColor})
{required this.side,
required this.nx,
required this.ny,
required this.fillColors,
required this.strokeColor})
: assert(fillColors.length == nx * ny);

Squares.fromHash(String hash)
Expand Down
10 changes: 5 additions & 5 deletions lib/patterns/triangles.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ class Triangles extends Pattern {
final double _trih;

Triangles(
{@required this.side,
@required this.nx,
@required this.ny,
@required this.fillColors,
@required this.strokeColor})
{required this.side,
required this.nx,
required this.ny,
required this.fillColors,
required this.strokeColor})
: assert(fillColors.length == nx * ny),
_trih = sqrt(3) * side / 2;

Expand Down
Loading