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

retracted

A Flutter package to get timezone names from UTC offsets for current location of User.

example/lib/main.dart

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

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await TimeZonePlus.initialize();
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('TimeZonePlus Example')),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Text('Current Timezone: ${TimeZonePlus.getCurrentTimeZone()}'),
              Text('Current Country: ${TimeZonePlus.getCurrentCountryCode()}'),
            ],
          ),
        ),
      ),
    );
  }
}
6
likes
0
points
9
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package to get timezone names from UTC offsets for current location of User.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, timezone

More

Packages that depend on time_zone_plus