Skip to content

Instantly share code, notes, and snippets.

@matanlurey
Created April 24, 2017 03:26
Show Gist options
  • Save matanlurey/b95c26e73b1bfcbd424fecdc24362b3b to your computer and use it in GitHub Desktop.
Save matanlurey/b95c26e73b1bfcbd424fecdc24362b3b to your computer and use it in GitHub Desktop.
An example of using the @immutable annotation
import 'pacakge:meta/meta.dart';
// Error: This class inherits from a class marked as @immutable, and therefore
// should be immutable (all instance fields must be final).
@immutable
class User {
String name;
}
@kwalrath
Copy link

Typo in the import...

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