main.dart 748 Bytes
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
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() { }