Skip to content

Commit

Permalink
* Added Equatable in Base Object
Browse files Browse the repository at this point in the history
  • Loading branch information
santhoshvgts committed Jul 11, 2023
1 parent f8e4c8a commit 8450ad4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions example/lib/currency.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ class Currency extends BaseObject {
}


@override
List<Object?> get props => [id];
}
6 changes: 5 additions & 1 deletion lib/form/base_object.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

import 'package:equatable/equatable.dart';
import 'package:vgts_plugin/form/app_model.dart';
import 'package:vgts_plugin/vgts_plugin.dart';

class BaseObject {
class BaseObject extends Equatable {

static AppModel _registeredObject = getIt<AppModel>();

Expand All @@ -18,4 +19,7 @@ class BaseObject {
return await _registeredObject.modelDeserializer<T>().fromMap(data);
}

@override
List<Object?> get props => [];

}
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies:
image_picker: ^0.8.0+3
flutter_image_compress: ^1.0.0
intl: ^0.18.1
equatable: ^2.0.5


dev_dependencies:
Expand Down

0 comments on commit 8450ad4

Please sign in to comment.