Migrate flutter_tool tool helper files to null safety (#78845)
This commit is contained in:
@@ -2,9 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// @dart = 2.8
|
||||
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:package_config/package_config.dart';
|
||||
|
||||
/// The JavaScript bootstrap script to support in-browser hot restart.
|
||||
@@ -17,8 +14,8 @@ import 'package:package_config/package_config.dart';
|
||||
/// and is responsible for bootstrapping the RequireJS modules and attaching
|
||||
/// the hot reload hooks.
|
||||
String generateBootstrapScript({
|
||||
@required String requireUrl,
|
||||
@required String mapperUrl,
|
||||
required String requireUrl,
|
||||
required String mapperUrl,
|
||||
}) {
|
||||
return '''
|
||||
"use strict";
|
||||
@@ -54,9 +51,9 @@ document.head.appendChild(requireEl);
|
||||
/// `foo__bar__baz`. Rather than attempt to guess, we assume the first property of
|
||||
/// this object is the module.
|
||||
String generateMainModule({
|
||||
@required String entrypoint,
|
||||
@required bool nullAssertions,
|
||||
@required bool nativeNullAssertions,
|
||||
required String entrypoint,
|
||||
required bool nullAssertions,
|
||||
required bool nativeNullAssertions,
|
||||
String bootstrapModule = 'main_module.bootstrap',
|
||||
}) {
|
||||
// TODO(jonahwilliams): fix typo in dwds and update.
|
||||
@@ -102,10 +99,10 @@ define("$bootstrapModule", ["$entrypoint", "dart_sdk"], function(app, dart_sdk)
|
||||
///
|
||||
/// This hard-codes the device pixel ratio to 3.0 and a 2400 x 1800 window size.
|
||||
String generateTestEntrypoint({
|
||||
@required String relativeTestPath,
|
||||
@required String absolutePath,
|
||||
@required String testConfigPath,
|
||||
@required LanguageVersion languageVersion,
|
||||
required String relativeTestPath,
|
||||
required String absolutePath,
|
||||
required String testConfigPath,
|
||||
required LanguageVersion languageVersion,
|
||||
}) {
|
||||
return '''
|
||||
// @dart = ${languageVersion.major}.${languageVersion.minor}
|
||||
|
||||
Reference in New Issue
Block a user