Skip to content

Commit

Permalink
🐛 fix(builder): use raw strings on class names
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateo MARTINEZ committed Jul 24, 2024
1 parent a482819 commit c5d106d
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class User$reflection extends ClassReflection<User> with __ReflectionMixin {
return _objectReflections[object] ??= User$reflection._(object);
}

User$reflection._([User? object]) : super(User, 'User', object);
User$reflection._([User? object]) : super(User, r'User', object);

static bool _registered = false;
@override
Expand Down
2 changes: 1 addition & 1 deletion example/reflection_factory_example.reflection.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class User$reflection extends ClassReflection<User> with __ReflectionMixin {
return _objectReflections[object] ??= User$reflection._(object);
}

User$reflection._([User? object]) : super(User, 'User', object);
User$reflection._([User? object]) : super(User, r'User', object);

static bool _registered = false;
@override
Expand Down
4 changes: 2 additions & 2 deletions lib/src/reflection_factory_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ class _EnumTree<T> extends RecursiveElementVisitor<T> {
}

str.write(
' $reflectionClass._([$enumName? object]) : super($enumName, \'$enumName\', object);\n\n');
' $reflectionClass._([$enumName? object]) : super($enumName, r\'$enumName\', object);\n\n');

str.write(' static bool _registered = false;\n');
str.write(' @override\n');
Expand Down Expand Up @@ -1734,7 +1734,7 @@ class _ClassTree<T> extends RecursiveElementVisitor<T> {
}

str.write(
' $reflectionClass._([$className? object]) : super($className, \'$className\', object);\n\n');
' $reflectionClass._([$className? object]) : super($className, r\'$className\', object);\n\n');

str.write(' static bool _registered = false;\n');
str.write(' @override\n');
Expand Down
28 changes: 14 additions & 14 deletions test/src/reflection/user_with_reflection.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class TestAddressWithReflection$reflection
: this._(object);

TestAddressWithReflection$reflection._([TestAddressWithReflection? object])
: super(TestAddressWithReflection, 'TestAddressWithReflection', object);
: super(TestAddressWithReflection, r'TestAddressWithReflection', object);

static bool _registered = false;
@override
Expand Down Expand Up @@ -533,7 +533,7 @@ class TestCompanyWithReflection$reflection
}

TestCompanyWithReflection$reflection._([TestCompanyWithReflection? object])
: super(TestCompanyWithReflection, 'TestCompanyWithReflection', object);
: super(TestCompanyWithReflection, r'TestCompanyWithReflection', object);

static bool _registered = false;
@override
Expand Down Expand Up @@ -1009,7 +1009,7 @@ class TestDataWithReflection$reflection
}

TestDataWithReflection$reflection._([TestDataWithReflection? object])
: super(TestDataWithReflection, 'TestDataWithReflection', object);
: super(TestDataWithReflection, r'TestDataWithReflection', object);

static bool _registered = false;
@override
Expand Down Expand Up @@ -1313,7 +1313,7 @@ class TestDomainWithReflection$reflection
}

TestDomainWithReflection$reflection._([TestDomainWithReflection? object])
: super(TestDomainWithReflection, 'TestDomainWithReflection', object);
: super(TestDomainWithReflection, r'TestDomainWithReflection', object);

static bool _registered = false;
@override
Expand Down Expand Up @@ -1762,7 +1762,7 @@ class TestEmpty$reflection extends ClassReflection<TestEmpty>
}

TestEmpty$reflection._([TestEmpty? object])
: super(TestEmpty, 'TestEmpty', object);
: super(TestEmpty, r'TestEmpty', object);

static bool _registered = false;
@override
Expand Down Expand Up @@ -1912,7 +1912,7 @@ class TestEnumWithReflection$reflection
}

TestEnumWithReflection$reflection._([TestEnumWithReflection? object])
: super(TestEnumWithReflection, 'TestEnumWithReflection', object);
: super(TestEnumWithReflection, r'TestEnumWithReflection', object);

static bool _registered = false;
@override
Expand Down Expand Up @@ -1998,8 +1998,8 @@ class TestFranchiseWithReflection$reflection

TestFranchiseWithReflection$reflection._(
[TestFranchiseWithReflection? object])
: super(
TestFranchiseWithReflection, 'TestFranchiseWithReflection', object);
: super(TestFranchiseWithReflection, r'TestFranchiseWithReflection',
object);

static bool _registered = false;
@override
Expand Down Expand Up @@ -2347,7 +2347,7 @@ class TestName$reflection extends ClassReflection<TestName>
}

TestName$reflection._([TestName? object])
: super(TestName, 'TestName', object);
: super(TestName, r'TestName', object);

static bool _registered = false;
@override
Expand Down Expand Up @@ -2654,7 +2654,7 @@ class TestOpAWithReflection$reflection
}

TestOpAWithReflection$reflection._([TestOpAWithReflection? object])
: super(TestOpAWithReflection, 'TestOpAWithReflection', object);
: super(TestOpAWithReflection, r'TestOpAWithReflection', object);

static bool _registered = false;
@override
Expand Down Expand Up @@ -3019,7 +3019,7 @@ class TestOpBWithReflection$reflection
}

TestOpBWithReflection$reflection._([TestOpBWithReflection? object])
: super(TestOpBWithReflection, 'TestOpBWithReflection', object);
: super(TestOpBWithReflection, r'TestOpBWithReflection', object);

static bool _registered = false;
@override
Expand Down Expand Up @@ -3403,7 +3403,7 @@ class TestOpWithReflection$reflection
}

TestOpWithReflection$reflection._([TestOpWithReflection? object])
: super(TestOpWithReflection, 'TestOpWithReflection', object);
: super(TestOpWithReflection, r'TestOpWithReflection', object);

static bool _registered = false;
@override
Expand Down Expand Up @@ -3803,7 +3803,7 @@ class TestTransactionWithReflection$reflection

TestTransactionWithReflection$reflection._(
[TestTransactionWithReflection? object])
: super(TestTransactionWithReflection, 'TestTransactionWithReflection',
: super(TestTransactionWithReflection, r'TestTransactionWithReflection',
object);

static bool _registered = false;
Expand Down Expand Up @@ -4082,7 +4082,7 @@ class TestUserWithReflection$reflection
}

TestUserWithReflection$reflection._([TestUserWithReflection? object])
: super(TestUserWithReflection, 'TestUserWithReflection', object);
: super(TestUserWithReflection, r'TestUserWithReflection', object);

static bool _registered = false;
@override
Expand Down
4 changes: 2 additions & 2 deletions test/src/user_reflection_bridge.reflection.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class TestAddress$reflection extends ClassReflection<TestAddress>
}

TestAddress$reflection._([TestAddress? object])
: super(TestAddress, 'TestAddress', object);
: super(TestAddress, r'TestAddress', object);

static bool _registered = false;
@override
Expand Down Expand Up @@ -378,7 +378,7 @@ class TestUserSimple$reflection extends ClassReflection<TestUserSimple>
}

TestUserSimple$reflection._([TestUserSimple? object])
: super(TestUserSimple, 'TestUserSimple', object);
: super(TestUserSimple, r'TestUserSimple', object);

static bool _registered = false;
@override
Expand Down

0 comments on commit c5d106d

Please sign in to comment.