return new Card(
child: new Container(
padding: EdgeInsets.all(10.0),
child: new Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
CircleAvatar(
backgroundColor: Colors.grey,
backgroundImage: new NetworkImage("${document['Picture']}"),
radius: 40.0,
),
SizedBox(
width: 10.0,
),
Column(
children: <Widget>[
Text(document['name']),
Text('subtitle'),
],
)
],
),
),
);
Вы можете использовать что-то вроде этого.
Решил проблему, изменив метод в модели:
public function get_posts_by_author($authorid) {
$this->db->select('posts.*,categories.name as post_category');
$this->db->order_by('posts.id', 'DESC');
$this->db->join('categories', 'posts.cat_id = categories.id', 'inner');
// the line below was changed
$query = $this->db->get_where('posts', array('posts.author_id' => $authorid));
return $query->result();
}