HashChangeEvent constructor Null safety

HashChangeEvent(
  1. String type,
  2. {bool canBubble: true,
  3. bool cancelable: true,
  4. String? oldUrl,
  5. String? newUrl}
)

Implementation

factory HashChangeEvent(String type,
    {bool canBubble: true,
    bool cancelable: true,
    String? oldUrl,
    String? newUrl}) {
  var options = {
    'canBubble': canBubble,
    'cancelable': cancelable,
    'oldURL': oldUrl,
    'newURL': newUrl,
  };
  return JS('HashChangeEvent', 'new HashChangeEvent(#, #)', type,
      convertDartToNative_Dictionary(options));
}