mirror of
https://github.com/pd4d10/git-touch.git
synced 2026-05-05 11:19:02 -05:00
@@ -7,26 +7,26 @@ import 'package:provider/provider.dart';
|
||||
import 'package:timeago/timeago.dart' as timeago;
|
||||
|
||||
class CommitItem extends StatelessWidget {
|
||||
final String url;
|
||||
final String avatarUrl;
|
||||
final String avatarLink;
|
||||
final String message;
|
||||
final String author;
|
||||
final DateTime createdAt;
|
||||
final List<Widget> widgets;
|
||||
final String? url;
|
||||
final String? avatarUrl;
|
||||
final String? avatarLink;
|
||||
final String? message;
|
||||
final String? author;
|
||||
final DateTime? createdAt;
|
||||
final List<Widget>? widgets;
|
||||
CommitItem({
|
||||
@required this.url,
|
||||
@required this.avatarUrl,
|
||||
@required this.avatarLink,
|
||||
@required this.message,
|
||||
@required this.author,
|
||||
@required this.createdAt,
|
||||
required this.url,
|
||||
required this.avatarUrl,
|
||||
required this.avatarLink,
|
||||
required this.message,
|
||||
required this.author,
|
||||
required this.createdAt,
|
||||
this.widgets,
|
||||
});
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Provider.of<ThemeModel>(context);
|
||||
return Link(
|
||||
return LinkWidget(
|
||||
url: url,
|
||||
child: Container(
|
||||
padding: CommonStyle.padding,
|
||||
@@ -42,7 +42,7 @@ class CommitItem extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
message,
|
||||
message!,
|
||||
style: TextStyle(
|
||||
fontSize: 17,
|
||||
color: theme.palette.text,
|
||||
@@ -53,17 +53,17 @@ class CommitItem extends StatelessWidget {
|
||||
SizedBox(height: 4),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Text(author,
|
||||
Text(author!,
|
||||
style: TextStyle(
|
||||
fontSize: 15, color: theme.palette.primary)),
|
||||
Text(
|
||||
' committed ${timeago.format(createdAt)}',
|
||||
' committed ${timeago.format(createdAt!)}',
|
||||
style: TextStyle(
|
||||
color: theme.palette.secondaryText,
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
if (widgets != null) ...widgets,
|
||||
if (widgets != null) ...widgets!,
|
||||
],
|
||||
)
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user