Troels Kaldau
Software Developer with a focus on end-to-end mobile applications
Project for LittleGiants
TL;DR
I developed the 'Scan' tab for Selvhent's employee application, enabling barcode scanning and label printing to streamline package management. Using Flutter and Riverpod for state management, I implemented a reactive and reliable solution. Managing Bluetooth connections for scanners and printers required extensive research, testing, and overcoming device-specific limitations, such as iOS compatibility issues and connection state detection. The final solution was stable, intuitive, and a valuable learning experience in UI development, state management, and Bluetooth protocols.
Selvhent is a company that provides a service for collecting packages at package shops. Their system primarily consists of an employee application for managing the package inventory, with a storefront mode for customers to collect their packages.
Selvhent Package Collection
To reduce the time spent managing the package inventory, Selvhent wanted to implement a feature allowing employees to scan a package's barcode and print labels with package information. Employees needed to quickly switch between device connections and use the built-in device camera for scanning barcodes. This new feature was implemented as a new tab in the employee application called "Scan."
Extract of Scan Tab Design
Implementing the design and functionality for the "Scan" tab was straightforward. The challenge lay in managing the Bluetooth connections for both scanners and printers and handling the page's state.
The page's state was determined by the selected scan method (e.g., selected device), the chosen scan function (e.g., move package, store package, etc.), and the state of any scanned package. I managed the state using Riverpod, a state management library for Flutter. The solution consisted of a chain of reactive providers, each dependent on the previous provider's state and modifying it accordingly. This approach allowed for a readable and reliable state management system.
Zebra Printer and Barcode Scanner
To manage the Bluetooth connections, I tested multiple Flutter Bluetooth libraries to find the most reliable and stable option. After selecting a library, I was provided with test units for the supported devices. Establishing connections proved less straightforward than expected and required extensive trial and error. By researching the devices' documentation, I discovered the correct connection settings and commands needed for operation.
My research also revealed some limitations of the devices. For example, the selected printer did not support iOS devices, which had been a source of confusion. Additionally, it was not possible to determine the connection state of the barcode scanner. As an alternative, I implemented a solution where the application displayed a barcode that could be scanned with the scanner. This sent a confirmation code to the application, verifying the connection. While this deviated from the original design, it was necessary to achieve the intended functionality.
The project was completed without major complications, and the final solution was stable and intuitive. It provided an excellent opportunity to work on a self-contained feature involving both UI and state management without interference from existing features. It also allowed me to familiarize myself with the Bluetooth protocol and conduct independent research to deliver a functional solution.
Also Read:
Position
Software Developer
Developed full-stack systems for startups, ranging from social apps to drowning prevention systems
Project
OCR Data Extraction
Developed a prototype to extract package information using OCR and regex patterns for SMS data parsing