I had some deprecated warnings in Theme . the code before :
class myTheme {
static getTheme() => ThemeData(
primaryColor: Colors.grey,
primarySwatch: Colors.grey,
backgroundColor: Colors.white,
buttonColor:Colors.blueAccent,
accentColor: Colors.blueGrey,
);
}
accentColor and buttonColor were deprecated so I changed it to :
class RevoCheckTheme {
static getTheme() => ThemeData(
primaryColor: Colors.grey,
backgroundColor: Colors.white,
colorScheme:
ColorScheme.fromSwatch(primarySwatch: Colors.grey)
.copyWith(secondary: Colors.blueGrey)
.copyWith(surface:Colors.blueAccent)
);
}
and now the the colors aren’t the same as before , I think primarySwatch effects on other colors maybe . is it the right way to solve it or Im completely wrong?
2
Answers
It will be
You should edit it to