Complete refactor to clean up project
This commit is contained in:
29
lib/features/home/widgets/sheet_list_item.dart
Normal file
29
lib/features/home/widgets/sheet_list_item.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../core/models/sheet.dart';
|
||||
|
||||
/// A list tile displaying a single sheet's information.
|
||||
///
|
||||
/// Shows the sheet name and composer, with tap and long-press handlers.
|
||||
class SheetListItem extends StatelessWidget {
|
||||
final Sheet sheet;
|
||||
final VoidCallback onTap;
|
||||
final VoidCallback onLongPress;
|
||||
|
||||
const SheetListItem({
|
||||
super.key,
|
||||
required this.sheet,
|
||||
required this.onTap,
|
||||
required this.onLongPress,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListTile(
|
||||
title: Text(sheet.name),
|
||||
subtitle: Text(sheet.composerName),
|
||||
onTap: onTap,
|
||||
onLongPress: onLongPress,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user