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();
            }
          },),
        ),
      ),
    );
}

Libraries

datetime_setting