Unverified Commit cd97f23a authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

ensure dart defines work on web and not web (#51505)

parent 0a9b358e
// Copyright 2014 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 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
test('defines match expectations per platform', () {
expect(kIsWeb, !const bool.fromEnvironment('dart.library.io'));
expect(kIsWeb, !const bool.fromEnvironment('dart.library.isolate'));
expect(kIsWeb, const bool.fromEnvironment('dart.library.html'));
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment