I am trying to use these two ThemeData types in my MaterialApp. Check it out:
return GetMaterialApp(
debugShowCheckedModeBanner: false,
title: 'DISH Connect',
home: SiteLayout(),
theme: ThemeData.light(),
darkTheme: ThemeData.dark(),
darkTheme: ThemeData(
pageTransitionsTheme: PageTransitionsTheme(
builders: {
TargetPlatform.iOS: FadeUpwardsPageTransitionsBuilder(),
TargetPlatform.android: FadeUpwardsPageTransitionsBuilder(),
},
),
),
themeMode: provider.themeMode,
);
You can see that for my normal theme option, I have ThemeData.light(). I want to do the same for dark (which means I have to do 'ThemeData.dark()'). But I also want to be able to declare my pageTransitionTheme for these.
How can I make this possible?
You can use
copyWith()
method: