You can use this plugin ntp.
import 'package:ntp/ntp.dart';
final int offset = await NTP.getNtpOffset(
localTime: DateTime.now(), lookUpAddress: "time.google.com");
DateTime internetTime = DateTime.now().add(Duration(milliseconds: offset));
Or there are plenty of API's available
here is an example GET API for Indian time
http://worldtimeapi.org/api/timezone/Asia/Kolkata
The response will be like
{
"abbreviation": "IST",
"client_ip": "45.125.117.46",
"datetime": "2022-02-26T10:50:43.406519+05:30",
"day_of_week": 6,
"day_of_year": 57,
"dst": false,
"dst_from": null,
"dst_offset": 0,
"dst_until": null,
"raw_offset": 19800,
"timezone": "Asia/Kolkata",
"unixtime": 1645852843,
"utc_datetime": "2022-02-26T05:20:43.406519+00:00",
"utc_offset": "+05:30",
"week_number": 8
}
If you dont know your country zone just call this API to get all timezones in the world
http://worldtimeapi.org/api/timezone/