12345678910111213141516171819202122232425262728293031323334353637 |
- import 'package:flutter/material.dart';
- import 'package:shuqi/public.dart';
- class BookshelfItemView extends StatelessWidget {
- final Novel novel;
- BookshelfItemView(this.novel);
- @override
- Widget build(BuildContext context) {
- var width = (Screen.width - 15 * 2 - 24 * 2) / 3;
- return GestureDetector(
- onTap: () {
- AppNavigator.pushNovelDetail(context, novel);
- },
- child: Container(
- width: width,
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- DecoratedBox(
- child: NovelCoverImage(
- novel.imgUrl,
- width: width,
- height: width / 0.75,
- ),
- decoration: BoxDecoration(boxShadow: [BoxShadow(color: Color(0x22000000), blurRadius: 5)]),
- ),
- SizedBox(height: 10),
- Text(novel.name, style: TextStyle(fontSize: 14), maxLines: 1, overflow: TextOverflow.ellipsis),
- SizedBox(height: 25),
- ],
- ),
- ),
- );
- }
- }
|