Skip to content

Commit

Permalink
Merge pull request gridaco#13 from dmlzj/master
Browse files Browse the repository at this point in the history
custom padding
  • Loading branch information
softmarshmallow authored Aug 10, 2021
2 parents 9cae924 + 24c0388 commit e2cb4c0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/event_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ class TimelineEventDisplay {
class TimelineEventCard extends StatelessWidget {
final Widget title;
final Widget content;
final EdgeInsetsGeometry padding;

TimelineEventCard({required this.title, required this.content});
TimelineEventCard({
required this.title,
required this.content,
this.padding = const EdgeInsets.only(left: 16, top: 12, right: 16, bottom: 20),
});

@override
Widget build(BuildContext context) {
Expand All @@ -52,7 +57,7 @@ class TimelineEventCard extends StatelessWidget {

Widget _buildBody(BuildContext context) {
return Container(
padding: EdgeInsets.only(left: 16, top: 12, right: 16, bottom: 20),
padding: padding,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expand Down

0 comments on commit e2cb4c0

Please sign in to comment.