Skip to content

Commit

Permalink
syntax(comma): add comma after parameter/constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul OGGERO committed Mar 22, 2024
1 parent 807d0fe commit 7a7a7bd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
11 changes: 7 additions & 4 deletions lib/src/models/schema.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,13 @@ class Schema extends BaseSchema {
: null;
final bool? enableNestedFields = map["enable_nested_fields"];

return Schema(map['name'], fields,
documentCount: map['num_documents'] ?? 0,
defaultSortingField: defaultSortingField,
enableNestedFields: enableNestedFields);
return Schema(
map['name'],
fields,
documentCount: map['num_documents'] ?? 0,
defaultSortingField: defaultSortingField,
enableNestedFields: enableNestedFields,
);
}

@override
Expand Down
19 changes: 10 additions & 9 deletions test/models/schema_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ void main() {

setUp(() {
s1 = Schema(
'companies',
{
Field('company_name', type: Type.string),
Field('num_employees', type: Type.int32),
Field('country', type: Type.string, isFacetable: true),
},
defaultSortingField: Field('num_employees'),
documentCount: 0,
enableNestedFields: true);
'companies',
{
Field('company_name', type: Type.string),
Field('num_employees', type: Type.int32),
Field('country', type: Type.string, isFacetable: true),
},
defaultSortingField: Field('num_employees'),
documentCount: 0,
enableNestedFields: true,
);
s2 = Schema.fromMap({
"name": "companies",
"fields": [
Expand Down

0 comments on commit 7a7a7bd

Please sign in to comment.