import 'package:flutter/material.dart'; import 'novel_cell.dart'; import 'novel_grid_item.dart'; import 'home_section_view.dart'; import 'home_model.dart'; class NovelFirstHybirdCard extends StatelessWidget { final HomeModule cardInfo; NovelFirstHybirdCard(this.cardInfo); @override Widget build(BuildContext context) { var novels = cardInfo.books; if (novels == null || novels.length < 3) { return Container(); } List children = []; var bottomNovels = novels.sublist(1); bottomNovels.forEach((novel) { children.add(NovelGridItem(novel)); }); return Container( color: Colors.white, child: Column( children: [ HomeSectionView(cardInfo.name), NovelCell(novels[0]), Container( padding: EdgeInsets.fromLTRB(15, 10, 15, 10), child: Wrap(spacing: 15, runSpacing: 15, children: children), ), Container( height: 10, color: Color(0xfff5f5f5), ) ], ), ); } }