NiKoTron / dart-tags

ID3 Tag parser written on the pure dart language.
https://pub.dartlang.org/packages/dart_tags
MIT License
37 stars 16 forks source link

Can't set null tags #23

Closed moda20 closed 4 years ago

moda20 commented 4 years ago

Describe the bug i can't find a way to set tags as null like album or artist, i always et the error "The getter 'length' was called on null."

Environment

To Reproduce Steps to reproduce the behavior:

  1. do exactly the same as the tests
  2. set a tag to null
  3. witness the error

Expected behavior being able to set tags to null Additional context the error in full :

E/flutter ( 5639): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: NoSuchMethodError: The getter 'length' was called on null.
E/flutter ( 5639): Receiver: null
E/flutter ( 5639): Tried calling: length
E/flutter ( 5639): #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
E/flutter ( 5639): #1      Utf8Encoder.convert (dart:convert/utf.dart:88:31)
E/flutter ( 5639): #2      Codec.encode (dart:convert/codec.dart:21:32)
E/flutter ( 5639): #3      DefaultFrame.encode (package:dart_tags/src/frames/id3v2/default_frame.dart:19:25)
E/flutter ( 5639): #4      ID3V2Writer.prepareTag.<anonymous closure> (package:dart_tags/src/writers/id3v2.dart:29:31)
E/flutter ( 5639): #5      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
E/flutter ( 5639): #6      ID3V2Writer.prepareTag (package:dart_tags/src/writers/id3v2.dart:17:14)
E/flutter ( 5639): #7      Writer.write (package:dart_tags/src/writers/writer.dart:13:59)