Skip to content

deps: drop flutter_svg in favor of PNG agent logos (shrink blast radius) #23

Description

@leduckhc

Summary

flutter_svg is used for a single purpose: rendering the 3 static agent logos (pi, codex, claude) at a fixed 40×40 on the home screen. It drags in a codec subtree:

flutter_svg → vector_graphics + vector_graphics_codec + vector_graphics_compiler

Since the logos are static and fixed-size, pre-rendering them as PNG (@2x/@3x) lets us drop flutter_svg and its ~3-package subtree, reducing the dependency blast radius (159 packages today; 20 direct).

Confirmed non-usage (safe to drop)

Audited during the CI-speedup work — flutter_svg is not used for anything else:

  • Splash screenflutter_native_splash uses a PNG (assets/makit-splash-mark.png), baked into native launch screens at build time. No runtime SVG.
  • Animated brand mark (MakitClapMark "Clap loop") → pure CustomPainter + AnimationController. No SVG.
  • No animation packages (lottie/rive) in the tree.
  • Only consumer: app/lib/ui/home/home_screen.dart (SvgPicture.asset, logos map at ~L435).

Work

  • Export assets/agents/{pi,codex,claude}.svg → PNG at @1x/@2x/@3x (40px base) into assets/agents/.
  • Replace SvgPicture.asset(asset, ...) with Image.asset(asset, ...) in home_screen.dart; update the pi/codex/claude asset paths from .svg.png.
  • Add the @2x/@3x variants to pubspec.yaml assets (or rely on Flutter's resolution-aware asset resolution).
  • Remove flutter_svg from pubspec.yaml; flutter pub get; verify vector_graphics* leave pubspec.lock.
  • flutter analyze --fatal-infos clean; visually verify logos on the home screen (light + dark).

Tradeoff / non-goal

  • Lose vector scalability for the logos — acceptable since they render at a fixed 40×40.
  • http stays in the tree (also pulled by timezone via flutter_local_notifications), so this does not remove http.
  • Modest win (~4 packages); flutter_svg is flutter.dev-published and low-risk, so this is hygiene, not urgent.

Context: raised while auditing deps during the CI-speedup PR (#22). Deferred out of that PR to keep it focused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions