Skip to content

Commit 829b45a

Browse files
authored
copy constants - cannot publish otherwise (#800)
1 parent 145d8cc commit 829b45a

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

json_serializable/lib/src/constants.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// @dart=2.12
6-
75
/// Name used for closure argument when generating calls to `map`.
86
const closureArg = 'e';
97

json_serializable/test/src/_json_serializable_test_input.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
import 'dart:collection';
88

99
import 'package:json_annotation/json_annotation.dart';
10-
import 'package:json_serializable/src/constants.dart';
1110

1211
// ignore: import_of_legacy_library_into_null_safe
1312
import 'package:source_gen_test/annotations.dart';
1413

14+
part 'constants_copy.dart';
15+
1516
part 'checked_test_input.dart';
1617

1718
part 'core_subclass_type_input.dart';
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
// @dart=2.12
6+
7+
part of '_json_serializable_test_input.dart';
8+
9+
// TODO: remove this and return link to lib/src/constants.dart once this
10+
// package runs with full null safety
11+
12+
/// Name used for closure argument when generating calls to `map`.
13+
const closureArg = 'e';
14+
15+
const generatedLocalVarName = 'val';
16+
const toJsonMapHelperName = 'writeNotNull';
17+
18+
const converterOrKeyInstructions = r'''
19+
* Use `JsonConverter`
20+
https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonConverter-class.html
21+
* Use `JsonKey` fields `fromJson` and `toJson`
22+
https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonKey/fromJson.html
23+
https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonKey/toJson.html''';

0 commit comments

Comments
 (0)