나를 구현하기 위해 노력하고 코드에서 는 공식 문서를 들어 하지만 그것은 실패합니다.
...
class _MyHomePageState extends State<MyHomePage> {
late AnimationController controller;
@override
void initState() {
super.initState();
controller = AnimationController(duration: Duration(seconds: 3), vsync: this);
}
...
그것은 말한다: The argument type '_MyHomePageState' can't be assigned to the parameter type 'TickerProvider'.
그래서,VSCode 하이라이트 vsync: this
param.
나는 최신 버전의 떨림:
Flutter 2.5.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 18116933e7 (6 weeks ago) • 2021-10-15 10:46:35 -0700
Engine • revision d3ea636dc5
Tools • Dart 2.14.4
왜 이런 오류가 발생하고 이에 대한 해결 방법이 없으로 다운그레이드 SDK 버전입니까?