gmt 0.7.3 copy "gmt: ^0.7.3" to clipboard
gmt: ^0.7.3 copied to clipboard

Get current datetime in GMT from internet (example.com, google.com or your own urls) and return DateTime in UTC.

example/main.dart

import 'dart:async';

import 'package:gmt/gmt.dart';

void main() async {
  Timer.periodic(const Duration(seconds: 1), (timer) async {
    print(await GMT.now(urls: [
      'https://www.example.com',
      'https://www.google.com',
    ], timeoutOfEach: Duration(seconds: 1)));
  });

  await Future.delayed(const Duration(seconds: 10));
}
1
likes
140
pub points
69%
popularity

Publisher

verified publisherlamnhan.dev

Get current datetime in GMT from internet (example.com, google.com or your own urls) and return DateTime in UTC.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

http, universal_io

More

Packages that depend on gmt