'flutter: how to change current date and time from my app

Flutter or kotlin or Java: How to change the current device date and time from my app. without going to device settings. My phone time is now 6:45 and I want to change it to 07:30. I can do it from settings but how I can do it from my flutter app. I saw other applications that make a shortcut to the time settings in the device. I hope 🥺 that it is possible to change it directly from the flutter app or android studio. Thanks.



Solution 1:[1]

if you want add 1 minute from current datetime

DateTime now = new DateTime.now();
var newNow = DateTime(now.year, now.month, now.day, now.hour, now.minute+1);

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 anggadaz