legacyShims static method

Map<String, String> legacyShims(
  1. ProjectConfig c
)

Compatibility shims written to the v0.3 token folder (core/constants, shared/theme, or theme).

Implementation

static Map<String, String> legacyShims(ProjectConfig c) {
  const prefix = '../design/';
  final files = <String, String>{
    'app_colors.dart': "export '${prefix}tokens/app_colors.dart';\n",
    'app_spacing.dart': "export '${prefix}tokens/app_spacing.dart';\n",
    'app_radius.dart': "export '${prefix}tokens/app_radius.dart';\n",
    'app_text_styles.dart': "export '${prefix}tokens/app_typography.dart';\n",
    'app_durations.dart': "export '${prefix}tokens/app_motion.dart';\n",
    'app_theme.dart': "export '${prefix}themes/app_theme.dart';\n",
  };
  if (c.useGradient) {
    files['app_gradients.dart'] =
        "export '${prefix}tokens/app_gradients.dart';\n";
  }
  return files;
}