Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding operational system icons #118

Merged
merged 1 commit into from
Jan 12, 2024
Merged
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
- feat: add `NesRunningTextLines`.
- feat: add `NesPulser`.
- feat: allow duration to be configured on selection list.
- feat: add `NesIcons.penguin`.
- feat: add `NesIcons.apple`.
- feat: add `NesIcons.windows`.

# 0.12.1
- fix: theme lerp causing error on null access.
Expand Down
12 changes: 12 additions & 0 deletions example/lib/gallery/sections/icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,18 @@ class IconsSection extends StatelessWidget {
data: NesIcons.rotate,
label: 'rotate',
),
_IconEntry(
data: NesIcons.penguin,
label: 'penguin',
),
_IconEntry(
data: NesIcons.apple,
label: 'apple',
),
_IconEntry(
data: NesIcons.windows,
label: 'windows',
),
],
),
],
Expand Down
21 changes: 21 additions & 0 deletions lib/src/widgets/nes_icon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,27 @@ class NesIconCollection {
'8,8;2,-1;5,0;2,-1;2,0;5,-1;2,0;6,-1;3,0;2,-1;1,0;2,-1;7,0;2,-1;7,0;3,-1;4,0;6,-1;1,0;2,-1',
),
);

/// Penguin
late final penguin = NesIconData(
MiniSprite.fromDataString(
'8,8;2,-1;4,0;3,-1;1,0;1,1;2,0;1,1;1,0;2,-1;2,0;2,1;2,0;1,-1;11,0;2,1;5,0;4,1;4,0;4,1;2,0;1,-1;6,0;1,-1',
),
);

/// Apple
late final apple = NesIconData(
MiniSprite.fromDataString(
'8,8;5,-1;1,0;6,-1;1,0;4,-1;6,0;1,-1;3,0;1,1;6,0;1,1;13,0;1,-1;6,0;3,-1;4,0;2,-1',
),
);

/// Windows
late final windows = NesIconData(
MiniSprite.fromDataString(
'8,8;4,0;4,-1;1,0;2,1;4,0;1,-1;1,0;2,1;1,0;2,1;1,0;1,-1;4,0;2,1;1,0;1,-1;1,0;2,1;4,0;1,-1;1,0;2,1;1,0;2,1;1,0;1,-1;4,0;2,1;1,0;4,-1;4,0;1,-1',
),
);
}

/// {@template nes_icon}
Expand Down