Project structure change in progress
This commit is contained in:
21
lib/entities/lock/lock_entity.class.dart
Normal file
21
lib/entities/lock/lock_entity.class.dart
Normal file
@ -0,0 +1,21 @@
|
||||
part of '../../main.dart';
|
||||
|
||||
class LockEntity extends Entity {
|
||||
LockEntity(Map rawData, String webHost) : super(rawData, webHost);
|
||||
|
||||
bool get isLocked => state == "locked";
|
||||
|
||||
@override
|
||||
Widget _buildStatePart(BuildContext context) {
|
||||
return LockStateWidget(
|
||||
assumedState: false,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget _buildStatePartForPage(BuildContext context) {
|
||||
return LockStateWidget(
|
||||
assumedState: true,
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user