accentColor and other properties in ThemeData is deprecated or less preferable for use in flutter environment and repleced by ColorScheme.secondary. So the ThemeDta now goes like this Ex: theme: ThemeData( colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.deepPurple).copyWith(secondary: Colors.amber), ),