Skip to content

Commit ff616d9

Browse files
authored
fixing analysis errors (#1021)
* fixing analysis errors
1 parent 0d2bcbb commit ff616d9

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

mobx_codegen/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.6.1+1
2+
3+
- Fixing some analyzer errors related to deprecated types.
4+
15
## 2.6.1
26

37
- Upgrading packages and sdk

mobx_codegen/lib/src/type_names.dart

+4-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class LibraryScopedNameFinder {
3535
// Reverse each import's export namespace so we can map elements to their
3636
// library-local names. Note that the definedNames include a prefix if there
3737
// is one.
38+
// ignore: deprecated_member_use
3839
for (final import in library.libraryImports) {
3940
for (final entry in import.namespace.definedNames.entries) {
4041
_namesByElement[entry.value] = entry.key;
@@ -79,6 +80,7 @@ class LibraryScopedNameFinder {
7980
// If we're dealing with a typedef, we let it undergo the standard name
8081
// lookup. Otherwise, we special case the function naming.
8182
if (type.alias?.element is TypeAliasElement) {
83+
// ignore: deprecated_member_use
8284
typeElement = type.alias!.element.aliasedElement?.enclosingElement;
8385
} else {
8486
return _getFunctionTypeName(type);
@@ -88,8 +90,8 @@ class LibraryScopedNameFinder {
8890
typeElement == null ||
8991
// This is a bare type param, like "T"
9092
type is TypeParameterType) {
91-
// ignore: deprecated_member_use_from_same_package
92-
return type.getDisplayString();
93+
// ignore: deprecated_member_use
94+
return type.getDisplayString(withNullability: true);
9395
}
9496

9597
return _getNamedElementTypeName(typeElement!, type);

mobx_codegen/lib/version.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// Generated via set_version.dart. !!!DO NOT MODIFY BY HAND!!!
22

33
/// The current version as per `pubspec.yaml`.
4-
const version = '2.6.1';
4+
const version = '2.6.1+1';

mobx_codegen/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: mobx_codegen
22
description: Code generator for MobX that adds support for annotating your code with @observable, @computed, @action and also creating Store classes.
3-
version: 2.6.1
3+
version: 2.6.1+1
44

55
repository: https://github.com/mobxjs/mobx.dart
66
issue_tracker: https://github.com/mobxjs/mobx.dart/issues

0 commit comments

Comments
 (0)