# Deprecated API removed after v3.7

> After reaching end of life, the following deprecated APIs were removed from Flutter.



## Summary

In accordance with Flutter's [Deprecation Policy][],
deprecated APIs that reached end of life after the
3.7 stable release have been removed.

All affected APIs have been compiled into this
primary source to aid in migration. A
[quick reference sheet][] is available as well.

[Deprecation Policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#deprecations
[quick reference sheet]: /go/deprecations-removed-after-3-7

## Changes

This section lists the deprecations, listed by the affected class.

### `GestureRecognizer.kind` & subclasses

Supported by Flutter Fix: yes

`GestureRecognizer.kind` was deprecated in v2.3.
Use `GestureRecognizer.supportedDevices` instead.

This same change affects all subclasses of `GestureRecognizer`:

* `EagerGestureRecognizer`
* `ForcePressGestureRecognizer`
* `LongPressGestureRecognizer`
* `DragGestureRecognizer`
* `VerticalDragGestureRecognizer`
* `HorizontalDragGestureRecognizer`
* `MultiDragGestureRecognizer`
* `ImmediateMultiDragGestureRecognizer`
* `HorizontalMultiDragGestureRecognizer`
* `VerticalMultiDragGestureRecognizer`
* `DelayedMultiDragGestureRecognizer`
* `DoubleTapGestureRecognizer`
* `MultiTapGestureRecognizer`
* `OneSequenceGestureRecognizer`
* `PrimaryPointerGestureRecognizer`
* `ScaleGestureRecognizer`

This change allowed for multiple devices to be recognized for a gesture, rather
than the single option `kind` provided.

**Migration guide**

Code before migration:

```dart
var myRecognizer = GestureRecognizer(
  kind: PointerDeviceKind.mouse,
);
```

Code after migration:

```dart
var myRecognizer = GestureRecognizer(
  supportedDevices: <PointerDeviceKind>[ PointerDeviceKind.mouse ],
);

```

**References**

API documentation:

* [`GestureRecognizer`][]
* [`EagerGestureRecognizer`][]
* [`ForcePressGestureRecognizer`][]
* [`LongPressGestureRecognizer`][]
* [`DragGestureRecognizer`][]
* [`VerticalDragGestureRecognizer`][]
* [`HorizontalDragGestureRecognizer`][]
* [`MultiDragGestureRecognizer`][]
* [`ImmediateMultiDragGestureRecognizer`][]
* [`HorizontalMultiDragGestureRecognizer`][]
* [`VerticalMultiDragGestureRecognizer`][]
* [`DelayedMultiDragGestureRecognizer`][]
* [`DoubleTapGestureRecognizer`][]
* [`MultiTapGestureRecognizer`][]
* [`OneSequenceGestureRecognizer`][]
* [`PrimaryPointerGestureRecognizer`][]
* [`ScaleGestureRecognizer`][]

Relevant PRs:

* Deprecated in [#81858][]
* Removed in [#119572][]

[`GestureRecognizer`]: https://api.flutter.dev/flutter/gestures/GestureRecognizer-class.html
[`EagerGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/EagerGestureRecognizer-class.html
[`ForcePressGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/ForcePressGestureRecognizer-class.html
[`LongPressGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/LongPressGestureRecognizer-class.html
[`DragGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/DragGestureRecognizer-class.html
[`VerticalDragGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/VerticalDragGestureRecognizer-class.html
[`HorizontalDragGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/HorizontalDragGestureRecognizer-class.html
[`MultiDragGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/MultiDragGestureRecognizer-class.html
[`ImmediateMultiDragGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/ImmediateMultiDragGestureRecognizer-class.html
[`HorizontalMultiDragGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/HorizontalMultiDragGestureRecognizer-class.html
[`VerticalMultiDragGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/VerticalMultiDragGestureRecognizer-class.html
[`DelayedMultiDragGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/DelayedMultiDragGestureRecognizer-class.html
[`DoubleTapGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/DoubleTapGestureRecognizer-class.html
[`MultiTapGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/MultiTapGestureRecognizer-class.html
[`OneSequenceGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/OneSequenceGestureRecognizer-class.html
[`PrimaryPointerGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/PrimaryPointerGestureRecognizer-class.html
[`ScaleGestureRecognizer`]: https://api.flutter.dev/flutter/gestures/ScaleGestureRecognizer-class.html


[#81858]: https://github.com/flutter/flutter/pull/81858
[#119572]: https://github.com/flutter/flutter/pull/119572

---

### `ThemeData` `accentColor`, `accentColorBrightness`, `accentColorTextTheme`, `accentColorIconTheme`, and `buttonColor`

Supported by Flutter Fix: yes

The `accentColor`, `accentColorBrightness`, `accentColorTextTheme`,
`accentColorIconTheme`, and `buttonColor` properties of `ThemeData` were
deprecated in v2.3.

This change better aligned `ThemeData` with Material Design guidelines. It also
created more clarity in theming by relying either on the core color scheme or
individual component themes for desired styling.

The `accentColorBrightness`, `accentColorTextTheme`,
`accentColorIconTheme`, and `buttonColor` are no longer used by the framework.
References should be removed.

Uses of `ThemeData.accentColor` should be replaced with
`ThemeData.colorScheme.secondary`.

## Migration guide

Code before migration:

```dart
var myTheme = ThemeData(
  //...
  accentColor: Colors.blue,
  //...
);
var color = myTheme.accentColor;
```

Code after migration:

```dart
var myTheme = ThemeData(
  //...
  colorScheme: ColorScheme(
    //...
    secondary:Colors.blue,
    //...
  ),
  //...
);
var color = myTheme.colorScheme.secondary;
```

**References**

* [Accent color migration guide][]

API documentation:

* [`ThemeData`][]
* [`ColorScheme`][]

Relevant issues:

* [#56639][]
* [#84748][]
* [#56918][]
* [#91772][]

Relevant PRs:

Deprecated in:

* [#92822][]
* [#81336][]
* [#85144][]

Removed in:

* [#118658][]
* [#119360][]
* [#120577][]
* [#120932][]

[Accent color migration guide]: /release/breaking-changes/theme-data-accent-properties
[`ThemeData`]: https://api.flutter.dev/flutter/widgets/Draggable-class.html
[`ColorScheme`]: https://api.flutter.dev/flutter/widgets/LongPressDraggable-class.html
[#56639]: https://github.com/flutter/flutter/pull/56639
[#84748]: https://github.com/flutter/flutter/pull/84748
[#56918]: https://github.com/flutter/flutter/pull/56918
[#91772]: https://github.com/flutter/flutter/pull/91772
[#92822]: https://github.com/flutter/flutter/pull/92822
[#81336]: https://github.com/flutter/flutter/pull/81336
[#85144]: https://github.com/flutter/flutter/pull/85144
[#118658]: https://github.com/flutter/flutter/pull/118658
[#119360]: https://github.com/flutter/flutter/pull/119360
[#120577]: https://github.com/flutter/flutter/pull/120577
[#120932]: https://github.com/flutter/flutter/pull/120932

---

### `AppBar`, `SliverAppBar`, and `AppBarTheme` updates

Supported by Flutter Fix: yes

In v2.4, several changes were made to the app bar classes and their themes to
better align with Material Design. Several properties were deprecated at that
time and have been removed.

For `AppBar`, `SliverAppBar` and `AppBarTheme`:

* `brightness` has been removed, and is replaced by `systemOverlayStyle`
* `textTheme` has been removed, and is replaced by either `toolbarTextStyle` or `titleTextStyle`.
* `backwardsCompatibility` can be removed, as it was a temporary migration flag for these properties.

Additionally, `AppBarTheme.color` was removed, with `AppBarTheme.backgroundColor`
as its replacement.

**Migration guide**

Code before migration:

```dart
var toolbarTextStyle = TextStyle(...);
var titleTextStyle = TextStyle(...);
AppBar(
  brightness: Brightness.light,
  textTheme: TextTheme(
    bodyMedium: toolbarTextStyle,
    titleLarge: titleTextStyle,
  )
  backwardsCompatibility: true,
);
AppBarTheme(color: Colors.blue);
```

Code after migration:

```dart
var toolbarTextStyle = TextStyle(...);
var titleTextStyle = TextStyle(...);
AppBar(
  systemOverlayStyle: SystemOverlayStyle(statusBarBrightness: Brightness.light),
  toolbarTextStyle: toolbarTextStyle,
  titleTextStyle: titleTextStyle,
);
AppBarTheme(backgroundColor: Colors.blue);
```

**References**

API documentation:

* [`AppBar`][]
* [`SliverAppBar`][]
* [`AppBarTheme`][]

Relevant issues:

* [#86127][]
* [#70645][]
* [#67921][]
* [#67497][]
* [#50606][]
* [#51820][]
* [#61618][]

Deprecated in:

* [#86198][]
* [#71184][]

Removed in:

* [#120618][]
* [#119253][]
* [#120575][]


[`AppBar`]: https://api.flutter.dev/flutter/material/AppBar-class.html
[`SliverAppBar`]: https://api.flutter.dev/flutter/material/SliverAppBar-class.html
[`AppBarTheme`]: https://api.flutter.dev/flutter/material/AppBarTheme-class.html
[#86127]: https://github.com/flutter/flutter/pull/86127
[#70645]: https://github.com/flutter/flutter/pull/70645
[#67921]: https://github.com/flutter/flutter/pull/67921
[#67497]: https://github.com/flutter/flutter/pull/67497
[#50606]: https://github.com/flutter/flutter/pull/50606
[#51820]: https://github.com/flutter/flutter/pull/51820
[#61618]: https://github.com/flutter/flutter/pull/61618
[#86198]: https://github.com/flutter/flutter/pull/86198
[#71184]: https://github.com/flutter/flutter/pull/71184
[#120618]: https://github.com/flutter/flutter/pull/120618
[#119253]: https://github.com/flutter/flutter/pull/119253
[#120575]: https://github.com/flutter/flutter/pull/120575

---

### `SystemChrome.setEnabledSystemUIOverlays`

Supported by Flutter Fix: yes

In v2.3, `SystemChrome.setEnabledSystemUIOVerlays`, the static method for
setting device system level overlays like status and navigation bars, was
deprecated in favor of `SystemChrome.setEnabledSystemUIMode`.

This change allowed for setting up common fullscreen modes that match native
Android app designs like edge to edge.

Manually setting overlays, instead of choosing a specific mode, is still
supported through `SystemUiMode.manual`, allowing developers to pass the same
list of overlays as before.

**Migration guide**

Code before migration:
```dart
SystemChrome.setEnabledSystemUIOverlays(<SystemUiOverlay>[
  SystemUiOverlay.top,
  SystemUiOverlay.bottom,
]);
```

Code after migration:
```dart
SystemChrome.setEnabledSystemUIMode(
  SystemUiMode.manual,
  overlays: <SystemUiOverlay>[
    SystemUiOverlay.top,
    SystemUiOverlay.bottom,
  ],
);
```

**References**

API documentation:

* [`SystemChrome`][]

Relevant issues:

* [#35748][]
* [#40974][]
* [#44033][]
* [#63761][]
* [#69999][]

Deprecated in:

* [#81303][]

Removed in:

* [#11957][]

[`SystemChrome`]: https://api.flutter.dev/flutter/services/SystemChrome-class.html
[#35748]: https://github.com/flutter/flutter/pull/35748
[#40974]: https://github.com/flutter/flutter/pull/40974
[#44033]: https://github.com/flutter/flutter/pull/44033
[#63761]: https://github.com/flutter/flutter/pull/63761
[#69999]: https://github.com/flutter/flutter/pull/69999
[#81303]: https://github.com/flutter/flutter/pull/81303
[#11957]: https://github.com/flutter/flutter/pull/11957

---

### `SystemNavigator.routeUpdated`

Supported by Flutter Fix: yes

In v2.3, `SystemNavigator.routeUpdated` was deprecated in favor of
`SystemNavigator.routeInformationUpdated`.

Instead of having two ways to update the engine about the current route, the
change moved everything to one API, which separately selects the single-entry
history mode if a `Navigator` that reports routes is created.

**Migration guide**

Code before migration:

```dart
SystemNavigator.routeUpdated(routeName: 'foo', previousRouteName: 'bar');
```

Code after migration:

```dart
SystemNavigator.routeInformationUpdated(location: 'foo');
```

**References**

API documentation:

* [`SystemNavigator`][]

Relevant issues:

* [#82574][]

Deprecated in:

* [#82594][]

Removed in:

* [#119187][]


[`SystemNavigator`]: https://api.flutter.dev/flutter/services/SystemNavigator-class.html
[#82594]: https://github.com/flutter/flutter/pull/82594
[#82574]: https://github.com/flutter/flutter/pull/82574
[#119187]: https://github.com/flutter/flutter/pull/119187

---

### `AnimatedSize.vsync`

Supported by Flutter Fix: yes

In v2.2, `AnimatedSize.vsyc` was deprecated. This property was no longer
necessary after `AnimatedSize` was converted to a `StatefulWidget` whose `State`
mixed in `SingleTickerProviderStateMixin`. The change was made to fix a memory
leak.

Uses of `vsync` should be removed, as `AnimatedSize` now handles this property.

**Migration guide**

Code before migration:

```dart
AnimatedSize(
  vsync: this,
  // ...
);
```

Code after migration:

```dart
AnimatedSize(
  // ...
);
```

**References**

API documentation:

* [`AnimatedSize`][]

Deprecated in:

* [#80554][]
* [#81067][]

Removed in:

* [#119186][]

[`AnimatedSize`]: https://api.flutter.dev/flutter/widgets/AnimatedSize-class.html
[#80554]: https://github.com/flutter/flutter/pull/80554
[#81067]: https://github.com/flutter/flutter/pull/81067
[#119186]: https://github.com/flutter/flutter/pull/119186

---

## Timeline

In stable release: 3.10

