I\'d like to execute a function after a certain delay after my Widget is built. What\'s the idiomatic way of doing this in Flutter?
What I\'m trying to achieve: I\'
import 'dart:async'; Timer timer; void autoPress(){ timer = new Timer(const Duration(seconds:2),(){ print("This line will print after two seconds"); }); } autoPress();