Updating Icons

WestJet

Technical Information

Software Used:

  • Flutter/Dart

Date:

  • December 2025 – February 2026

Client:

WestJet

Introduction

Monika Szucs at WestJet helped with updating the icons to SVG icons using AppAssets within Flutter. This approach created a cleaner and more scalable icon management system. By centralizing assets in a dedicated AppAssets class, the team eliminated error-prone string paths and ensured type safety. This results in a more maintainable codebase with crisp, resolution-independent icons that perform reliably across all devices.

Process

1. Installing and Setting Up the AppAssets Widget
First, we installed and configured the flutter_svg package via pubspec.yaml. Then, we created a centralized Dart class  to define all icon paths as static constants. This class was structured to provide type-safe, autocomplete-friendly references for every SVG asset, replacing manual string paths.

2. Finding All Icons and Replacing Them with AppAssets References
We conducted a comprehensive audit of the codebase using search tools to locate all existing icon implementations (e.g., Image.asset(), Icon() calls with local assets). Each instance was systematically replaced with references to the new AppAssets class, ensuring consistent asset loading across the application.

3. Communicating with the Design Team on Missing Assets or Layout Changes
During the migration, we compiled a list of any icons that were missing, inconsistently named, or required in new sizes/formats. This list was shared with the Design team via collaborative tools (like Zeplin) to request updated SVG files, confirm naming conventions, and validate any necessary layout adjustments to accommodate the new assets.

4. Fixing Flutter Golden Tests
After updating the icons, the existing Golden (visual snapshot) tests failed due to pixel differences. We regenerated the Golden test reference images by running the test suite with the updated SVG assets. This ensured that the UI tests passed and that the new icons were visually validated against the approved design baseline.

5. Undergoing Pull Request (PR) Review
All changes were consolidated into a dedicated feature branch and submitted as a Pull Request. The PR included a description of the migration, a summary of assets updated, and any notes for reviewers. Team members conducted a thorough code review, checking for consistency, proper asset usage, and test updates before approving and merging the changes into the main codebase.

Solution

The migration to a centralized AppAssets system successfully modernized WestJet’s icon management, improving both code reliability and visual consistency. This foundational upgrade enhances maintainability and paves the way for more efficient UI development moving forward.