Skip to content

Commit b9fd63f

Browse files
committed
feat: support web in package:platform
1 parent 0b2bd3f commit b9fd63f

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

Diff for: pkgs/platform/lib/platform.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// found in the LICENSE file.
44

55
// Core interfaces & classes.
6-
export 'src/interface/local_platform.dart';
6+
export 'src/interface/local_platform.dart'
7+
if (dart.library.js_interop) 'src/interface/local_platform_web.dart';
78
export 'src/interface/platform.dart';
89
export 'src/testing/fake_platform.dart';
+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// Copyright 2013 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'platform.dart';
6+
7+
/// `Platform` implementation that .
8+
class LocalPlatform extends Platform {
9+
/// Creates a new [LocalPlatform].
10+
const LocalPlatform();
11+
12+
@override
13+
int get numberOfProcessors => 0;
14+
15+
@override
16+
String get pathSeparator => '/';
17+
18+
@override
19+
String get operatingSystem => 'TODO';
20+
21+
@override
22+
String get operatingSystemVersion => 'TODO';
23+
24+
@override
25+
String get localHostname => 'TODO';
26+
27+
@override
28+
Map<String, String> get environment => {};
29+
30+
@override
31+
String get executable => 'TODO';
32+
33+
@override
34+
String get resolvedExecutable => 'TODO';
35+
36+
@override
37+
Uri get script => Uri.base;
38+
39+
@override
40+
List<String> get executableArguments => [];
41+
42+
@override
43+
String? get packageConfig => 'TODO';
44+
45+
@override
46+
String get version => 'TODO';
47+
48+
@override
49+
bool get stdinSupportsAnsi => false;
50+
51+
@override
52+
bool get stdoutSupportsAnsi => false;
53+
54+
@override
55+
String get localeName => 'TODO';
56+
}

0 commit comments

Comments
 (0)