Skip to content

Commit

Permalink
Remove dependencies on 'meta' (flutter#4647)
Browse files Browse the repository at this point in the history
Flutter re-exports everything from meta that we actually use, and all plugins by definition require Flutter, so there's no need to use `meta` instead of Flutter to access common annotations (e.g., immutable, visibleForTesting).

This removes all use of `meta`, as well as dependencies on the package, from all plugins.

Fixes flutter/flutter#95658
  • Loading branch information
stuartmorgan committed Jan 10, 2022
1 parent 9aca084 commit a0b7daa
Show file tree
Hide file tree
Showing 101 changed files with 182 additions and 114 deletions.
4 changes: 4 additions & 0 deletions packages/camera/camera_platform_interface/CHANGELOG.md
@@ -1,3 +1,7 @@
## 2.1.4

* Removes dependency on `meta`.

## 2.1.3

* Update to use the `verify` method introduced in platform_plugin_interface 2.1.0.
Expand Down
Expand Up @@ -3,7 +3,7 @@
// found in the LICENSE file.

import 'package:camera_platform_interface/src/types/focus_mode.dart';
import 'package:meta/meta.dart';
import 'package:flutter/foundation.dart' show immutable;

import '../../camera_platform_interface.dart';

Expand Down
Expand Up @@ -3,8 +3,8 @@
// found in the LICENSE file.

import 'package:camera_platform_interface/src/utils/utils.dart';
import 'package:flutter/foundation.dart' show immutable;
import 'package:flutter/services.dart';
import 'package:meta/meta.dart';

/// Generic Event coming from the native side of Camera,
/// not related to a specific camera module.
Expand Down
Expand Up @@ -14,7 +14,6 @@ import 'package:cross_file/cross_file.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';
import 'package:stream_transform/stream_transform.dart';

const MethodChannel _channel = MethodChannel('plugins.flutter.io/camera');
Expand Down
Expand Up @@ -3,7 +3,6 @@
// found in the LICENSE file.

import 'package:flutter/foundation.dart';
import 'package:meta/meta.dart';

/// The direction the camera is facing.
enum CameraLensDirection {
Expand Down
3 changes: 1 addition & 2 deletions packages/camera/camera_platform_interface/pubspec.yaml
Expand Up @@ -4,7 +4,7 @@ repository: https://github.com/flutter/plugins/tree/master/packages/camera/camer
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.1.3
version: 2.1.4

environment:
sdk: '>=2.12.0 <3.0.0'
Expand All @@ -14,7 +14,6 @@ dependencies:
cross_file: ^0.3.1
flutter:
sdk: flutter
meta: ^1.3.0
plugin_platform_interface: ^2.1.0
stream_transform: ^2.0.0

Expand Down
@@ -1,3 +1,7 @@
## 2.0.4

* Removes dependency on `meta`.

## 2.0.3

* Minor code cleanup for new analysis rules.
Expand Down
Expand Up @@ -4,8 +4,8 @@

import 'package:cross_file/cross_file.dart';
import 'package:file_selector_platform_interface/file_selector_platform_interface.dart';
import 'package:flutter/foundation.dart' show visibleForTesting;
import 'package:flutter/services.dart';
import 'package:meta/meta.dart';

const MethodChannel _channel =
MethodChannel('plugins.flutter.io/file_selector');
Expand Down
Expand Up @@ -4,7 +4,7 @@ repository: https://github.com/flutter/plugins/tree/master/packages/file_selecto
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.0.3
version: 2.0.4

environment:
sdk: ">=2.12.0 <3.0.0"
Expand All @@ -15,7 +15,6 @@ dependencies:
flutter:
sdk: flutter
http: ^0.13.0
meta: ^1.3.0
plugin_platform_interface: ^2.1.0

dev_dependencies:
Expand Down
3 changes: 2 additions & 1 deletion packages/file_selector/file_selector_web/CHANGELOG.md
@@ -1,6 +1,7 @@
## NEXT
## 0.8.1+3

* Minor code cleanup for new analysis rules.
* Removes dependency on `meta`.

## 0.8.1+2

Expand Down
Expand Up @@ -7,8 +7,8 @@ import 'dart:async';
import 'package:file_selector_platform_interface/file_selector_platform_interface.dart';
import 'package:file_selector_web/src/dom_helper.dart';
import 'package:file_selector_web/src/utils.dart';
import 'package:flutter/foundation.dart' show visibleForTesting;
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
import 'package:meta/meta.dart';

/// The web implementation of [FileSelectorPlatform].
///
Expand Down
Expand Up @@ -6,8 +6,8 @@ import 'dart:async';
import 'dart:html';

import 'package:file_selector_platform_interface/file_selector_platform_interface.dart';
import 'package:flutter/foundation.dart' show visibleForTesting;
import 'package:flutter/services.dart';
import 'package:meta/meta.dart';

/// Class to manipulate the DOM with the intention of reading files from it.
class DomHelper {
Expand Down
3 changes: 1 addition & 2 deletions packages/file_selector/file_selector_web/pubspec.yaml
Expand Up @@ -2,7 +2,7 @@ name: file_selector_web
description: Web platform implementation of file_selector
repository: https://github.com/flutter/plugins/tree/master/packages/file_selector/file_selector_web
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22
version: 0.8.1+2
version: 0.8.1+3

environment:
sdk: ">=2.12.0 <3.0.0"
Expand All @@ -22,7 +22,6 @@ dependencies:
sdk: flutter
flutter_web_plugins:
sdk: flutter
meta: ^1.3.0

dev_dependencies:
flutter_test:
Expand Down
@@ -1,3 +1,7 @@
## 2.1.5

Removes dependency on `meta`.

## 2.1.4

* Update to use the `verify` method introduced in plugin_platform_interface 2.1.0.
Expand Down
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:meta/meta.dart' show immutable;
import 'package:flutter/foundation.dart' show immutable;

import 'types.dart';

Expand Down
Expand Up @@ -4,7 +4,7 @@

import 'package:flutter/foundation.dart' show VoidCallback;
import 'package:flutter/material.dart' show Color, Colors;
import 'package:meta/meta.dart' show immutable;
import 'package:flutter/foundation.dart' show immutable;

import 'types.dart';

Expand Down
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:meta/meta.dart' show immutable;
import 'package:flutter/foundation.dart' show immutable;

/// Joint types for [Polyline].
@immutable
Expand Down
Expand Up @@ -4,7 +4,7 @@

import 'dart:ui' show hashValues;

import 'package:meta/meta.dart';
import 'package:flutter/foundation.dart' show visibleForTesting;

/// A pair of latitude and longitude coordinates, stored as degrees.
class LatLng {
Expand Down
Expand Up @@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/foundation.dart' show objectRuntimeType;
import 'package:meta/meta.dart' show immutable;
import 'package:flutter/foundation.dart' show immutable, objectRuntimeType;

/// Uniquely identifies object an among [GoogleMap] collections of a specific
/// type.
Expand Down
Expand Up @@ -4,8 +4,8 @@

import 'dart:ui' show hashValues, Offset;

import 'package:flutter/foundation.dart' show ValueChanged, VoidCallback;
import 'package:meta/meta.dart' show immutable;
import 'package:flutter/foundation.dart'
show immutable, ValueChanged, VoidCallback;

import 'types.dart';

Expand Down
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:meta/meta.dart' show immutable;
import 'package:flutter/foundation.dart' show immutable;

/// Item used in the stroke pattern for a Polyline.
@immutable
Expand Down
Expand Up @@ -3,9 +3,9 @@
// found in the LICENSE file.

import 'package:collection/collection.dart';
import 'package:flutter/foundation.dart' show listEquals, VoidCallback;
import 'package:flutter/foundation.dart'
show immutable, listEquals, VoidCallback;
import 'package:flutter/material.dart' show Color, Colors;
import 'package:meta/meta.dart' show immutable;

import 'types.dart';

Expand Down
Expand Up @@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/foundation.dart' show listEquals, VoidCallback;
import 'package:flutter/foundation.dart'
show immutable, listEquals, VoidCallback;
import 'package:flutter/material.dart' show Color, Colors;
import 'package:meta/meta.dart' show immutable;

import 'types.dart';

Expand Down
Expand Up @@ -4,7 +4,7 @@

import 'dart:ui' show hashValues;

import 'package:meta/meta.dart' show immutable;
import 'package:flutter/foundation.dart' show immutable;

/// Represents a point coordinate in the [GoogleMap]'s view.
///
Expand Down
Expand Up @@ -3,7 +3,7 @@
// found in the LICENSE file.

import 'dart:typed_data';
import 'package:meta/meta.dart' show immutable;
import 'package:flutter/foundation.dart' show immutable;

/// Contains information about a Tile that is returned by a [TileProvider].
@immutable
Expand Down
Expand Up @@ -4,8 +4,7 @@

import 'dart:ui' show hashValues;

import 'package:flutter/foundation.dart';
import 'package:meta/meta.dart' show immutable;
import 'package:flutter/foundation.dart' show immutable;

import 'types.dart';

Expand Down
Expand Up @@ -4,7 +4,7 @@ repository: https://github.com/flutter/plugins/tree/master/packages/google_maps_
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.1.4
version: 2.1.5

environment:
sdk: '>=2.12.0 <3.0.0'
Expand All @@ -14,7 +14,6 @@ dependencies:
collection: ^1.15.0
flutter:
sdk: flutter
meta: ^1.3.0
plugin_platform_interface: ^2.1.0
stream_transform: ^2.0.0

Expand Down
@@ -1,6 +1,10 @@
## 0.3.2+1

* Removes dependency on `meta`.

## 0.3.2

Add `onDragStart` and `onDrag` to `Marker`
* Add `onDragStart` and `onDrag` to `Marker`

## 0.3.1

Expand Down
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter_web
description: Web platform implementation of google_maps_flutter
repository: https://github.com/flutter/plugins/tree/master/packages/google_maps_flutter/google_maps_flutter_web
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
version: 0.3.2
version: 0.3.2+1

environment:
sdk: ">=2.12.0 <3.0.0"
Expand All @@ -23,7 +23,6 @@ dependencies:
sdk: flutter
google_maps_flutter_platform_interface: ^2.1.2
google_maps: ^5.2.0
meta: ^1.3.0
pedantic: ^1.10.0
sanitize_html: ^2.0.0
stream_transform: ^2.0.0
Expand Down
3 changes: 2 additions & 1 deletion packages/google_sign_in/google_sign_in/CHANGELOG.md
@@ -1,6 +1,7 @@
## NEXT
## 5.2.2

* Updates Android compileSdkVersion to 31.
* Removes depenedncy on `meta`.

## 5.2.1

Expand Down
3 changes: 1 addition & 2 deletions packages/google_sign_in/google_sign_in/pubspec.yaml
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for Google Sign-In, a secure authentication system
for signing in with a Google account on Android and iOS.
repository: https://github.com/flutter/plugins/tree/master/packages/google_sign_in/google_sign_in
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_sign_in%22
version: 5.2.1
version: 5.2.2

environment:
sdk: ">=2.14.0 <3.0.0"
Expand All @@ -25,7 +25,6 @@ dependencies:
sdk: flutter
google_sign_in_platform_interface: ^2.1.0
google_sign_in_web: ^0.10.0
meta: ^1.3.0

dev_dependencies:
flutter_driver:
Expand Down
@@ -1,3 +1,7 @@
## 2.1.1

* Removes dependency on `meta`.

## 2.1.0

* Add serverAuthCode attribute to user data
Expand Down
Expand Up @@ -3,7 +3,9 @@
// found in the LICENSE file.

import 'dart:async';
import 'package:meta/meta.dart' show visibleForTesting;

import 'package:flutter/foundation.dart' show visibleForTesting;

import 'src/method_channel_google_sign_in.dart';
import 'src/types.dart';

Expand Down
Expand Up @@ -4,8 +4,8 @@

import 'dart:async';

import 'package:flutter/foundation.dart' show visibleForTesting;
import 'package:flutter/services.dart';
import 'package:meta/meta.dart' show visibleForTesting;

import '../google_sign_in_platform_interface.dart';
import 'types.dart';
Expand Down
Expand Up @@ -4,7 +4,7 @@ repository: https://github.com/flutter/plugins/tree/master/packages/google_sign_
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_sign_in%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.1.0
version: 2.1.1

environment:
sdk: ">=2.12.0 <3.0.0"
Expand All @@ -13,7 +13,6 @@ environment:
dependencies:
flutter:
sdk: flutter
meta: ^1.3.0
quiver: ^3.0.0

dev_dependencies:
Expand Down
4 changes: 4 additions & 0 deletions packages/google_sign_in/google_sign_in_web/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.10.0+4

* Removes dependency on `meta`.

## 0.10.0+3

* Updated URL to the `google_sign_in` package in README.
Expand Down

0 comments on commit a0b7daa

Please sign in to comment.