title: how to make a BuiltList<Post> out of List<RecordSnapshot> in flutter
body: <p>I am trying to use sembast with built value While trying to make a BuiltList out of List I got Stuck </p>
  
  <blockquote>
    <p>The named parameter 'posts' isn't defined.
    Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'posts'.dart(undefined_named_parameter).</p>
  </blockquote>
  
  <p>and also </p>
  
  <blockquote>
    <p>The method 'fromMap' isn't defined for the class 'Post'.
    Try correcting the name to the name of an existing method, or defining a method named 'fromMap'.</p>
  </blockquote>
  
  <pre><code>Future&lt;PostsList&gt; getPostsFromDb() async {
      print('Loading from database');
  
      // post list
      var postsList;
  
      // fetching data
      final recordSnapshots = await _postsStore.find(
        await _db,
      );
  
      // Making a List&lt;Post&gt; out of List&lt;RecordSnapshot&gt;
      if (recordSnapshots.length &gt; 0) {
        postsList = PostsList(
            posts: recordSnapshots.map((snapshot) {
          final post = Post.fromMap(snapshot.value);
          // An ID is a key of a record from the database.
          post.id = snapshot.key;
          return post;
        }).toList());
      }
  
      return postsList;
    }
  </code></pre>
  
  <p><strong>PostList Class</strong></p>
  
  <pre><code>abstract class PostsList implements Built&lt;PostsList, PostsListBuilder&gt; {
    PostsList._();
  
    factory PostsList([updates(PostsListBuilder b)]) = _$PostsList;
  
  
    BuiltList&lt;Post&gt; get posts;
  
    String toJson() {
      return json.encode(serializers.serializeWith(PostsList.serializer, this));
    }
  
    static PostsList fromJson(String jsonString) {
      return serializers.deserializeWith(
          PostsList.serializer, json.decode(jsonString));
    }
  
    static Serializer&lt;PostsList&gt; get serializer =&gt; _$postsListSerializer;
  }
  </code></pre>
  
  <p>got Stuck Please help </p>