title: How to make inheritance hierarchy for Type Converter of Dart Floor?
body: <p>As below, I define <code>ListConverter&lt;T&gt;</code> to make inheritance hierarchy.</p>
  <pre><code>abstract class ListConverter&lt;T&gt; extends TypeConverter&lt;List&lt;T&gt;, String&gt; {
    static const delimiter = &quot;!DELIMITER!&quot;;
  
    T fromDB(String databaseValue);
  
    String toDB(T value);
  
    @override
    List&lt;T&gt; decode(String databaseValue) {
      return databaseValue
          .split(delimiter)
          .where((element) =&gt; element.isNotEmpty)
          .map((e) =&gt; fromDB(e))
          .toList();
    }
  
    @override
    String encode(List&lt;T&gt; value) {
      return value.map((e) =&gt; toDB(e)).join(delimiter);
    }
  }
  </code></pre>
  <p>Using <code>ListConverter&lt;T&gt;</code>, I implement <code>IntListConverter</code>.</p>
  <pre><code>class IntListConverter extends ListConverter&lt;int&gt; {
    @override
    int fromDB(String databaseValue) {
      return int.parse(databaseValue);
    }
  
    @override
    String toDB(int value) {
      return value.toString();
    }
  }
  </code></pre>
  <p>My plan was to use <code>ListConverter&lt;T&gt;</code> also on <code>StringListConverter</code>, etc.
  But unfortunately, I got this error message while running <code>floor_generator</code>.</p>
  <blockquote>
  <p>[SEVERE] floor_generator:floor_generator on lib/persistence/db/app_database.dart:
  Only classes that inherit from TypeConverter can be used as type converters. Make sure use a class that inherits from TypeConverter.</p>
  </blockquote>
  <p>I know that Hierarchy (B) works well, but I want to build (A) structure for managing other list converters.</p>
  <ul>
  <li>(A) <code>TypeConverter -&gt; ListConverter -&gt; IntListConverter</code></li>
  <li>(B) <code>TypeConverter -&gt; IntListConverter</code></li>
  </ul>
  <p><strong>How to make inheritance hierarchy for Type Converter of Dart Floor?</strong></p>