datetime_setting 1.0.0 copy "datetime_setting: ^1.0.0" to clipboard
datetime_setting: ^1.0.0 copied to clipboard

outdated

Flutter plugin to get information about auto time and auto timezone, open setting if not set to auto.

datetime_setting #

Flutter plugin to get information about auto time and auto timezone, open setting if not set to auto.

Usage #

Wrapping widget with DoubleBack where you want to use double back to close screen or app:

Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: FlatButton(child: Text('Get Information Or Open Setting'), onPressed: () async{
            bool timeAuto = await DatetimeSetting.timeIsAuto();
            bool timezoneAuto = await DatetimeSetting.timeZoneIsAuto();
            print(timeAuto);
            print(timezoneAuto);
            if (!timeAuto || !timezoneAuto){
              await DatetimeSetting.openSetting();
            }
          },),
        ),
      ),
    );
}
29
likes
30
points
7.22k
downloads

Publisher

verified publisherfuadarradhi.com

Weekly Downloads

Flutter plugin to get information about auto time and auto timezone, open setting if not set to auto.

Repository (GitHub)

License

unknown (license)

Dependencies

flutter

More

Packages that depend on datetime_setting