<commit_before>import 'dart:ui';

import 'package:flutter/material.dart';

class PosterChooser extends StatelessWidget {
  final dynamic item;

  const PosterChooser({
    Key key,
    @required this.item,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return item.mediaType == 'track' || item.mediaType == 'album'
        ? _PosterMusic(
            url: item.posterUrl,
          )
        : _PosterGeneral(
            url: item.posterUrl,
          );
  }
}

class _PosterGeneral extends StatelessWidget {
  final String url;

  _PosterGeneral({
    @required this.url,
  });

  @override
  Widget build(BuildContext context) {
    return AspectRatio(
      aspectRatio: 2 / 3,
      child: ClipRRect(
        borderRadius: BorderRadius.circular(4),
        child: url != null
            ? Image.network(<commit_msg>Add 'track' to music poster check.<commit_after>import 'dart:ui';

import 'package:flutter/material.dart';

class PosterChooser extends StatelessWidget {
  final dynamic item;

  const PosterChooser({
    Key key,
    @required this.item,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return ['artist', 'album', 'track'].contains(item.mediaType)
        ? _PosterMusic(
            url: item.posterUrl,
          )
        : _PosterGeneral(
            url: item.posterUrl,
          );
  }
}

class _PosterGeneral extends StatelessWidget {
  final String url;

  _PosterGeneral({
    @required this.url,
  });

  @override
  Widget build(BuildContext context) {
    return AspectRatio(
      aspectRatio: 2 / 3,
      child: ClipRRect(
        borderRadius: BorderRadius.circular(4),
        child: url != null
            ? Image.network(
{'fraction_non_alphanumeric': 0.10706018518518519, 'fraction_numerical': 0.003472222222222222, 'mean_word_length': 2.5945945945945947, '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': '6870794', 'n_tokens_mistral': 548, 'n_tokens_neox': 530, 'n_words': 125}