Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

flutter run in background every second

Timer timer;

@override
void initState() {
  super.initState();
  timer = Timer.periodic(Duration(seconds: 15), (Timer t) => checkForNewSharedLists());
}

@override
void dispose() {
  timer?.cancel();
  super.dispose();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flutter #run #background
ADD COMMENT
Topic
Name
2+8 =