Is there a better way to make addon working on both blender 2.80 and 2.79?
Two separate addons

The code in question and your answer has versioning for one part of the changes from 2.79 to 2.80, ie annotations in property groups.

I would suggest writing  two addons, one that works in 2.79 and one that works in 2.80. (As opposed to having versioning code ad hoc in each py file.)

Distribute as an addon for that version. If using github a branch is often used.

If wish to distribute as a single addon that works in both, suggest putting each in a subfolder of the root folder of the addon, then in the addons __init__.py check once for version and import modules from that version folder.

See this post on fake modules for some cool trickery https://stackoverflow.com/a/27476659/5317130