Answers for "The instance member 'blueColorHexCode' can't be accessed in an initializer."

0

The instance member 'blueColorHexCode' can't be accessed in an initializer.

you can use the getter methods that can access these class objects inside the 
methods.

class AppTheme {
  final Color blueColorHexCode = Color(0xff3d63ff);
	
  //App Bar Text
  TextTheme get appBarTextTheme {
  	 return TextTheme(
      headline1: GoogleFonts.ibmPlexSans(
          textStyle: TextStyle(color: grayColorHexCode),
		),
	);
  }
  
  ........................
  ............................
}
Posted by: Guest on April-11-2021

Code answers related to "The instance member 'blueColorHexCode' can't be accessed in an initializer."

Browse Popular Code Answers by Language