1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Bump deps and min SDKs, move web apps to new bootstrapping logic (#2292)

Also removed the web measurement experiment from the material 3 demo
This commit is contained in:
Kevin Moore
2024-05-14 22:33:41 -07:00
committed by GitHub
parent 4776ad597b
commit a858f4701e
83 changed files with 90 additions and 556 deletions

View File

@@ -2,34 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:web_startup_analyzer/web_startup_analyzer.dart';
import 'constants.dart';
import 'home.dart';
void main() async {
var analyzer = WebStartupAnalyzer(additionalFrameCount: 10);
debugPrint(json.encode(analyzer.startupTiming));
analyzer.onFirstFrame.addListener(() {
debugPrint(json.encode({'firstFrame': analyzer.onFirstFrame.value}));
});
analyzer.onFirstPaint.addListener(() {
debugPrint(json.encode({
'firstPaint': analyzer.onFirstPaint.value?.$1,
'firstContentfulPaint': analyzer.onFirstPaint.value?.$2,
}));
});
analyzer.onAdditionalFrames.addListener(() {
debugPrint(json.encode({
'additionalFrames': analyzer.onAdditionalFrames.value,
}));
});
runApp(
const App(),
);
runApp(const App());
}
class App extends StatefulWidget {