skawa-universe / skawa_components

More material-ish components designed to work well with angular_components
44 stars 14 forks source link

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

Open Elena-FrontendDev opened 4 years ago

Elena-FrontendDev commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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