Skip to content

Remove deprecated property window from dart:ui #877

@Nidal-Bakir

Description

@Nidal-Bakir

New Issue Checklist

Issue Description

The window property from dart:ui is deprecated and should not be used.

This property is used in the Parse Flutter SDK in the parse_server_sdk_flutter.dart source file.

locale: locale ??
(sdk.parseIsWeb ? ui.window.locale.toString() : Platform.localeName),

Steps to reproduce

  1. Install Flutter 3.10.0/Dart 3
  2. run the following command: flutter analyze --no-fatal-infos

You should see something like this:

Analyzing flutter...

info • 'window' is deprecated and shouldn't be used. Look up the current FlutterView from the context via View.of(context) or consult the PlatformDispatcher directly instead.
Deprecated to prepare for the upcoming multi-window support. This feature was deprecated after v3.7.0-32.0.pre • lib/parse_server_sdk_flutter.dart:82:17 •
deprecated_member_use

1 issue found. (ran in 3.5s)

Actual Outcome

Analyzing flutter...

info • 'window' is deprecated and shouldn't be used. Look up the current FlutterView from the context via View.of(context) or consult the PlatformDispatcher directly instead.
Deprecated to prepare for the upcoming multi-window support. This feature was deprecated after v3.7.0-32.0.pre • lib/parse_server_sdk_flutter.dart:82:17 •
deprecated_member_use

1 issue found. (ran in 3.5s)

Expected Outcome

Analyzing flutter...
No issues found! (ran in 2.5s)

Environment

Parse Flutter SDK

  • SDK version: 4.0.0
  • Flutter version: 3.10.0
  • Dart version: 3
  • Operating system version: Ubuntu 22.04.2 LTS x86_64

Server

  • Parse Server version: N/A

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions