Unhandled Exception: type 'Color' is not a subtype of type 'MaterialColor'

Map<int, Color> color = {
50: Color.fromRGBO(255, 92, 87, .1),
100: Color.fromRGBO(255, 92, 87, .2),
200: Color.fromRGBO(255, 92, 87, .3),
300: Color.fromRGBO(255, 92, 87, .4),
400: Color.fromRGBO(255, 92, 87, .5),
500: Color.fromRGBO(255, 92, 87, .6),
600: Color.fromRGBO(255, 92, 87, .7),
700: Color.fromRGBO(255, 92, 87, .8),
800: Color.fromRGBO(255, 92, 87, .9),
900: Color.fromRGBO(255, 92, 87, 1),
};

MaterialColor colorCustom = MaterialColor(0xFFFF5C57, color);

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
type 'color' is not a subtype of type 'materialcolor ' type '() =&gt; Color' is not a subtype of type 'Color?' Another exception was thrown: type 'Color' is not a subtype of type 'MaterialColor? 'Color' is not a subtype of type 'MaterialColor' Unhandled Exception: type 'Color' is not a subtype of type 'MaterialColor?' Another exception was thrown: type 'Color' is not a subtype of type 'MaterialColor' onTap in flutter ype 'Color' is not a subtype of type 'MaterialColor' type 'Color' is not a subtype of type 'MaterialColor?'&quot; flutter type Color is not a subtype for type materia color type 'Color' is not a subtype of type 'MaterialColor' of 'function result' type 'color' is not a subtype of type 'material color ' flutter type 'color' is not a subtype of type 'materialcolor' flutter flutter Expected a value of type 'MaterialColor?', but got one of type 'Color' Unhandled Exception: type 'Color' is not a subtype of type 'MaterialColor' flutter type 'Color' is not a subtype of type 'Color' where Color is from dart:ui Color is from package:charts_common/src/common/color.dart COlor is not a subtype of flutter MaterialColor(primary value: Color(0xffff9800)) type 'MaterialColor' is not a subtype of type 'bool' of 'function result' flutter type 'Color' is not a subtype of type 'MaterialColor' type 'Color' is not a subtype of type 'MaterialColor?' flutter error: The constructor returns type 'Color' that isn't of expected type 'MaterialColor'. (invalid_cast_new_expr at [filao_mu] lib\main.dart:16) Unhandled Exception: type 'Color' is not a subtype of type 'MaterialColor' type 'Color' is not a subtype of type 'MaterialColor?' type 'Color' is not a subtype of type 'MaterialColor? Exception has occurred. _TypeError (type 'Color' is not a subtype of type 'MaterialColor?') The constructor returns type 'Color' that isn't of expected type 'MaterialColor' type 'TextStyle' is not a subtype of type 'Color?' 'MaterialColor' is from 'package:flutter/src/material/colors.dart' 'MaterialColor' is from 'package:flutter/src/material/colors.dart' ('../../Developer/flutter/packages/flutter/lib/src/material/colors.dart'). backgroundColor: Color(Colors.blue), the constructor return type 'color' that is not of expected type 'material color' is not a subtype of materialcolor Expected a value of type 'Material Color?', but got one of type 'Color' in flutter Expected a value of type 'MaterialColor?', but got one of type 'Color' in flutter type Color is not a subtype of type MaterialColor flutter color is not a subtype of material color color' is not a subtype of material color type 'Color' is not a subtype of type 'MaterialColor' what is this type 'color' is not a subtype of type 'material color' material color assent is not a sybtype type 'Color' is not a subtype of type 'MaterialColor' type color is not a subtype of material color color is not a subtype of material color type 'Color' is not a subtype of type 'MaterialColor
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source