_binding_web.dart 695 Bytes
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

 import 'package:flutter/widgets.dart';

 import 'binding.dart';

 /// Ensure the [WidgetsBinding] is initialized.
WidgetsBinding ensureInitialized([@visibleForTesting Map<String, String> environment]) {
  if (WidgetsBinding.instance == null) {
    AutomatedTestWidgetsFlutterBinding();
  }
  assert(WidgetsBinding.instance is TestWidgetsFlutterBinding);
  return WidgetsBinding.instance;
}

 /// This method is a noop on the web.
void setupHttpOverrides() { }

 /// This method is a noop on the web.
void mockFlutterAssets() { }