Study Record

[Flutter] timer 본문

Flutter

[Flutter] timer

초코초코초코 2023. 1. 31. 16:29
728x90

timer 사용법

import 'dart:async';
import 'package:flutter/services.dart';

Timer timer = Timer.periodic(Duration(milliseconds:1000), (timer) {
    print("1초마다 한번씩 실행된다.");     
});


timer?.cancel();

 

728x90