Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The argument type 'dynamic' can't be assigned to the parameter type #67

Open
Elena-FrontendDev opened this issue Aug 2, 2020 · 2 comments

Comments

@Elena-FrontendDev
Copy link

Hi
I'm trying to use ckeditor, but I have an error in main.dart file from skawa_components_example:

import 'package:angular/angular.dart';
import 'package:skawa_components_example/app_component.template.dart' as ng;

void main() {
  runApp(ng.AppComponentNgFactory);
}

"The argument type 'dynamic' can't be assigned to the parameter type 'ComponentFactory<dynamic>'.dart(argument_type_not_assignable)"

I have no experience with dart and angular and I can't fix it myself. I will appreciate your help me.

@daniel-v
Copy link
Contributor

daniel-v commented Aug 18, 2020

What version of Dart SDK are you using?

That is actually a completely normal message. AngularDart relies on generated files instead of runtime reflection to figure out a lot of things. Basically any file that you see with NgFactory is a generated piece of code.

You should try to run the example and see if that resolves it. Here is a little help how you go about that: https://angulardart.dev/guide/setup#run-the-app

tip: once you started the app the webdev generated app_component.template.dart file for you, you might still see the error in your IDE. Hit the "restart analysis server" button. It happens sometimes, the server doesn't pick up the new asset. Sometimes closing the file and reopening helps too.

Let us know if you still can't get from A to B.

@Elena-FrontendDev
Copy link
Author

Thanks a lot I'll try and let you know later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants