Closed omerasif57 closed 3 years ago
I think, pub dev is not up to date with github source:
with 1.0.9, getting error "parameter builder is not defined"
builder
@override Widget build(BuildContext context) { return ThemeProvider( initTheme: theme, builder: (_, theme) { return MaterialApp( title: 'Flutter Demo', theme: theme, home: MyHomePage(), ); }, ); } }
Github source:
class ThemeProvider extends StatefulWidget { ThemeProvider({ this.initTheme, Key? key, this.child, this.builder, this.duration = const Duration(milliseconds: 300), }) : assert(!(child == null && builder == null), 'You should provide either a child or a builder'), super(key: key);
1.0.9 source as seen in vs code:
class ThemeProvider extends StatefulWidget { ThemeProvider({ this.initTheme, Key key, @required this.child, this.duration = const Duration(milliseconds: 300), }) : assert(duration != null), super(key: key); final Widget child; final ThemeData initTheme; final Duration duration;
Published Nov 12, 2020
Thanks, it was in prerelease. I've mark it as stable.
I think, pub dev is not up to date with github source:
with 1.0.9, getting error "parameter
builder
is not defined"Github source:
1.0.9 source as seen in vs code: