[google_sign_in_web] Updates package:web dependency to 0.5.0. (#6167)

This PR updates `google_sign_in_web` to use package `web: ^0.5.0`.

## Testing

Manually verified using the `example/lib/button_tester.dart` app.

This should be text exempt? This is a refactor with no semantic change (also, I wouldn't know how to test we're using `package:web` the expected way!) I removed a couple of `//ignore` at least!

## Issues

* Fast follow of: https://github.com/flutter/packages/pull/5791
This commit is contained in:
David Iglesias
2024-02-20 15:46:50 -08:00
committed by GitHub
parent b21dce5f49
commit 48048f6bc7
4 changed files with 14 additions and 17 deletions

View File

@ -1,3 +1,7 @@
## 0.12.4
* Updates dependencies to `web: ^0.5.0` and `google_identity_services_web: ^0.3.1`.
## 0.12.3+3
* Updates SDK version to Dart `^3.3.0`. Flutter `^3.19.0`.

View File

@ -9,7 +9,7 @@ dependencies:
cupertino_icons: ^1.0.2
flutter:
sdk: flutter
google_identity_services_web: ^0.3.0
google_identity_services_web: ^0.3.1
google_sign_in_platform_interface: ^2.4.0
google_sign_in_web:
path: ../
@ -22,7 +22,7 @@ dev_dependencies:
integration_test:
sdk: flutter
mockito: 5.4.4
web: ">=0.3.0 <0.6.0"
web: ^0.5.0
flutter:
uses-material-design: true

View File

@ -73,13 +73,10 @@ class _FlexHtmlElementView extends State<FlexHtmlElementView> {
/// The function called whenever an observed resize occurs.
void _onResizeEntries(
// TODO(srujzs): Remove once typed JSArrays (JSArray<T>) get to `stable`.
// ignore: always_specify_types
JSArray resizes,
JSArray<web.ResizeObserverEntry> resizes,
web.ResizeObserver observer,
) {
final web.DOMRectReadOnly rect =
resizes.toDart.cast<web.ResizeObserverEntry>().last.contentRect;
final web.DOMRectReadOnly rect = resizes.toDart.last.contentRect;
if (rect.width > 0 && rect.height > 0) {
_doResize(Size(rect.width.toDouble(), rect.height.toDouble()));
}
@ -90,14 +87,10 @@ class _FlexHtmlElementView extends State<FlexHtmlElementView> {
/// When mutations are received, this function attaches a Resize Observer to
/// the first child of the mutation, which will drive
void _onMutationRecords(
// TODO(srujzs): Remove once typed JSArrays (JSArray<T>) get to `stable`.
// ignore: always_specify_types
JSArray mutations,
JSArray<web.MutationRecord> mutations,
web.MutationObserver observer,
) {
mutations.toDart
.cast<web.MutationRecord>()
.forEach((web.MutationRecord mutation) {
for (final web.MutationRecord mutation in mutations.toDart) {
if (mutation.addedNodes.length > 0) {
final web.Element? element = _locateSizeProvider(mutation.addedNodes);
if (element != null) {
@ -108,7 +101,7 @@ class _FlexHtmlElementView extends State<FlexHtmlElementView> {
return;
}
}
});
}
}
/// Registers a MutationObserver on the root element of the HtmlElementView.

View File

@ -3,7 +3,7 @@ description: Flutter plugin for Google Sign-In, a secure authentication system
for signing in with a Google account on Android, iOS and Web.
repository: https://github.com/flutter/packages/tree/main/packages/google_sign_in/google_sign_in_web
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_sign_in%22
version: 0.12.3+3
version: 0.12.4
environment:
sdk: ^3.3.0
@ -22,10 +22,10 @@ dependencies:
sdk: flutter
flutter_web_plugins:
sdk: flutter
google_identity_services_web: ^0.3.0
google_identity_services_web: ^0.3.1
google_sign_in_platform_interface: ^2.4.0
http: ">=0.13.0 <2.0.0"
web: ">=0.3.0 <0.6.0" # because google_identity_services
web: ^0.5.0
dev_dependencies:
flutter_test: