24
This commit is contained in:
51
lib/pages/dashboard/view_book/book_cell.dart
Normal file
51
lib/pages/dashboard/view_book/book_cell.dart
Normal file
@@ -0,0 +1,51 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/src/gestures/events.dart';
|
||||
|
||||
import '../view_books.dart';
|
||||
|
||||
class BookCell extends StatefulWidget {
|
||||
final BookInfo bookInfo;
|
||||
const BookCell({super.key, required this.bookInfo});
|
||||
|
||||
@override
|
||||
State<BookCell> createState() => _BookCellState();
|
||||
}
|
||||
|
||||
class _BookCellState extends State<BookCell> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MouseRegion(
|
||||
onEnter: _onEnter,
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 6),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Center(child: ClipRRect(
|
||||
child: Image.asset(widget.bookInfo.cover),
|
||||
borderRadius:BorderRadius.circular(8)
|
||||
))),
|
||||
const SizedBox(height: 8),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||
child: Text(
|
||||
'${widget.bookInfo.info}',
|
||||
style:
|
||||
TextStyle(fontSize: 12, color: Color(0xff515767)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _onEnter(PointerEnterEvent event) {
|
||||
|
||||
}
|
||||
}
|
||||
37
lib/pages/dashboard/view_book/title_group.dart
Normal file
37
lib/pages/dashboard/view_book/title_group.dart
Normal file
@@ -0,0 +1,37 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TitleGroup extends StatelessWidget {
|
||||
final String title;
|
||||
const TitleGroup({super.key, required this.title});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
const SizedBox(
|
||||
width: 16,
|
||||
),
|
||||
CircleAvatar(
|
||||
radius: 6,
|
||||
),
|
||||
const SizedBox(
|
||||
width: 16,
|
||||
),
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user