I can't seem to figure out why I keep getting Specify type annotations. dart(always_specify_types)
warning under PageRouteBuilder
in this function here.
I just started using Flutter/Dart and I'm really liking it!
I've tried converting it into a variable and annotating it as a Route
but that still did not work out.
Here is the code. Note that it's PageRouteBuilder
that's giving me the type annotation warning.
Navigator.of(context).push(
PageRouteBuilder(
pageBuilder: (BuildContext context, _, __) {
return DashboardPage();
},
transitionsBuilder: (_, Animation<double> animation, __, Widget child) {
return FadeTransition(
opacity: animation,
child: child,
);
},
),
);