b6b3ac8549
This adds a helper library to help us try out small hot reload behaviors easily on the VM. Change-Id: I01c76d3c4be8a77e5efe5b934e8c26de09a3a771 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355260 Reviewed-by: Nicholas Shahan <nshahan@google.com> Commit-Queue: Sigmund Cherem <sigmund@google.com>
18 lines
510 B
Dart
18 lines
510 B
Dart
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
import 'hot_reload_helper.dart' as helper;
|
|
|
|
void myfunction(String m, int? y) => print('$m: 4');
|
|
|
|
Future<void> reloadExample() async {
|
|
myfunction('text', 1);
|
|
}
|
|
|
|
/// Usage:
|
|
/// ```
|
|
/// dart --disable-dart-dev --enable-vm-service example.dart
|
|
/// ```
|
|
void main() => helper.run(reloadExample);
|