datetime_setting 1.0.0

Flutter Android iOS

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();
            }
          },),
        ),
      ),
    );
}
1
likes
100
pub points
37%
popularity

Publisher

fuadarradhi.com

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on datetime_setting