Prepare dev (minus flutter_gallery) for use_super_parameters (#100516)

This commit is contained in:
Michael Goderbauer
2022-03-29 12:52:42 -07:00
committed by GitHub
parent 43029bebc4
commit 195a1cc413
59 changed files with 89 additions and 108 deletions

View File

@@ -5,7 +5,7 @@
import 'template.dart';
class SurfaceTintTemplate extends TokenTemplate {
const SurfaceTintTemplate(String fileName, Map<String, dynamic> tokens) : super(fileName, tokens);
const SurfaceTintTemplate(super.fileName, super.tokens);
@override
String generate() => '''

View File

@@ -5,7 +5,7 @@
import 'template.dart';
class TypographyTemplate extends TokenTemplate {
const TypographyTemplate(String fileName, Map<String, dynamic> tokens) : super(fileName, tokens);
const TypographyTemplate(super.fileName, super.tokens);
@override
String generate() => '''

View File

@@ -3,7 +3,7 @@ description: A command line script to generate Material component defaults from
version: 1.0.0
environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.17.0-0 <3.0.0"
dependencies:

View File

@@ -120,7 +120,7 @@ static final String tokenBar = 'bar';
}
class TestTemplate extends TokenTemplate {
TestTemplate(String fileName, Map<String, dynamic> tokens) : super(fileName, tokens);
TestTemplate(super.fileName, super.tokens);
@override
String generate() => '''

View File

@@ -13,8 +13,7 @@ import 'utils.dart';
/// Generates the key mapping for Android, based on the information in the key
/// data structure given to it.
class AndroidCodeGenerator extends PlatformCodeGenerator {
AndroidCodeGenerator(PhysicalKeyData physicalData, LogicalKeyData logicalData)
: super(physicalData, logicalData);
AndroidCodeGenerator(super.physicalData, super.logicalData);
/// This generates the map of Android key codes to logical keys.
String get _androidKeyCodeMap {

View File

@@ -48,8 +48,7 @@ abstract class BaseCodeGenerator {
/// A code generator which also defines platform-based behavior.
abstract class PlatformCodeGenerator extends BaseCodeGenerator {
PlatformCodeGenerator(PhysicalKeyData keyData, LogicalKeyData logicalData)
: super(keyData, logicalData);
PlatformCodeGenerator(super.keyData, super.logicalData);
/// Absolute path to the output file.
///

View File

@@ -15,13 +15,12 @@ import 'utils.dart';
/// data structure given to it.
class GtkCodeGenerator extends PlatformCodeGenerator {
GtkCodeGenerator(
PhysicalKeyData keyData,
LogicalKeyData logicalData,
super.keyData,
super.logicalData,
String modifierBitMapping,
String lockBitMapping,
) : _modifierBitMapping = parseMapOfListOfString(modifierBitMapping),
_lockBitMapping = parseMapOfListOfString(lockBitMapping),
super(keyData, logicalData);
_lockBitMapping = parseMapOfListOfString(lockBitMapping);
/// This generates the map of XKB scan codes to Flutter physical keys.
String get _xkbScanCodeMap {

View File

@@ -28,8 +28,7 @@ const List<String> kSpecialLogicalKeys = <String>['CapsLock'];
/// Generates the key mapping for iOS, based on the information in the key
/// data structure given to it.
class IOSCodeGenerator extends PlatformCodeGenerator {
IOSCodeGenerator(PhysicalKeyData keyData, LogicalKeyData logicalData)
: super(keyData, logicalData);
IOSCodeGenerator(super.keyData, super.logicalData);
/// This generates the map of iOS key codes to physical keys.
String get _scanCodeMap {

View File

@@ -49,7 +49,7 @@ class SynonymKeyInfo {
/// Generates the keyboard_key.dart based on the information in the key data
/// structure given to it.
class KeyboardKeysCodeGenerator extends BaseCodeGenerator {
KeyboardKeysCodeGenerator(PhysicalKeyData keyData, LogicalKeyData logicalData) : super(keyData, logicalData);
KeyboardKeysCodeGenerator(super.keyData, super.logicalData);
/// Gets the generated definitions of PhysicalKeyboardKeys.
String get _physicalDefinitions {

View File

@@ -37,8 +37,7 @@ bool _isDigit(String? char) {
/// Generates the keyboard_maps.dart files, based on the information in the key
/// data structure given to it.
class KeyboardMapsCodeGenerator extends BaseCodeGenerator {
KeyboardMapsCodeGenerator(PhysicalKeyData keyData, LogicalKeyData logicalData)
: super(keyData, logicalData);
KeyboardMapsCodeGenerator(super.keyData, super.logicalData);
List<PhysicalKeyEntry> get _numpadKeyData {
return keyData.entries.where((PhysicalKeyEntry entry) {

View File

@@ -28,8 +28,7 @@ const List<String> kSpecialLogicalKeys = <String>['CapsLock'];
/// Generates the key mapping for macOS, based on the information in the key
/// data structure given to it.
class MacOSCodeGenerator extends PlatformCodeGenerator {
MacOSCodeGenerator(PhysicalKeyData keyData, LogicalKeyData logicalData)
: super(keyData, logicalData);
MacOSCodeGenerator(super.keyData, super.logicalData);
/// This generates the map of macOS key codes to physical keys.
String get _scanCodeMap {

View File

@@ -16,7 +16,7 @@ String _toUpperCammel(String lowerCammel) {
/// Generates the common/testing/key_codes.h based on the information in the key
/// data structure given to it.
class KeyCodesCcGenerator extends BaseCodeGenerator {
KeyCodesCcGenerator(PhysicalKeyData keyData, LogicalKeyData logicalData) : super(keyData, logicalData);
KeyCodesCcGenerator(super.keyData, super.logicalData);
/// Gets the generated definitions of PhysicalKeyboardKeys.
String get _physicalDefinitions {

View File

@@ -14,11 +14,10 @@ import 'utils.dart';
/// data structure given to it.
class WebCodeGenerator extends PlatformCodeGenerator {
WebCodeGenerator(
PhysicalKeyData keyData,
LogicalKeyData logicalData,
super.keyData,
super.logicalData,
String logicalLocationMap,
) : _logicalLocationMap = parseMapOfListOfNullableString(logicalLocationMap),
super(keyData, logicalData);
) : _logicalLocationMap = parseMapOfListOfNullableString(logicalLocationMap);
/// This generates the map of Web KeyboardEvent codes to logical key ids.
String get _webLogicalKeyCodeMap {

View File

@@ -14,11 +14,10 @@ import 'utils.dart';
/// data structure given to it.
class WindowsCodeGenerator extends PlatformCodeGenerator {
WindowsCodeGenerator(
PhysicalKeyData keyData,
LogicalKeyData logicalData,
super.keyData,
super.logicalData,
String scancodeToLogical,
) : _scancodeToLogical = parseMapOfString(scancodeToLogical),
super(keyData, logicalData);
) : _scancodeToLogical = parseMapOfString(scancodeToLogical);
/// This generates the map of Windows scan codes to physical keys.
String get _windowsScanCodeMap {

View File

@@ -2,7 +2,7 @@ name: gen_keycodes
description: Generates keycode source files from various resources.
environment:
sdk: ">=2.12.0-0 <3.0.0"
sdk: ">=2.17.0-0 <3.0.0"
dependencies:
args: 2.3.0

View File

@@ -4,7 +4,7 @@ version: 0.0.1
homepage: https://flutter.dev
environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.17.0-0 <3.0.0"
dependencies:
flutter: