mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Dart lints added: * Avoid optional new * Avoid optional const * Prefer single quotes * Prefer default assignment `=`
28 lines
712 B
Dart
28 lines
712 B
Dart
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import 'dart:isolate';
|
|
|
|
void main() {}
|
|
|
|
@pragma('vm:entry-point')
|
|
void fixturesAreFunctionalMain() {
|
|
sayHiFromFixturesAreFunctionalMain();
|
|
}
|
|
|
|
void sayHiFromFixturesAreFunctionalMain() native 'SayHiFromFixturesAreFunctionalMain';
|
|
|
|
void notifyNative() native 'NotifyNative';
|
|
|
|
void secondaryIsolateMain(String message) {
|
|
print('Secondary isolate got message: ' + message);
|
|
notifyNative();
|
|
}
|
|
|
|
@pragma('vm:entry-point')
|
|
void testCanLaunchSecondaryIsolate() {
|
|
Isolate.spawn(secondaryIsolateMain, 'Hello from root isolate.');
|
|
notifyNative();
|
|
}
|