@@ -268,12 +268,11 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
268268
269269 @override
270270 Widget build (BuildContext context) {
271- final ThemeData themeData = Theme .of (context);
272271 currentTheme = MediaQuery .of (context).platformBrightness == Brightness .light ? lightTheme : darkTheme;
273272 bool isIOS = Theme .of (context).platform == TargetPlatform .iOS;
274273 if (isIOS) {
275- var title = themeData .textTheme.title.copyWith (color: currentTheme.primaryColor);
276- var subhead = themeData .textTheme.subhead.copyWith (color: currentTheme.primaryColor);
274+ var title = Theme . of (context) .textTheme.title.copyWith (color: currentTheme.primaryColor);
275+ var subhead = Theme . of (context) .textTheme.subhead.copyWith (color: currentTheme.primaryColor);
277276 var crossAxisAlignment = CrossAxisAlignment .start;
278277 var padding = EdgeInsets .all (16.0 );
279278
@@ -361,7 +360,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
361360 middle: Text (_pspdfkitFlutterPluginTitle)),
362361 child: SafeArea (
363362 bottom: false ,
364- child: ExampleListView (themeData , frameworkVersion (), cupertinoListTiles))
363+ child: ExampleListView (currentTheme , frameworkVersion (), cupertinoListTiles))
365364 );
366365 } else {
367366 List <Widget > listTiles = < Widget > [
@@ -403,7 +402,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
403402 ];
404403 return Scaffold (
405404 appBar: AppBar (title: Text (_pspdfkitFlutterPluginTitle)),
406- body: ExampleListView (themeData , frameworkVersion (), listTiles)
405+ body: ExampleListView (currentTheme , frameworkVersion (), listTiles)
407406 );
408407 }
409408 }
@@ -420,12 +419,12 @@ class ExampleListView extends StatelessWidget {
420419 Widget build (BuildContext buildContext) {
421420 return Column (mainAxisSize: MainAxisSize .max, children: [
422421 Container (
423- color: Colors .grey[ 300 ] ,
422+ color: Colors .transparent ,
424423 padding: EdgeInsets .only (top: 24 ),
425424 child: Center (
426425 child: Text (_frameworkVersion,
427426 style: _themeData.textTheme.display1
428- .copyWith (fontSize: _fontSize, fontWeight: FontWeight .bold)),
427+ .copyWith (fontSize: _fontSize, fontWeight: FontWeight .bold, color : _themeData.primaryColor )),
429428 ),
430429 ),
431430 Expanded (
0 commit comments