Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8685191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:30:05+00:00 2026-06-12T22:30:05+00:00

Hi I am writing a Dart app and I am getting the error: type

  • 0

Hi I am writing a Dart app and I am getting the error:

type 'Screen' is not a subtype of type 'Screen' of 'function result'.

I have literally no idea what the actual error is?

My code is as follows:

class CanvasManager {
  Map<String, Screen> _canvases = new Map<String, Screen>();
  CanvasManager (Map<String, CanvasElement> reqCanvas, int sizeX, int sizeY, bool fullscreen) {
    reqCanvas.forEach((k,v) {
      _canvases[k] = new Screen.create(v, sizeX, sizeY, fullscreen);
    });
  }
  Screen getCanvas(String c) {
    if (_canvases.containsKey(c)) {
    return _canvases[c];
    }
    else throw "No such canvas with key ${c}";
  }
}

For some reason when I instance that class I get the error.

Just to note Screen is a class I have also created. As I’m completely baffeled I don’t know if it will help you by giving you that class as well. It’s somewhat long so I will paste-bin it: http://pastebin.com/KvZ54yPe

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:30:06+00:00Added an answer on June 12, 2026 at 10:30 pm

    Fixed it!

    Screen is already a class name in dart:html. The compiler really should tell you if you have reused a class name with some sort of warning but it doesn’t.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Writing a test app to emulate PIO lines, I have a very simple Python/Tk
Writing an iPhone app in Objective-C, I have a date in string form (in
I am writing a library in Dart and I have static files under the
Writing a PHP app and have several classes that only have static methods (no
Writing a python program, and I came up with this error while using the
Writing my first C# application...never touched the language before and not much of a
Writing a lexer of .java source files in Java. I have a stream of
Writing some classes for a Framework extension, and I have the following code: public
Writing my first JQTouch app. When I go from #login to #home , a
Writing a recursive function, I want one fn that executes when the list has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.