Skip to content

MDC-103 AsymmetricView not working #82

Closed
@polmp

Description

@polmp

I followed the tutorial of MDC-103 to include the AsymmetricView, and I got the following error:

lib/home.dart:47:38: Error: A value of type 'dart.core::List<#lib1::Product>' can't be assigned to a variable of type 'dart.core::List<#lib2::Product>'.

There is an error in the tutorial. To solve it, we simply need to change the import of the AsymmetricView to:

import 'package:Shrine/supplemental/asymmetric_view.dart';

Now it works flawlessly.

Activity

michdud

michdud commented on Jul 23, 2018

@michdud
Contributor

Thanks for reporting this! Out of curiosity, if you remove the change you created in home.dart and instead change the import in main.dart for app.dart to package:Shrine/app.dart, does that also fix the issue? This seems to be the fix recommended by dart-lang/sdk#33076.

polmp

polmp commented on Jul 23, 2018

@polmp
Author

Yes, if we maintain the original import and change the one of main.dart for
import 'package:Shrine/app.dart';

Seems solved too

michdud

michdud commented on Jul 24, 2018

@michdud
Contributor

I've added the import fix in main.dart to all codelabs, because it seems to be the recommended solution per the Dart issue above. Thanks again for reporting this, and please let me know if you have any problems with/questions about this fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @willlarche@polmp@tianlunlee@michdud

      Issue actions

        MDC-103 AsymmetricView not working · Issue #82 · material-components/material-components-flutter-codelabs