Skip to content

Commit

Permalink
feat: adding copy and paste icons (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
erickzanardo authored Sep 12, 2023
1 parent 623a0cb commit 1055433
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
- fix: `NesDialog` allows a generic to be informed.
- feat: add `NesIcons.cut`
- feat: add `NesIcons.eraser`
- feat: add `NesIcons.copy`
- feat: add `NesIcons.paste`

# 0.8.0
- feat: add `NesIcons.leftHand`
Expand Down
8 changes: 8 additions & 0 deletions example/lib/gallery/sections/icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ class IconsSection extends StatelessWidget {
data: NesIcons.instance.eraser,
label: 'eraser',
),
_IconEntry(
data: NesIcons.instance.copy,
label: 'copy',
),
_IconEntry(
data: NesIcons.instance.paste,
label: 'paste',
),
],
),
],
Expand Down
14 changes: 14 additions & 0 deletions lib/src/widgets/nes_icon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,20 @@ class NesIcons {
'8,8;4,-1;1,0;6,-1;3,0;4,-1;5,0;2,-1;1,0;1,-1;6,0;3,-1;3,0;2,-1;1,0;3,-1;1,0;4,-1;3,0;3,-1;8,0',
),
);

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

///Paste
late final paste = NesIconData(
MiniSprite.fromDataString(
'8,8;3,-1;2,0;4,-1;6,0;1,-1;1,0;1,1;4,0;1,1;2,0;6,1;2,0;6,1;2,0;6,1;2,0;6,1;9,0',
),
);
}

/// {@template nes_icon}
Expand Down

0 comments on commit 1055433

Please sign in to comment.