mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

This enables the manual tests to be built on a macOS desktop machine in desktop mode. I created the macos directory by using flutter create --macos
24 lines
740 B
Dart
24 lines
740 B
Dart
// Copyright 2017 The Chromium 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:io';
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
|
|
void main() {
|
|
if (Platform.isMacOS) {
|
|
// TODO(gspencergoog): Update this when TargetPlatform includes macOS. https://github.com/flutter/flutter/issues/31366
|
|
// See https://github.com/flutter/flutter/wiki/Desktop-shells#target-platform-override
|
|
debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia;
|
|
}
|
|
|
|
runApp(const Directionality(
|
|
textDirection: TextDirection.ltr,
|
|
child: Center(
|
|
child: Text('flutter run -t xxx.dart'),
|
|
),
|
|
));
|
|
}
|