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

https://github.com/flutter/flutter/issues/17956 * Add a `debugInstrumentAction()` method that will wrap an action in a stopwatch and print the time it took to run the action. * Add a global `debugInstrumentationEnabled` that will control whether `debugInstrumentAction()` does anything (even in debug builds). * Add some basic instrumentation to `registerServiceExtension()` * Temporarily enable the `debugInstrumentationEnabled` flag in the Gallery to give us better visibility into what's happening in https://github.com/flutter/flutter/issues/17956
22 lines
730 B
Dart
22 lines
730 B
Dart
// Copyright 2015 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.
|
|
|
|
// Thanks for checking out Flutter!
|
|
// Like what you see? Tweet us @flutterio
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'gallery/app.dart';
|
|
|
|
void main() {
|
|
// Temporary debugging hook for https://github.com/flutter/flutter/issues/17956
|
|
debugInstrumentationEnabled = true;
|
|
|
|
// Overriding https://github.com/flutter/flutter/issues/13736 for better
|
|
// visual effect at the cost of performance.
|
|
MaterialPageRoute.debugEnableFadingRoutes = true; // ignore: deprecated_member_use
|
|
runApp(const GalleryApp());
|
|
}
|