iana_time_zone 0.0.1 copy "iana_time_zone: ^0.0.1" to clipboard
iana_time_zone: ^0.0.1 copied to clipboard

A Flutter plugin for IANA timezone name.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:iana_time_zone/iana_time_zone.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('IANA TimeZone Plugin example app'),
        ),
        body: Center(
          child: FutureBuilder(future: IanaTimeZone.getIanaTimeZone, builder:
          (context,snapshot){
            if(snapshot.connectionState==ConnectionState.done) {
              return Text('${snapshot.data}');
            }else if (snapshot.hasError) {
              return Text('Error: ${snapshot.error}');
            }  else{
              return const CircularProgressIndicator();
            }
          }
          ),
        ),
      ),
    );
  }
}
1
likes
130
points
54
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for IANA timezone name.

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on iana_time_zone

Packages that implement iana_time_zone