Touch Tracker is application uses the standard Flutter's 🙌 GestureDetector component to translate down, up and move events to tap, longPress, move (start, continue and final) and pause commands. The application is a clone to the application https://github.com/mk590901/Touch-Tracker with one significant change: the entire runtime QHsm framework is replaced by the TrackHelper class, which contains the threaded code replaces the state machine.
To check the fact that threaded code is capable of, firstly, replacing the QHsm framework, and secondly, significantly simplifying the application.
- The TrackHelper class (file track_helper.dart) is generated automatically by the editor's planner and then adapted to the application: data is added to the class, and the transfer functions are filled with operations for interacting with the GestureManager. These are similar to the operations that were previously performed in the TrackContextObject class.
- The Tracker class is changed. Calls to the TrackContextObject object functions are replaced by calls to the TrackHelper object functions.
- Empty transfer functions in the TrackHelper class are removed from the nodes of the QHsmHelper class as shown below. This minimizes the threaded code.
tracker_tc.mp4
The presented application behaves exactly the same as the application https://github.com/mk590901/Touch-Tracker, although the new version is much simpler and more compact, with the same GUI is the same. The difference is 19,085,113 bytes - 19,020,424 bytes = 64,689 bytes in favor of the new app.
