I heard about hive ,shared preferences and sqflite but which is safe ,or alternative package and data want to store securely and which is most of them using
I use get_storage package to store tokens or any other data. This package is fast, extra light and synchronous key-value in memory, which backs up data to disk at each operation. It is written entirely in Dart and easily integrates with Get framework of Flutter. If you go through the documentation, you'll notice how easy it is to integrate and just save or read or delete data from local storage using get_storage. You can try it out instead of shared_pref.
In terms of security, if you want to encrypt your stored data try out flutter_secure_storage. It is a little bit confusing to integrate but it is definitely secure than the others. Choose what suits your needs.
Hive, sqflite, shared_pref, get_storage -- in terms of read/write speed hive & get_storage is better than others. If keeping data secure is your concern you should use flutter_secure_storage.