flutter/dev/integration_tests/named_isolates/lib/main.dart
Michael Klimushyn ce434022b5
Fix "E2E test setting and using isolate names (#23388)" (#23438)
Updates gradle.

This reverts commit d07c09c9a1.
2018-10-24 11:44:45 -07:00

24 lines
583 B
Dart

import 'dart:ui' as ui;
import 'package:flutter/material.dart';
// named_isolates_test depends on these values.
const String _kFirstIsolateName = 'first isolate name';
const String _kSecondIsolateName = 'second isolate name';
void first() {
_run(_kFirstIsolateName);
}
void second() {
_run(_kSecondIsolateName);
}
void _run(String name) {
ui.window.setIsolateDebugName(name);
runApp(Center(child: Text(name, textDirection: TextDirection.ltr)));
}
// `first` and `second` are the actual entrypoints to this app, but dart specs
// require a main function.
void main() { }