Skip to content

Commit

Permalink
Add annotated field image (#990)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchdukeTim authored Jan 10, 2025
1 parent 237d21e commit f2450a9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Binary file added images/field25-annotated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion lib/widgets/field_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ enum OfficialField {
chargedUp,
crescendo,
reefscape,
reefscapeAnnotated
}

class FieldImage {
Expand All @@ -22,14 +23,16 @@ class FieldImage {

static List<FieldImage>? _officialFields;

static final FieldImage defaultField = offialFields().last;
static final FieldImage defaultField =
FieldImage.official(OfficialField.reefscape);

static List<FieldImage> offialFields() {
_officialFields ??= [
FieldImage.official(OfficialField.rapidReact),
FieldImage.official(OfficialField.chargedUp),
FieldImage.official(OfficialField.crescendo),
FieldImage.official(OfficialField.reefscape),
FieldImage.official(OfficialField.reefscapeAnnotated),
];
return _officialFields!;
}
Expand Down Expand Up @@ -76,6 +79,16 @@ class FieldImage {
pixelsPerMeter = 200.0;
name = 'Reefscape';
break;
case OfficialField.reefscapeAnnotated:
image = Image.asset(
'images/field25-annotated.png',
fit: BoxFit.contain,
filterQuality: FilterQuality.medium,
);
defaultSize = const ui.Size(3510, 1610);
pixelsPerMeter = 200.0;
name = 'Reefscape';
break;
}
isCustom = false;
extension = 'png';
Expand Down

0 comments on commit f2450a9

Please sign in to comment.