Created
June 2, 2019 15:47
-
-
Save lukaszciastko/81eb65e836a498f391b400a49f45ec20 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:meta/meta.dart'; | |
class Task { | |
const Task({this.id, @required this.name, this.isComplete = false}); | |
final int id; | |
final String name; | |
final bool isComplete; | |
Task copyWith({int id, String name, bool isComplete}) { | |
return Task( | |
id: id ?? this.id, | |
name: name ?? this.name, | |
isComplete: isComplete ?? this.isComplete, | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment