Adding class modifiers to dart:math.

Just adds `interface` modifier to `Random`.

Change-Id: I221a97a3c941befb9039a14d6ba827ab095837ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288207
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This commit is contained in:
Lasse R.H. Nielsen 2023-03-13 14:01:26 +00:00 committed by Commit Queue
parent 1e80548c5f
commit 7d4ad1706e
2 changed files with 8 additions and 1 deletions

View file

@ -139,6 +139,13 @@
removed. See [#49536](https://github.com/dart-lang/sdk/issues/49536) for
details.
#### `dart:math`
- **Breaking change when migrating code to Dart 3.0**:
Some changes to platform libraries only affect code when it is migrated
to language version 3.0.
- The `Random` interface can only be implemented, not extended.
#### `dart:io`
- Deprecated `NetworkInterface.listSupported`. Has always returned true since

View file

@ -28,7 +28,7 @@ part of dart.math;
/// var boolValue = Random().nextBool(); // true or false, with equal chance.
/// ```
///
abstract class Random {
abstract interface class Random {
/// Creates a random number generator.
///
/// The optional parameter [seed] is used to initialize the