0

I use the ntp: ^2.0.0 plugin to get Internet time. The plugin was working fine before Flutter upgrade. Now I upgrade my flutter version from 3.0.0 into 3.3.2. After upgrade the plugin works fine on real devices, but not working on Android Emulators. I tried all possible solutions that available in internet.

This is the code I used to get internet time.

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));
Anand
  • 4,355
  • 2
  • 35
  • 45

0 Answers0