'Synchronize sending data to the server, whether there is internet or not in Flutter

I am trying to add the temporal feature in my application so that if there is an Internet, the data is sent in the application, and in the absence of the Internet, I keep it and then send it in the event that there is Internet. What should I do about this thing and what is the preferred library to use http or dio



Solution 1:[1]

i use dio_http_cache: plugin and it work with me but the best solutions is sqflite or hive

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Osama Mohamad