copyWith method

  1. @visibleForTesting
TestBrowserPlatform copyWith({
  1. String? version,
  2. String? userAgent,
})

Creates a new TestBrowserPlatform from this one.

If a parameter is given non-null argument value, the created object will have that value for the corresponding property, otherwise it will use this object's value for that property.

Implementation

@visibleForTesting
TestBrowserPlatform copyWith({String? version, String? userAgent}) =>
    TestBrowserPlatform(
      version: version ?? _version,
      userAgent: userAgent ?? _userAgent,
    );