mirror of
https://github.com/feeddeck/feeddeck.git
synced 2026-05-05 10:38:28 -05:00
Initial commit
This commit is contained in:
46
app/lib/widgets/item/preview/item_preview_github.dart
Normal file
46
app/lib/widgets/item/preview/item_preview_github.dart
Normal file
@@ -0,0 +1,46 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:feeddeck/models/item.dart';
|
||||
import 'package:feeddeck/models/source.dart';
|
||||
import 'package:feeddeck/widgets/item/preview/utils/details.dart';
|
||||
import 'package:feeddeck/widgets/item/preview/utils/item_actions.dart';
|
||||
import 'package:feeddeck/widgets/item/preview/utils/item_description.dart';
|
||||
import 'package:feeddeck/widgets/item/preview/utils/item_source.dart';
|
||||
import 'package:feeddeck/widgets/item/preview/utils/item_title.dart';
|
||||
|
||||
class ItemPreviewGithub extends StatelessWidget {
|
||||
const ItemPreviewGithub({
|
||||
super.key,
|
||||
required this.item,
|
||||
required this.source,
|
||||
});
|
||||
|
||||
final FDItem item;
|
||||
final FDSource source;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ItemActions(
|
||||
item: item,
|
||||
onTap: () => openDetails(context, item),
|
||||
children: [
|
||||
ItemSource(
|
||||
sourceTitle: item.author ?? '',
|
||||
sourceSubtitle: '${source.type.toLocalizedString()}: ${source.title}',
|
||||
sourceType: source.type,
|
||||
sourceIcon: item.media,
|
||||
itemPublishedAt: item.publishedAt,
|
||||
itemIsRead: item.isRead,
|
||||
),
|
||||
ItemTitle(
|
||||
itemTitle: item.title,
|
||||
),
|
||||
ItemDescription(
|
||||
itemDescription: item.description,
|
||||
sourceFormat: DescriptionFormat.plain,
|
||||
tagetFormat: DescriptionFormat.plain,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user