<commit_before>import 'package:flutter/material.dart';

import '../../../../core/helpers/time_format_helper.dart';
import '../../../../core/widgets/media_type_icon.dart';
import '../../domain/entities/recent.dart';

class RecentlyAddedDetails extends StatelessWidget {
  final RecentItem recentItem;

  const RecentlyAddedDetails({
    Key key,
    @required this.recentItem,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: [
        Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Text(
              _rowOne(recentItem),
              overflow: TextOverflow.ellipsis,
              style: TextStyle(fontSize: 18),
            ),
            if (recentItem.mediaType != 'movie' &&
                recentItem.mediaType != 'show')
              Text(
                _rowTwo(recentItem),
                overflow: TextOverflow.ellipsis,
                style: TextStyle(fontSize: 15),
              ),
            Text(
              _rowThree(recentItem),
              overflow: TextOverflow.ellipsis,
              style: TextStyle(fontSize: 15),
            ),
          ],
        ),
        Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Text(
              'Added ${TimeFormatHelper.addedAgo(recentItem.addedAt)}',
              overflow: TextOverflow.ellipsis,
              style: TextStyle(
                fontSize: 15,
                color: Colors.grey,
              ),
            ),
            MediaTypeIcon(
              mediaType: recentItem.mediaType,
              iconColor: Colors.grey,
            ),
          ],
        ),
      ],
    );
  }
}

String _rowOne(RecentItem item) {<commit_msg>Switch from addedAgo to timeAgo.<commit_after>import 'package:flutter/material.dart';

import '../../../../core/helpers/time_format_helper.dart';
import '../../../../core/widgets/media_type_icon.dart';
import '../../domain/entities/recent.dart';

class RecentlyAddedDetails extends StatelessWidget {
  final RecentItem recentItem;

  const RecentlyAddedDetails({
    Key key,
    @required this.recentItem,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: [
        Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Text(
              _rowOne(recentItem),
              overflow: TextOverflow.ellipsis,
              style: TextStyle(fontSize: 18),
            ),
            if (recentItem.mediaType != 'movie' &&
                recentItem.mediaType != 'show')
              Text(
                _rowTwo(recentItem),
                overflow: TextOverflow.ellipsis,
                style: TextStyle(fontSize: 15),
              ),
            Text(
              _rowThree(recentItem),
              overflow: TextOverflow.ellipsis,
              style: TextStyle(fontSize: 15),
            ),
          ],
        ),
        Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Text(
              'Added ${TimeFormatHelper.timeAgo(recentItem.addedAt)}',
              overflow: TextOverflow.ellipsis,
              style: TextStyle(
                fontSize: 15,
                color: Colors.grey,
              ),
            ),
            MediaTypeIcon(
              mediaType: recentItem.mediaType,
              iconColor: Colors.grey,
            ),
          ],
        ),
      ],
    );
  }
}

String _rowOne(RecentItem item) {
{'fraction_non_alphanumeric': 0.10757496054708049, 'fraction_numerical': 0.004208311415044713, 'mean_word_length': 1.6409722222222223, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2561892', 'n_tokens_mistral': 1029, 'n_tokens_neox': 978, 'n_words': 178}