Resmi dokümanlar örneğinden kod uygulamaya çalışıyorum ancak başarısız oluyor:
...
class _MyHomePageState extends State<MyHomePage> {
late AnimationController controller;
@override
void initState() {
super.initState();
controller = AnimationController(duration: Duration(seconds: 3), vsync: this);
}
...
Böyle yazıyor : The argument type '_MyHomePageState' can't be assigned to the parameter type 'TickerProvider'.
Yani, VSCode vurgular vsync: this
param.
Flutter'ın en son sürümüne sahibim:
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
Bu hata neden oluşur ve SDK sürümünü düşürmeden bunu nasıl düzeltebilirim?