Skip to content

Commit

Permalink
style: format style
Browse files Browse the repository at this point in the history
  • Loading branch information
tranhieu1998-it committed Oct 2, 2024
1 parent 27a3b4f commit 0c00351
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/src/exporter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class Exporter {
if (frames == null) {
return null;
}
return compute(_exportGif, DataHolder(frames, _maxWidthFrame, _maxHeightFrame));
DataHolder dataHolder = DataHolder(frames, _maxWidthFrame, _maxHeightFrame);
return compute(_exportGif, dataHolder);
}

static Future<List<int>?> _exportGif(DataHolder data) async {
Expand Down Expand Up @@ -97,7 +98,10 @@ class Exporter {
static image.PaletteUint8 _convertPalette(image.Palette palette) {
final newPalette = image.PaletteUint8(palette.numColors, 4);
for (var i = 0; i < palette.numColors; i++) {
newPalette.setRgba(i, palette.getRed(i), palette.getGreen(i), palette.getBlue(i), 255);
num r = palette.getRed(i);
num g = palette.getGreen(i);
num b = palette.getBlue(i);
newPalette.setRgba(i, r, g, b, 255);
}
return newPalette;
}
Expand Down

0 comments on commit 0c00351

Please sign in to comment.