From fc3279a4d8415b9ab2451797b6a057ec1d1c31a1 Mon Sep 17 00:00:00 2001 From: Ming Ming Date: Fri, 5 Aug 2022 17:14:03 +0800 Subject: [PATCH] Improve code --- app/lib/entity/person.dart | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/lib/entity/person.dart b/app/lib/entity/person.dart index 2c3e50de..7e6a2a39 100644 --- a/app/lib/entity/person.dart +++ b/app/lib/entity/person.dart @@ -2,20 +2,18 @@ import 'package:equatable/equatable.dart'; import 'package:nc_photos/account.dart'; class Person with EquatableMixin { - Person({ + const Person({ required this.name, required this.thumbFaceId, required this.count, }); @override - toString() { - return "$runtimeType {" - "name: '$name', " - "thumbFaceId: '$thumbFaceId', " - "count: '$count', " - "}"; - } + toString() => "$runtimeType {" + "name: '$name', " + "thumbFaceId: '$thumbFaceId', " + "count: '$count', " + "}"; @override get props => [