time_config_checker 0.0.14 copy "time_config_checker: ^0.0.14" to clipboard
time_config_checker: ^0.0.14 copied to clipboard

This package allow check if the device time configured is automatic or manual

example/lib/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Time Config Checker')),
        body: Center(
          child: FutureBuilder<TimeConfig>(
            future: const TimeConfigChecker().getTimeConfig(),
            builder: (context, snapshot) {
              if (snapshot.connectionState == ConnectionState.waiting) {
                return const CircularProgressIndicator();
              } else if (snapshot.hasError) {
                return Text('Error: ${snapshot.error}');
              } else if (snapshot.hasData) {
                final config = snapshot.data!;
                return Text(
                  'Automatic Time: ${config.isAutomaticTime}\n'
                  'Automatic Time Zone: ${config.isAutomaticTimeZone}',
                );
              } else {
                return const Text('No data available');
              }
            },
          ),
        ),
      ),
    );
  }
}
1
likes
160
points
43
downloads

Publisher

verified publisheralexastudillo.com

Weekly Downloads

This package allow check if the device time configured is automatic or manual

Homepage
Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, time_config_checker_android, time_config_checker_ios, time_config_checker_platform_interface

More

Packages that depend on time_config_checker