Route<T> constructor

Route<T>(
  1. {RouteSettings? settings}
)

Initialize the Route.

If the settings are not provided, an empty RouteSettings object is used instead.

Implementation

Route({ RouteSettings? settings }) : _settings = settings ?? const RouteSettings() {
  if (kFlutterMemoryAllocationsEnabled) {
    FlutterMemoryAllocations.instance.dispatchObjectCreated(
      library: 'package:flutter/widgets.dart',
      className: '$Route<$T>',
      object: this,
    );
  }
}