6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[Flutter] Delayを使う方。

Posted at

Tread Delayみたいなのはないかな?
FlutterではFutureを使ってDelayを使用します。

基本

main.dart

Future.delayed(Duration(milliseconds: 10))
        .then((_) => _animationController.forward());

例。

main.dart

 @override
  void initState() {
    // TODO: implement initState
    super.initState();

    // your code 

    Future.delayed(Duration(milliseconds: 10))
        .then((_) => _animationController.forward());
  }

Durationで欲しい時間入れば、ちゃんと動きます。

6
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?