Skip to content

Commit

Permalink
dart formatting updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rutvik110 committed Sep 4, 2024
1 parent e4abd70 commit 7eb82ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
14 changes: 7 additions & 7 deletions web_generator/lib/src/translator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1259,11 +1259,11 @@ class Translator {

final jsObject = _typeReference(_RawType('JSObject', false));
const representationFieldName = '_';
final instancePropertyMethods = <code.Method>[];
final staticPropertyMethods = <code.Method>[];
final legacyNameSpace = extendedAttributes.firstWhereOrNull(
(extendedAttribute)=> extendedAttribute.name == 'LegacyNamespace',
)?.rhs.value;
final instancePropertyMethods = <code.Method>[];
final staticPropertyMethods = <code.Method>[];
final propertySpecs = _properties(properties, mdnInterface);
for (final property in propertySpecs.$2) {
(property.static ? staticPropertyMethods : instancePropertyMethods)
Expand All @@ -1272,12 +1272,12 @@ class Translator {
return code.ExtensionType((b) => b
..docs.addAll(docs)
..annotations.addAll(
_jsOverride(
legacyNameSpace != null
? '$legacyNameSpace.$jsName'
_jsOverride(
legacyNameSpace != null
? '$legacyNameSpace.$jsName'
: (isObjectLiteral || jsName == dartClassName ? '' : jsName),
),
)
),
)
..name = dartClassName
..primaryConstructorName = '_'
..representationDeclaration = code.RepresentationDeclaration((b) => b
Expand Down
6 changes: 2 additions & 4 deletions web_generator/lib/src/webidl_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@ extension type Member._(JSObject _) implements JSObject {
extension type ExtendedAttribute._(JSObject _) implements JSObject {
external String get name;
external RHS get rhs;

}

extension type RHS._(JSObject _) implements JSObject {
external String get type;
external String get value;
external String get type;
external String get value;
}


extension type Argument._(JSObject _) implements JSObject {
external String get type;
@JS('default')
Expand Down

0 comments on commit 7eb82ef

Please sign in to comment.