Skip to content

Commit

Permalink
fix analysis issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dnfield committed Oct 11, 2023
1 parent 6527f45 commit c948a41
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/vector_graphics_codec/lib/vector_graphics_codec.dart
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,8 @@ class VectorGraphicsCodec {

// font-family
if (fontFamily != null) {
// Newer versions of Dart will make this a Uint8List and not require the cast.
// ignore: unnecessary_cast
final Uint8List encoded = utf8.encode(fontFamily) as Uint8List;
buffer._putUint16(encoded.length);
buffer._putUint8List(encoded);
Expand All @@ -608,6 +610,8 @@ class VectorGraphicsCodec {
}

// text-value
// Newer versions of Dart will make this a Uint8List and not require the cast.
// ignore: unnecessary_cast
final Uint8List encoded = utf8.encode(text) as Uint8List;
buffer._putUint16(encoded.length);
buffer._putUint8List(encoded);
Expand Down
2 changes: 2 additions & 0 deletions packages/vector_graphics_compiler/lib/src/debug_format.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Uint8List dumpToDebugFormat(Uint8List bytes) {
if (!response.complete) {
codec.decode(bytes.buffer.asByteData(), listener, response: response);
}
// Newer versions of Dart will make this a Uint8List and not require the cast.
// ignore: unnecessary_cast
return utf8.encode(listener.buffer.toString()) as Uint8List;
}

Expand Down
1 change: 0 additions & 1 deletion packages/vector_graphics_compiler/test/cli_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import 'package:flutter_test/flutter_test.dart';
import '../bin/util/isolate_processor.dart';
import '../bin/vector_graphics_compiler.dart' as cli;
import 'package:path/path.dart' as p;
import 'package:collection/collection.dart';

void main() {
final File output = File('test_data/example.vec');
Expand Down

0 comments on commit c948a41

Please sign in to comment.