finalGoldenName method

String finalGoldenName(
  1. String givenGoldenName,
  2. bool darkTheme,
  3. String dimension
)

Generates the golden picture file name depending on the variant

Implementation

String finalGoldenName(
  String givenGoldenName,
  bool darkTheme,
  String dimension,
) {
  final name = givenGoldenName.split('.png')[0];
  final ext = givenGoldenName.split('.png')[1];
  return '${name}_${dimension}_${darkTheme ? '_dark' : ''}.${ext.isEmpty ? 'png' : ext}';
}