part of book_category;


class BookCategoryPage extends StatefulWidget {
  final List <ChapterModel> chapters;
  final String bookId;
  final BookDetailModel bookDetails;
  const BookCategoryPage({
    Key? key,
    required this.chapters,
    required this.bookId,
    required this.bookDetails
  }) : super(key: key);

  @override
  State<BookCategoryPage> createState() => _BookCategoryPageState();
}

class _BookCategoryPageState extends State<BookCategoryPage> {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Expanded(
          child: ListView.builder(
              itemBuilder:(BuildContext context, int index){
                return BuildItem(model: widget.chapters[index],bookId: widget.bookId,bookDetails: widget.bookDetails,);
              },
              itemCount: widget.chapters.length,
          ),
        ),
      ],
    );
  }
}
