parent
ac88d4ba5d
commit
61a0add286
@ -74,7 +74,7 @@ linter:
|
|||||||
# - avoid_positional_boolean_parameters # would have been nice to enable this but by now there's too many places that break it
|
# - avoid_positional_boolean_parameters # would have been nice to enable this but by now there's too many places that break it
|
||||||
- avoid_print
|
- avoid_print
|
||||||
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
|
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
|
||||||
# - avoid_redundant_argument_values # not yet tested
|
- avoid_redundant_argument_values
|
||||||
- avoid_relative_lib_imports
|
- avoid_relative_lib_imports
|
||||||
- avoid_renaming_method_parameters
|
- avoid_renaming_method_parameters
|
||||||
- avoid_return_types_on_setters
|
- avoid_return_types_on_setters
|
||||||
|
@ -370,7 +370,6 @@ class UserHeader extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
RichText(text: TextSpan(
|
RichText(text: TextSpan(
|
||||||
@ -569,7 +568,6 @@ class BottomBar extends StatelessWidget {
|
|||||||
border: Border(
|
border: Border(
|
||||||
top: BorderSide(
|
top: BorderSide(
|
||||||
color: Theme.of(context).dividerColor,
|
color: Theme.of(context).dividerColor,
|
||||||
width: 1.0,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -28,7 +28,6 @@ Future<void> main() async {
|
|||||||
},
|
},
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
child: const IgnorePointer(
|
child: const IgnorePointer(
|
||||||
ignoring: true,
|
|
||||||
child: ComplexLayoutApp(),
|
child: ComplexLayoutApp(),
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
@ -147,7 +147,6 @@ class _ShadowWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
size: Size(width, height),
|
size: Size(width, height),
|
||||||
isComplex: true,
|
isComplex: true,
|
||||||
willChange: false,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,6 @@ class _FilteredChildAnimationPageState extends State<FilteredChildAnimationPage>
|
|||||||
color: Colors.green,
|
color: Colors.green,
|
||||||
boxShadow: complex ? <BoxShadow>[
|
boxShadow: complex ? <BoxShadow>[
|
||||||
const BoxShadow(
|
const BoxShadow(
|
||||||
color: Colors.black,
|
|
||||||
blurRadius: 10.0,
|
blurRadius: 10.0,
|
||||||
),
|
),
|
||||||
] : null,
|
] : null,
|
||||||
|
@ -32,7 +32,6 @@ class _MultiWidgetConstructTableState extends State<MultiWidgetConstructTable>
|
|||||||
_controller = AnimationController(
|
_controller = AnimationController(
|
||||||
vsync: this,
|
vsync: this,
|
||||||
duration: const Duration(milliseconds: 10000),
|
duration: const Duration(milliseconds: 10000),
|
||||||
lowerBound: 0,
|
|
||||||
upperBound: colorList.length + 1.0,
|
upperBound: colorList.length + 1.0,
|
||||||
)..repeat();
|
)..repeat();
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ class _CustomPainter extends CustomPainter {
|
|||||||
|
|
||||||
_textPainter.text = span;
|
_textPainter.text = span;
|
||||||
|
|
||||||
_textPainter.layout(minWidth: 0, maxWidth: width);
|
_textPainter.layout(maxWidth: width);
|
||||||
_linePainter.style = PaintingStyle.fill;
|
_linePainter.style = PaintingStyle.fill;
|
||||||
canvas.drawRect(
|
canvas.drawRect(
|
||||||
Rect.fromLTWH(xPosition, yPosition - viewPadding, width, height),
|
Rect.fromLTWH(xPosition, yPosition - viewPadding, width, height),
|
||||||
|
@ -1833,7 +1833,7 @@ void pathOps78() {
|
|||||||
|
|
||||||
void pathOps79() {
|
void pathOps79() {
|
||||||
final Path path79 = Path();
|
final Path path79 = Path();
|
||||||
path79.addRRect(RRect.fromRectAndCorners(const Rect.fromLTRB(0, 0, 64, 56), topLeft: Radius.zero, topRight: Radius.zero, bottomLeft: const Radius.circular(10), bottomRight: Radius.zero, ));
|
path79.addRRect(RRect.fromRectAndCorners(const Rect.fromLTRB(0, 0, 64, 56), bottomLeft: const Radius.circular(10), ));
|
||||||
gFillType = path79.fillType;
|
gFillType = path79.fillType;
|
||||||
path80 = path79.shift(const Offset(906, 136));
|
path80 = path79.shift(const Offset(906, 136));
|
||||||
gFillType = path79.fillType;
|
gFillType = path79.fillType;
|
||||||
@ -5828,7 +5828,7 @@ void pathOps576() {
|
|||||||
path576.moveTo(0, 0);
|
path576.moveTo(0, 0);
|
||||||
path576.lineTo(220.60000000000002, 0);
|
path576.lineTo(220.60000000000002, 0);
|
||||||
path576.quadraticBezierTo(235.60000000000002, 0, 237.569696969697, 7.817946907441011);
|
path576.quadraticBezierTo(235.60000000000002, 0, 237.569696969697, 7.817946907441011);
|
||||||
path576.arcToPoint(const Offset(299.630303030303, 7.817946907441011), radius: const Radius.circular(32), rotation: 0, largeArc: false, clockwise: false);
|
path576.arcToPoint(const Offset(299.630303030303, 7.817946907441011), radius: const Radius.circular(32), clockwise: false);
|
||||||
path576.quadraticBezierTo(301.6, 0, 316.6, 0);
|
path576.quadraticBezierTo(301.6, 0, 316.6, 0);
|
||||||
path576.lineTo(312.6, 0);
|
path576.lineTo(312.6, 0);
|
||||||
path576.lineTo(312.6, 48);
|
path576.lineTo(312.6, 48);
|
||||||
|
@ -25,7 +25,6 @@ class BenchSimpleLazyTextScroll extends WidgetRecorder {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: const <Widget>[
|
children: const <Widget>[
|
||||||
Flexible(
|
Flexible(
|
||||||
flex: 1,
|
|
||||||
child: _TestScrollingWidget(
|
child: _TestScrollingWidget(
|
||||||
initialScrollOffset: 0,
|
initialScrollOffset: 0,
|
||||||
scrollDistance: 300,
|
scrollDistance: 300,
|
||||||
@ -33,7 +32,6 @@ class BenchSimpleLazyTextScroll extends WidgetRecorder {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Flexible(
|
Flexible(
|
||||||
flex: 1,
|
|
||||||
child: _TestScrollingWidget(
|
child: _TestScrollingWidget(
|
||||||
initialScrollOffset: 1000,
|
initialScrollOffset: 1000,
|
||||||
scrollDistance: 500,
|
scrollDistance: 500,
|
||||||
@ -41,7 +39,6 @@ class BenchSimpleLazyTextScroll extends WidgetRecorder {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Flexible(
|
Flexible(
|
||||||
flex: 1,
|
|
||||||
child: _TestScrollingWidget(
|
child: _TestScrollingWidget(
|
||||||
initialScrollOffset: 2000,
|
initialScrollOffset: 2000,
|
||||||
scrollDistance: 700,
|
scrollDistance: 700,
|
||||||
|
@ -417,7 +417,6 @@ class ColorItem extends StatelessWidget {
|
|||||||
bottom: false,
|
bottom: false,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text('$_counter:$prefix$index'),
|
Text('$_counter:$prefix$index'),
|
||||||
Text(colorString()),
|
Text(colorString()),
|
||||||
|
@ -155,7 +155,6 @@ class ProductOption extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.symmetric(horizontal: 11, vertical: 5),
|
padding: const EdgeInsets.symmetric(horizontal: 11, vertical: 5),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
width: 1,
|
|
||||||
color: const Color(0xffebebeb),
|
color: const Color(0xffebebeb),
|
||||||
),
|
),
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(15)),
|
borderRadius: const BorderRadius.all(Radius.circular(15)),
|
||||||
|
@ -31,7 +31,7 @@ import 'src/web/recorder.dart';
|
|||||||
|
|
||||||
typedef RecorderFactory = Recorder Function();
|
typedef RecorderFactory = Recorder Function();
|
||||||
|
|
||||||
const bool isCanvasKit = bool.fromEnvironment('FLUTTER_WEB_USE_SKIA', defaultValue: false);
|
const bool isCanvasKit = bool.fromEnvironment('FLUTTER_WEB_USE_SKIA');
|
||||||
|
|
||||||
/// List of all benchmarks that run in the devicelab.
|
/// List of all benchmarks that run in the devicelab.
|
||||||
///
|
///
|
||||||
|
@ -31,11 +31,9 @@ void main() {
|
|||||||
final List<PointerEventRecord> records = <PointerEventRecord>[
|
final List<PointerEventRecord> records = <PointerEventRecord>[
|
||||||
PointerEventRecord(Duration.zero, <PointerEvent>[
|
PointerEventRecord(Duration.zero, <PointerEvent>[
|
||||||
PointerAddedEvent(
|
PointerAddedEvent(
|
||||||
timeStamp: Duration.zero,
|
|
||||||
position: location,
|
position: location,
|
||||||
),
|
),
|
||||||
PointerDownEvent(
|
PointerDownEvent(
|
||||||
timeStamp: Duration.zero,
|
|
||||||
position: location,
|
position: location,
|
||||||
pointer: 1,
|
pointer: 1,
|
||||||
),
|
),
|
||||||
|
@ -167,16 +167,16 @@ void main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
runAddListenerBenchmark(_kNumWarmUp, addResult: false);
|
runAddListenerBenchmark(_kNumWarmUp, addResult: false);
|
||||||
runAddListenerBenchmark(_kNumIterations, addResult: true);
|
runAddListenerBenchmark(_kNumIterations);
|
||||||
|
|
||||||
runNotifyListenerBenchmark(_kNumWarmUp, addResult: false);
|
runNotifyListenerBenchmark(_kNumWarmUp, addResult: false);
|
||||||
runNotifyListenerBenchmark(_kNumIterations, addResult: true);
|
runNotifyListenerBenchmark(_kNumIterations);
|
||||||
|
|
||||||
runRemoveListenerBenchmark(_kNumWarmUp, addResult: false);
|
runRemoveListenerBenchmark(_kNumWarmUp, addResult: false);
|
||||||
runRemoveListenerBenchmark(_kNumIterations, addResult: true);
|
runRemoveListenerBenchmark(_kNumIterations);
|
||||||
|
|
||||||
runRemoveListenerWhileNotifyingBenchmark(_kNumWarmUp, addResult: false);
|
runRemoveListenerWhileNotifyingBenchmark(_kNumWarmUp, addResult: false);
|
||||||
runRemoveListenerWhileNotifyingBenchmark(_kNumIterations, addResult: true);
|
runRemoveListenerWhileNotifyingBenchmark(_kNumIterations);
|
||||||
|
|
||||||
printer.printToStdout();
|
printer.printToStdout();
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ void main() {
|
|||||||
Offset(0.70, 0.04),
|
Offset(0.70, 0.04),
|
||||||
Offset(0.78, 0.98),
|
Offset(0.78, 0.98),
|
||||||
Offset(0.88, -0.00),
|
Offset(0.88, -0.00),
|
||||||
], tension: 0.00);
|
]);
|
||||||
_testCurve(
|
_testCurve(
|
||||||
catmullRomCurve,
|
catmullRomCurve,
|
||||||
name: 'catmullrom_transform_iteration',
|
name: 'catmullrom_transform_iteration',
|
||||||
|
@ -19,7 +19,7 @@ void main() {
|
|||||||
for (int i = 0; i < words.length; i++) {
|
for (int i = 0; i < words.length; i++) {
|
||||||
if (i.isEven) {
|
if (i.isEven) {
|
||||||
data.add(
|
data.add(
|
||||||
InlineSpanSemanticsInformation(words[i], isPlaceholder: false),
|
InlineSpanSemanticsInformation(words[i]),
|
||||||
);
|
);
|
||||||
} else if (i.isEven) {
|
} else if (i.isEven) {
|
||||||
data.add(
|
data.add(
|
||||||
|
@ -38,7 +38,6 @@ class AndroidPlatformView extends StatelessWidget {
|
|||||||
id: params.id,
|
id: params.id,
|
||||||
viewType: viewType,
|
viewType: viewType,
|
||||||
layoutDirection: TextDirection.ltr,
|
layoutDirection: TextDirection.ltr,
|
||||||
creationParams: null,
|
|
||||||
creationParamsCodec: const StandardMessageCodec(),
|
creationParamsCodec: const StandardMessageCodec(),
|
||||||
)
|
)
|
||||||
..addOnPlatformViewCreatedListener(params.onPlatformViewCreated)
|
..addOnPlatformViewCreatedListener(params.onPlatformViewCreated)
|
||||||
|
@ -30,14 +30,12 @@ Future<void> main(List<String> arguments) async {
|
|||||||
final ArgParser argParser = ArgParser();
|
final ArgParser argParser = ArgParser();
|
||||||
argParser.addOption(
|
argParser.addOption(
|
||||||
'temp',
|
'temp',
|
||||||
defaultsTo: null,
|
|
||||||
help: 'A location where temporary files may be written. Defaults to a '
|
help: 'A location where temporary files may be written. Defaults to a '
|
||||||
'directory in the system temp folder. If specified, will not be '
|
'directory in the system temp folder. If specified, will not be '
|
||||||
'automatically removed at the end of execution.',
|
'automatically removed at the end of execution.',
|
||||||
);
|
);
|
||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
'verbose',
|
'verbose',
|
||||||
defaultsTo: false,
|
|
||||||
negatable: false,
|
negatable: false,
|
||||||
help: 'Print verbose output for the analysis process.',
|
help: 'Print verbose output for the analysis process.',
|
||||||
);
|
);
|
||||||
@ -52,12 +50,10 @@ Future<void> main(List<String> arguments) async {
|
|||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
'include-dart-ui',
|
'include-dart-ui',
|
||||||
defaultsTo: true,
|
defaultsTo: true,
|
||||||
negatable: true,
|
|
||||||
help: 'Includes the dart:ui code supplied by the engine in the analysis.',
|
help: 'Includes the dart:ui code supplied by the engine in the analysis.',
|
||||||
);
|
);
|
||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
'help',
|
'help',
|
||||||
defaultsTo: false,
|
|
||||||
negatable: false,
|
negatable: false,
|
||||||
help: 'Print help for this command.',
|
help: 'Print help for this command.',
|
||||||
);
|
);
|
||||||
@ -69,7 +65,6 @@ Future<void> main(List<String> arguments) async {
|
|||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
'global-activate-snippets',
|
'global-activate-snippets',
|
||||||
defaultsTo: true,
|
defaultsTo: true,
|
||||||
negatable: true,
|
|
||||||
help: 'Whether or not to "pub global activate" the snippets package. If set, will '
|
help: 'Whether or not to "pub global activate" the snippets package. If set, will '
|
||||||
'activate version $_snippetsActivateVersion',
|
'activate version $_snippetsActivateVersion',
|
||||||
);
|
);
|
||||||
@ -476,7 +471,6 @@ class SampleChecker {
|
|||||||
if (!Platform.environment.containsKey('FLUTTER_ROOT')) 'FLUTTER_ROOT': _flutterRoot,
|
if (!Platform.environment.containsKey('FLUTTER_ROOT')) 'FLUTTER_ROOT': _flutterRoot,
|
||||||
if (_flutterVersion!.isNotEmpty) 'FLUTTER_VERSION': _flutterVersion!,
|
if (_flutterVersion!.isNotEmpty) 'FLUTTER_VERSION': _flutterVersion!,
|
||||||
},
|
},
|
||||||
includeParentEnvironment: true,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1155,7 +1149,7 @@ class Sample {
|
|||||||
final StringBuffer buf = StringBuffer('sample ${args.join(' ')}\n');
|
final StringBuffer buf = StringBuffer('sample ${args.join(' ')}\n');
|
||||||
int count = start.line;
|
int count = start.line;
|
||||||
for (final String line in input) {
|
for (final String line in input) {
|
||||||
buf.writeln(' ${count.toString().padLeft(4, ' ')}: $line');
|
buf.writeln(' ${count.toString().padLeft(4)}: $line');
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
|
@ -94,8 +94,6 @@ class AppServer {
|
|||||||
debugPort: browserDebugPort,
|
debugPort: browserDebugPort,
|
||||||
url: appUrl,
|
url: appUrl,
|
||||||
userDataDirectory: userDataDirectory.path,
|
userDataDirectory: userDataDirectory.path,
|
||||||
windowHeight: 1024,
|
|
||||||
windowWidth: 1024,
|
|
||||||
), onError: chromeErrorCompleter.complete);
|
), onError: chromeErrorCompleter.complete);
|
||||||
return AppServer._(server, chrome, chromeErrorCompleter.future);
|
return AppServer._(server, chrome, chromeErrorCompleter.future);
|
||||||
}
|
}
|
||||||
|
@ -687,7 +687,6 @@ class ArchivePublisher {
|
|||||||
try {
|
try {
|
||||||
await _runGsUtil(
|
await _runGsUtil(
|
||||||
<String>['stat', cloudPath],
|
<String>['stat', cloudPath],
|
||||||
failOk: false,
|
|
||||||
);
|
);
|
||||||
} on PreparePackageException {
|
} on PreparePackageException {
|
||||||
// `gsutil stat gs://path/to/file` will exit with 1 if file does not exist
|
// `gsutil stat gs://path/to/file` will exit with 1 if file does not exist
|
||||||
@ -737,7 +736,6 @@ Future<void> main(List<String> rawArguments) async {
|
|||||||
final ArgParser argParser = ArgParser();
|
final ArgParser argParser = ArgParser();
|
||||||
argParser.addOption(
|
argParser.addOption(
|
||||||
'temp_dir',
|
'temp_dir',
|
||||||
defaultsTo: null,
|
|
||||||
help: 'A location where temporary files may be written. Defaults to a '
|
help: 'A location where temporary files may be written. Defaults to a '
|
||||||
'directory in the system temp folder. Will write a few GiB of data, '
|
'directory in the system temp folder. Will write a few GiB of data, '
|
||||||
'so it should have sufficient free space. If a temp_dir is not '
|
'so it should have sufficient free space. If a temp_dir is not '
|
||||||
@ -745,18 +743,15 @@ Future<void> main(List<String> rawArguments) async {
|
|||||||
'removed automatically.',
|
'removed automatically.',
|
||||||
);
|
);
|
||||||
argParser.addOption('revision',
|
argParser.addOption('revision',
|
||||||
defaultsTo: null,
|
|
||||||
help: 'The Flutter git repo revision to build the '
|
help: 'The Flutter git repo revision to build the '
|
||||||
'archive with. Must be the full 40-character hash. Required.');
|
'archive with. Must be the full 40-character hash. Required.');
|
||||||
argParser.addOption(
|
argParser.addOption(
|
||||||
'branch',
|
'branch',
|
||||||
defaultsTo: null,
|
|
||||||
allowed: Branch.values.map<String>((Branch branch) => getBranchName(branch)),
|
allowed: Branch.values.map<String>((Branch branch) => getBranchName(branch)),
|
||||||
help: 'The Flutter branch to build the archive with. Required.',
|
help: 'The Flutter branch to build the archive with. Required.',
|
||||||
);
|
);
|
||||||
argParser.addOption(
|
argParser.addOption(
|
||||||
'output',
|
'output',
|
||||||
defaultsTo: null,
|
|
||||||
help: 'The path to the directory where the output archive should be '
|
help: 'The path to the directory where the output archive should be '
|
||||||
'written. If --output is not specified, the archive will be written to '
|
'written. If --output is not specified, the archive will be written to '
|
||||||
"the current directory. If the output directory doesn't exist, it, and "
|
"the current directory. If the output directory doesn't exist, it, and "
|
||||||
@ -764,7 +759,6 @@ Future<void> main(List<String> rawArguments) async {
|
|||||||
);
|
);
|
||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
'publish',
|
'publish',
|
||||||
defaultsTo: false,
|
|
||||||
help: 'If set, will publish the archive to Google Cloud Storage upon '
|
help: 'If set, will publish the archive to Google Cloud Storage upon '
|
||||||
'successful creation of the archive. Will publish under this '
|
'successful creation of the archive. Will publish under this '
|
||||||
'directory: $baseUrl$releaseFolder',
|
'directory: $baseUrl$releaseFolder',
|
||||||
@ -772,18 +766,15 @@ Future<void> main(List<String> rawArguments) async {
|
|||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
'force',
|
'force',
|
||||||
abbr: 'f',
|
abbr: 'f',
|
||||||
defaultsTo: false,
|
|
||||||
help: 'Overwrite a previously uploaded package.',
|
help: 'Overwrite a previously uploaded package.',
|
||||||
);
|
);
|
||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
'dry_run',
|
'dry_run',
|
||||||
defaultsTo: false,
|
|
||||||
negatable: false,
|
negatable: false,
|
||||||
help: 'Prints gsutil commands instead of executing them.',
|
help: 'Prints gsutil commands instead of executing them.',
|
||||||
);
|
);
|
||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
'help',
|
'help',
|
||||||
defaultsTo: false,
|
|
||||||
negatable: false,
|
negatable: false,
|
||||||
help: 'Print help for this command.',
|
help: 'Print help for this command.',
|
||||||
);
|
);
|
||||||
|
@ -645,7 +645,7 @@ Future<void> _runFrameworkTests() async {
|
|||||||
|
|
||||||
Future<void> runLibraries() async {
|
Future<void> runLibraries() async {
|
||||||
final List<String> tests = Directory(path.join(flutterRoot, 'packages', 'flutter', 'test'))
|
final List<String> tests = Directory(path.join(flutterRoot, 'packages', 'flutter', 'test'))
|
||||||
.listSync(followLinks: false, recursive: false)
|
.listSync(followLinks: false)
|
||||||
.whereType<Directory>()
|
.whereType<Directory>()
|
||||||
.where((Directory dir) => dir.path.endsWith('widgets') == false)
|
.where((Directory dir) => dir.path.endsWith('widgets') == false)
|
||||||
.map<String>((Directory dir) => path.join('test', path.basename(dir.path)) + path.separator)
|
.map<String>((Directory dir) => path.join('test', path.basename(dir.path)) + path.separator)
|
||||||
@ -1215,7 +1215,7 @@ Future<void> _ensureChromeDriverIsRunning() async {
|
|||||||
final Uri chromeDriverUrl = Uri.parse('http://localhost:4444/status');
|
final Uri chromeDriverUrl = Uri.parse('http://localhost:4444/status');
|
||||||
final HttpClientRequest request = await client.getUrl(chromeDriverUrl);
|
final HttpClientRequest request = await client.getUrl(chromeDriverUrl);
|
||||||
final HttpClientResponse response = await request.close();
|
final HttpClientResponse response = await request.close();
|
||||||
final Map<String, dynamic> webDriverStatus = json.decode(await response.transform(utf8.decoder).join('')) as Map<String, dynamic>;
|
final Map<String, dynamic> webDriverStatus = json.decode(await response.transform(utf8.decoder).join()) as Map<String, dynamic>;
|
||||||
client.close();
|
client.close();
|
||||||
final bool webDriverReady = (webDriverStatus['value'] as Map<String, dynamic>)['ready'] as bool;
|
final bool webDriverReady = (webDriverStatus['value'] as Map<String, dynamic>)['ready'] as bool;
|
||||||
if (!webDriverReady) {
|
if (!webDriverReady) {
|
||||||
|
@ -193,6 +193,6 @@ void main() {
|
|||||||
const Hash256(0xA8100AE6AA1940D0, 0xB663BB31CD466142, 0xEBBDBD5187131B92, 0xD93818987832EB89), // sha256("\xff")
|
const Hash256(0xA8100AE6AA1940D0, 0xB663BB31CD466142, 0xEBBDBD5187131B92, 0xD93818987832EB89), // sha256("\xff")
|
||||||
const Hash256(0x155644D3F13D98BF, 0, 0, 0),
|
const Hash256(0x155644D3F13D98BF, 0, 0, 0),
|
||||||
},
|
},
|
||||||
), exitCode: 0);
|
));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -266,7 +266,6 @@ void main() {
|
|||||||
tempDir,
|
tempDir,
|
||||||
testRef,
|
testRef,
|
||||||
Branch.dev,
|
Branch.dev,
|
||||||
strict: true,
|
|
||||||
processManager: processManager,
|
processManager: processManager,
|
||||||
subprocessOutput: false,
|
subprocessOutput: false,
|
||||||
platform: platform,
|
platform: platform,
|
||||||
@ -495,7 +494,7 @@ void main() {
|
|||||||
'$gsutilCall -- stat $gsArchivePath': <ProcessResult>[ProcessResult(0, 0, '', '')],
|
'$gsutilCall -- stat $gsArchivePath': <ProcessResult>[ProcessResult(0, 0, '', '')],
|
||||||
};
|
};
|
||||||
processManager.addCommands(convertResults(calls));
|
processManager.addCommands(convertResults(calls));
|
||||||
expect(() async => publisher.publishArchive(false), throwsException);
|
expect(() async => publisher.publishArchive(), throwsException);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('publishArchive does not throw if forceUpload is true and artifact already exists on cloud storage', () async {
|
test('publishArchive does not throw if forceUpload is true and artifact already exists on cloud storage', () async {
|
||||||
|
@ -401,7 +401,6 @@ Future<void> main(List<String> rawArguments) async {
|
|||||||
final ArgParser argParser = ArgParser();
|
final ArgParser argParser = ArgParser();
|
||||||
argParser.addOption(
|
argParser.addOption(
|
||||||
'temp_dir',
|
'temp_dir',
|
||||||
defaultsTo: null,
|
|
||||||
help: 'A location where temporary files may be written. Defaults to a '
|
help: 'A location where temporary files may be written. Defaults to a '
|
||||||
'directory in the system temp folder. If a temp_dir is not '
|
'directory in the system temp folder. If a temp_dir is not '
|
||||||
'specified, then by default a generated temporary directory will be '
|
'specified, then by default a generated temporary directory will be '
|
||||||
@ -431,7 +430,6 @@ Future<void> main(List<String> rawArguments) async {
|
|||||||
);
|
);
|
||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
'confirm',
|
'confirm',
|
||||||
defaultsTo: false,
|
|
||||||
help: 'If set, will actually remove the archive from Google Cloud Storage '
|
help: 'If set, will actually remove the archive from Google Cloud Storage '
|
||||||
'upon successful execution of this script. Published archives will be '
|
'upon successful execution of this script. Published archives will be '
|
||||||
'removed from this directory: $baseUrl$releaseFolder. This option '
|
'removed from this directory: $baseUrl$releaseFolder. This option '
|
||||||
@ -440,7 +438,6 @@ Future<void> main(List<String> rawArguments) async {
|
|||||||
);
|
);
|
||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
'help',
|
'help',
|
||||||
defaultsTo: false,
|
|
||||||
negatable: false,
|
negatable: false,
|
||||||
help: 'Print help for this command.',
|
help: 'Print help for this command.',
|
||||||
);
|
);
|
||||||
|
@ -496,7 +496,6 @@ class FrameworkRepository extends Repository {
|
|||||||
name: RemoteName.upstream,
|
name: RemoteName.upstream,
|
||||||
url: 'file://$upstreamPath/',
|
url: 'file://$upstreamPath/',
|
||||||
),
|
),
|
||||||
localUpstream: false,
|
|
||||||
previousCheckoutLocation: previousCheckoutLocation,
|
previousCheckoutLocation: previousCheckoutLocation,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,6 @@ class RollDevCommand extends Command<void> {
|
|||||||
kCandidateBranch,
|
kCandidateBranch,
|
||||||
help: 'Specifies which git branch to roll to the dev branch. Required.',
|
help: 'Specifies which git branch to roll to the dev branch. Required.',
|
||||||
valueHelp: 'branch',
|
valueHelp: 'branch',
|
||||||
defaultsTo: null, // This option is required
|
|
||||||
);
|
);
|
||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
kForce,
|
kForce,
|
||||||
|
@ -42,10 +42,10 @@ String presentState(pb.ConductorState state) {
|
|||||||
buffer.writeln('Conductor version: ${state.conductorVersion}');
|
buffer.writeln('Conductor version: ${state.conductorVersion}');
|
||||||
buffer.writeln('Release channel: ${state.releaseChannel}');
|
buffer.writeln('Release channel: ${state.releaseChannel}');
|
||||||
buffer.writeln('Release version: ${state.releaseVersion}');
|
buffer.writeln('Release version: ${state.releaseVersion}');
|
||||||
buffer.writeln('');
|
buffer.writeln();
|
||||||
buffer.writeln('Release started at: ${DateTime.fromMillisecondsSinceEpoch(state.createdDate.toInt())}');
|
buffer.writeln('Release started at: ${DateTime.fromMillisecondsSinceEpoch(state.createdDate.toInt())}');
|
||||||
buffer.writeln('Last updated at: ${DateTime.fromMillisecondsSinceEpoch(state.lastUpdatedDate.toInt())}');
|
buffer.writeln('Last updated at: ${DateTime.fromMillisecondsSinceEpoch(state.lastUpdatedDate.toInt())}');
|
||||||
buffer.writeln('');
|
buffer.writeln();
|
||||||
buffer.writeln('Engine Repo');
|
buffer.writeln('Engine Repo');
|
||||||
buffer.writeln('\tCandidate branch: ${state.engine.candidateBranch}');
|
buffer.writeln('\tCandidate branch: ${state.engine.candidateBranch}');
|
||||||
buffer.writeln('\tStarting git HEAD: ${state.engine.startingGitHead}');
|
buffer.writeln('\tStarting git HEAD: ${state.engine.startingGitHead}');
|
||||||
@ -77,7 +77,7 @@ String presentState(pb.ConductorState state) {
|
|||||||
} else {
|
} else {
|
||||||
buffer.writeln('0 Framework cherrypicks.');
|
buffer.writeln('0 Framework cherrypicks.');
|
||||||
}
|
}
|
||||||
buffer.writeln('');
|
buffer.writeln();
|
||||||
if (state.currentPhase == ReleasePhase.VERIFY_RELEASE) {
|
if (state.currentPhase == ReleasePhase.VERIFY_RELEASE) {
|
||||||
buffer.writeln(
|
buffer.writeln(
|
||||||
'${state.releaseChannel} release ${state.releaseVersion} has been published and verified.\n',
|
'${state.releaseChannel} release ${state.releaseVersion} has been published and verified.\n',
|
||||||
@ -88,7 +88,7 @@ String presentState(pb.ConductorState state) {
|
|||||||
buffer.writeln(presentPhases(state.currentPhase));
|
buffer.writeln(presentPhases(state.currentPhase));
|
||||||
|
|
||||||
buffer.writeln(phaseInstructions(state));
|
buffer.writeln(phaseInstructions(state));
|
||||||
buffer.writeln('');
|
buffer.writeln();
|
||||||
buffer.writeln('Issue `conductor next` when you are ready to proceed.');
|
buffer.writeln('Issue `conductor next` when you are ready to proceed.');
|
||||||
return buffer.toString();
|
return buffer.toString();
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ class StatusCommand extends Command<void> {
|
|||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
kVerboseFlag,
|
kVerboseFlag,
|
||||||
abbr: 'v',
|
abbr: 'v',
|
||||||
defaultsTo: false,
|
|
||||||
help: 'Also print logs.',
|
help: 'Also print logs.',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ void main() {
|
|||||||
'cherry-pick',
|
'cherry-pick',
|
||||||
'--no-commit',
|
'--no-commit',
|
||||||
commit,
|
commit,
|
||||||
], exitCode: 0),
|
]),
|
||||||
const FakeCommand(command: <String>[
|
const FakeCommand(command: <String>[
|
||||||
'git',
|
'git',
|
||||||
'reset',
|
'reset',
|
||||||
|
@ -174,7 +174,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
expect(stdio.logs.join('').contains(nextVersion), true);
|
expect(stdio.logs.join().contains(nextVersion), true);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("exits with exception if --skip-tagging is provided but commit isn't already tagged", () {
|
test("exits with exception if --skip-tagging is provided but commit isn't already tagged", () {
|
||||||
|
@ -53,7 +53,6 @@ class MyApp extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.all(20.0),
|
padding: const EdgeInsets.all(20.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
const SelectableText(
|
const SelectableText(
|
||||||
'Desktop app for managing a release of the Flutter SDK, currently in development',
|
'Desktop app for managing a release of the Flutter SDK, currently in development',
|
||||||
|
@ -75,12 +75,7 @@ class MainProgressionState extends State<MainProgression> {
|
|||||||
stateFilePath: widget.stateFilePath,
|
stateFilePath: widget.stateFilePath,
|
||||||
),
|
),
|
||||||
Stepper(
|
Stepper(
|
||||||
controlsBuilder: (BuildContext context, ControlsDetails details) {
|
controlsBuilder: (BuildContext context, ControlsDetails details) => Row(),
|
||||||
return Row(
|
|
||||||
children: const <Widget>[],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
type: StepperType.vertical,
|
|
||||||
physics: const ScrollPhysics(),
|
physics: const ScrollPhysics(),
|
||||||
currentStep: _completedStep,
|
currentStep: _completedStep,
|
||||||
onStepContinue: nextStep,
|
onStepContinue: nextStep,
|
||||||
@ -127,9 +122,7 @@ class MainProgressionState extends State<MainProgression> {
|
|||||||
),
|
),
|
||||||
Step(
|
Step(
|
||||||
title: Text(MainProgression._stepTitles[4]),
|
title: Text(MainProgression._stepTitles[4]),
|
||||||
content: Column(
|
content: Column(),
|
||||||
children: const <Widget>[],
|
|
||||||
),
|
|
||||||
isActive: true,
|
isActive: true,
|
||||||
state: handleStepState(4),
|
state: handleStepState(4),
|
||||||
),
|
),
|
||||||
|
@ -18,7 +18,6 @@ void main() {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: const <Widget>[
|
children: const <Widget>[
|
||||||
MainProgression(
|
MainProgression(
|
||||||
releaseState: null,
|
|
||||||
stateFilePath: './testPath',
|
stateFilePath: './testPath',
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -62,7 +61,6 @@ void main() {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: const <Widget>[
|
children: const <Widget>[
|
||||||
MainProgression(
|
MainProgression(
|
||||||
releaseState: null,
|
|
||||||
stateFilePath: './testPath',
|
stateFilePath: './testPath',
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -41,22 +41,18 @@ Future<bool> run(List<String> arguments) async {
|
|||||||
)
|
)
|
||||||
..addFlag(
|
..addFlag(
|
||||||
'skip-on-fetch-failure',
|
'skip-on-fetch-failure',
|
||||||
defaultsTo: false,
|
|
||||||
help: 'Whether to skip tests that we fail to download.',
|
help: 'Whether to skip tests that we fail to download.',
|
||||||
)
|
)
|
||||||
..addFlag(
|
..addFlag(
|
||||||
'skip-template',
|
'skip-template',
|
||||||
defaultsTo: false,
|
|
||||||
help: 'Whether to skip tests named "template.test".',
|
help: 'Whether to skip tests named "template.test".',
|
||||||
)
|
)
|
||||||
..addFlag(
|
..addFlag(
|
||||||
'verbose',
|
'verbose',
|
||||||
defaultsTo: false,
|
|
||||||
help: 'Describe what is happening in detail.',
|
help: 'Describe what is happening in detail.',
|
||||||
)
|
)
|
||||||
..addFlag(
|
..addFlag(
|
||||||
'help',
|
'help',
|
||||||
defaultsTo: false,
|
|
||||||
negatable: false,
|
negatable: false,
|
||||||
help: 'Print this help message.',
|
help: 'Print this help message.',
|
||||||
);
|
);
|
||||||
|
@ -239,7 +239,6 @@ final ArgParser _argParser = ArgParser()
|
|||||||
..addMultiOption(
|
..addMultiOption(
|
||||||
'task',
|
'task',
|
||||||
abbr: 't',
|
abbr: 't',
|
||||||
splitCommas: true,
|
|
||||||
help: 'Either:\n'
|
help: 'Either:\n'
|
||||||
' - the name of a task defined in manifest.yaml.\n'
|
' - the name of a task defined in manifest.yaml.\n'
|
||||||
' Example: complex_layout__start_up.\n'
|
' Example: complex_layout__start_up.\n'
|
||||||
@ -362,13 +361,10 @@ final ArgParser _argParser = ArgParser()
|
|||||||
)
|
)
|
||||||
..addFlag(
|
..addFlag(
|
||||||
'silent',
|
'silent',
|
||||||
negatable: true,
|
|
||||||
defaultsTo: false,
|
|
||||||
)
|
)
|
||||||
..addMultiOption(
|
..addMultiOption(
|
||||||
'test',
|
'test',
|
||||||
hide: true,
|
hide: true,
|
||||||
splitCommas: true,
|
|
||||||
callback: (List<String> value) {
|
callback: (List<String> value) {
|
||||||
if (value.isNotEmpty) {
|
if (value.isNotEmpty) {
|
||||||
throw const FormatException(
|
throw const FormatException(
|
||||||
|
@ -13,7 +13,5 @@ Future<void> main() async {
|
|||||||
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
||||||
'test_driver/animated_image.dart',
|
'test_driver/animated_image.dart',
|
||||||
'animated_image',
|
'animated_image',
|
||||||
measureCpuGpu: true,
|
|
||||||
measureMemory: true,
|
|
||||||
).run);
|
).run);
|
||||||
}
|
}
|
||||||
|
@ -8,5 +8,5 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
|
|||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
deviceOperatingSystem = DeviceOperatingSystem.ios;
|
deviceOperatingSystem = DeviceOperatingSystem.ios;
|
||||||
await task(createComplexLayoutScrollPerfTest(measureCpuGpu: true));
|
await task(createComplexLayoutScrollPerfTest());
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,6 @@ Future<void> main() async {
|
|||||||
'list',
|
'list',
|
||||||
'runtimes',
|
'runtimes',
|
||||||
],
|
],
|
||||||
canFail: false,
|
|
||||||
workingDirectory: flutterDirectory.path,
|
workingDirectory: flutterDirectory.path,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -166,7 +165,6 @@ Future<void> main() async {
|
|||||||
'com.apple.CoreSimulator.SimDeviceType.iPhone-11',
|
'com.apple.CoreSimulator.SimDeviceType.iPhone-11',
|
||||||
iOSSimRuntime,
|
iOSSimRuntime,
|
||||||
],
|
],
|
||||||
canFail: false,
|
|
||||||
workingDirectory: flutterDirectory.path,
|
workingDirectory: flutterDirectory.path,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -180,7 +178,6 @@ Future<void> main() async {
|
|||||||
'com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-44mm',
|
'com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-44mm',
|
||||||
watchSimRuntime,
|
watchSimRuntime,
|
||||||
],
|
],
|
||||||
canFail: false,
|
|
||||||
workingDirectory: flutterDirectory.path,
|
workingDirectory: flutterDirectory.path,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -188,7 +185,6 @@ Future<void> main() async {
|
|||||||
await eval(
|
await eval(
|
||||||
'xcrun',
|
'xcrun',
|
||||||
<String>['simctl', 'pair', watchDeviceID, phoneDeviceID],
|
<String>['simctl', 'pair', watchDeviceID, phoneDeviceID],
|
||||||
canFail: false,
|
|
||||||
workingDirectory: flutterDirectory.path,
|
workingDirectory: flutterDirectory.path,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -196,13 +192,11 @@ Future<void> main() async {
|
|||||||
await eval(
|
await eval(
|
||||||
'xcrun',
|
'xcrun',
|
||||||
<String>['simctl', 'bootstatus', phoneDeviceID, '-b'],
|
<String>['simctl', 'bootstatus', phoneDeviceID, '-b'],
|
||||||
canFail: false,
|
|
||||||
workingDirectory: flutterDirectory.path,
|
workingDirectory: flutterDirectory.path,
|
||||||
);
|
);
|
||||||
await eval(
|
await eval(
|
||||||
'xcrun',
|
'xcrun',
|
||||||
<String>['simctl', 'bootstatus', watchDeviceID, '-b'],
|
<String>['simctl', 'bootstatus', watchDeviceID, '-b'],
|
||||||
canFail: false,
|
|
||||||
workingDirectory: flutterDirectory.path,
|
workingDirectory: flutterDirectory.path,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -13,8 +13,6 @@ Future<void> main() async {
|
|||||||
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
||||||
'test_driver/large_image_changer.dart',
|
'test_driver/large_image_changer.dart',
|
||||||
'large_image_changer',
|
'large_image_changer',
|
||||||
measureCpuGpu: true,
|
|
||||||
measureMemory: true,
|
|
||||||
// This benchmark doesn't care about frame times, frame times will be heavily
|
// This benchmark doesn't care about frame times, frame times will be heavily
|
||||||
// impacted by IO time for loading the image initially.
|
// impacted by IO time for loading the image initially.
|
||||||
benchmarkScoreKeys: <String>[
|
benchmarkScoreKeys: <String>[
|
||||||
|
@ -8,5 +8,5 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
|
|||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
deviceOperatingSystem = DeviceOperatingSystem.ios;
|
deviceOperatingSystem = DeviceOperatingSystem.ios;
|
||||||
await task(createPostBackdropFilterPerfTest(measureCpuGpu: true));
|
await task(createPostBackdropFilterPerfTest());
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,6 @@ void main() {
|
|||||||
'/smuggle-it',
|
'/smuggle-it',
|
||||||
'lib/route.dart',
|
'lib/route.dart',
|
||||||
],
|
],
|
||||||
canFail: false,
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
section('TEST WHETHER `flutter run --route` WORKS');
|
section('TEST WHETHER `flutter run --route` WORKS');
|
||||||
|
@ -8,5 +8,5 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
|
|||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
deviceOperatingSystem = DeviceOperatingSystem.ios;
|
deviceOperatingSystem = DeviceOperatingSystem.ios;
|
||||||
await task(createSimpleAnimationPerfTest(measureCpuGpu: true));
|
await task(createSimpleAnimationPerfTest());
|
||||||
}
|
}
|
||||||
|
@ -49,8 +49,6 @@ class TestCommand extends Command<void> {
|
|||||||
'task, will write test results to the file.');
|
'task, will write test results to the file.');
|
||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
'silent',
|
'silent',
|
||||||
negatable: true,
|
|
||||||
defaultsTo: false,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ class AndroidDeviceDiscovery implements DeviceDiscovery {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Future<List<String>> discoverDevices() async {
|
Future<List<String>> discoverDevices() async {
|
||||||
final List<String> output = (await eval(adbPath, <String>['devices', '-l'], canFail: false))
|
final List<String> output = (await eval(adbPath, <String>['devices', '-l']))
|
||||||
.trim().split('\n');
|
.trim().split('\n');
|
||||||
final List<String> results = <String>[];
|
final List<String> results = <String>[];
|
||||||
for (final String line in output) {
|
for (final String line in output) {
|
||||||
@ -327,7 +327,7 @@ class AndroidDeviceDiscovery implements DeviceDiscovery {
|
|||||||
// Restarting `adb` helps with keeping device connections alive. When `adb`
|
// Restarting `adb` helps with keeping device connections alive. When `adb`
|
||||||
// runs non-stop for too long it loses connections to devices. There may be
|
// runs non-stop for too long it loses connections to devices. There may be
|
||||||
// a better method, but so far that's the best one I've found.
|
// a better method, but so far that's the best one I've found.
|
||||||
await exec(adbPath, <String>['kill-server'], canFail: false);
|
await exec(adbPath, <String>['kill-server']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -555,7 +555,6 @@ class AndroidDevice extends Device {
|
|||||||
adbPath,
|
adbPath,
|
||||||
<String>['-s', deviceId, ...arguments],
|
<String>['-s', deviceId, ...arguments],
|
||||||
environment: environment,
|
environment: environment,
|
||||||
canFail: false,
|
|
||||||
printStdout: !silent,
|
printStdout: !silent,
|
||||||
printStderr: !silent,
|
printStderr: !silent,
|
||||||
);
|
);
|
||||||
|
@ -224,7 +224,7 @@ Future<String> getDartVersion() async {
|
|||||||
|
|
||||||
Future<String?> getCurrentFlutterRepoCommit() {
|
Future<String?> getCurrentFlutterRepoCommit() {
|
||||||
if (!dir('${flutterDirectory.path}/.git').existsSync()) {
|
if (!dir('${flutterDirectory.path}/.git').existsSync()) {
|
||||||
return Future<String?>.value(null);
|
return Future<String?>.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
return inDirectory<String>(flutterDirectory, () {
|
return inDirectory<String>(flutterDirectory, () {
|
||||||
|
@ -145,7 +145,6 @@ class PluginPlatformInterfaceMacOS {
|
|||||||
final Process run = await startProcess(
|
final Process run = await startProcess(
|
||||||
path.join(flutterDirectory.path, 'bin', 'flutter'),
|
path.join(flutterDirectory.path, 'bin', 'flutter'),
|
||||||
flutterCommandArgs('run', <String>['-d', 'macos', '-v']),
|
flutterCommandArgs('run', <String>['-d', 'macos', '-v']),
|
||||||
environment: null,
|
|
||||||
);
|
);
|
||||||
Completer<void> registryExecutedCompleter = Completer<void>();
|
Completer<void> registryExecutedCompleter = Completer<void>();
|
||||||
final StreamSubscription<void> subscription = run.stdout
|
final StreamSubscription<void> subscription = run.stdout
|
||||||
|
@ -133,8 +133,6 @@ Future<TaskResult> runWebBenchmark({ required bool useCanvasKit }) async {
|
|||||||
final ChromeOptions options = ChromeOptions(
|
final ChromeOptions options = ChromeOptions(
|
||||||
url: 'http://localhost:$benchmarkServerPort/index.html',
|
url: 'http://localhost:$benchmarkServerPort/index.html',
|
||||||
userDataDirectory: userDataDir,
|
userDataDirectory: userDataDir,
|
||||||
windowHeight: 1024,
|
|
||||||
windowWidth: 1024,
|
|
||||||
headless: isUncalibratedSmokeTest,
|
headless: isUncalibratedSmokeTest,
|
||||||
debugPort: chromeDebugPort,
|
debugPort: chromeDebugPort,
|
||||||
);
|
);
|
||||||
|
@ -27,8 +27,8 @@ void main() {
|
|||||||
final AndroidDevice androidDevice = device as AndroidDevice;
|
final AndroidDevice androidDevice = device as AndroidDevice;
|
||||||
expect(await androidDevice.isArm64(), isTrue);
|
expect(await androidDevice.isArm64(), isTrue);
|
||||||
expectLog(<CommandArgs>[
|
expectLog(<CommandArgs>[
|
||||||
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk'], environment: null),
|
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk']),
|
||||||
cmd(command: 'getprop', arguments: <String>['ro.product.cpu.abi'], environment: null),
|
cmd(command: 'getprop', arguments: <String>['ro.product.cpu.abi']),
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -51,7 +51,7 @@ void main() {
|
|||||||
test('sends power event', () async {
|
test('sends power event', () async {
|
||||||
await device.togglePower();
|
await device.togglePower();
|
||||||
expectLog(<CommandArgs>[
|
expectLog(<CommandArgs>[
|
||||||
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk'], environment: null),
|
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk']),
|
||||||
cmd(command: 'input', arguments: <String>['keyevent', '26']),
|
cmd(command: 'input', arguments: <String>['keyevent', '26']),
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
@ -62,7 +62,7 @@ void main() {
|
|||||||
FakeDevice.pretendAwake();
|
FakeDevice.pretendAwake();
|
||||||
await device.wakeUp();
|
await device.wakeUp();
|
||||||
expectLog(<CommandArgs>[
|
expectLog(<CommandArgs>[
|
||||||
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk'], environment: null),
|
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk']),
|
||||||
cmd(command: 'dumpsys', arguments: <String>['power']),
|
cmd(command: 'dumpsys', arguments: <String>['power']),
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
@ -71,7 +71,7 @@ void main() {
|
|||||||
FakeDevice.pretendAsleep();
|
FakeDevice.pretendAsleep();
|
||||||
await device.wakeUp();
|
await device.wakeUp();
|
||||||
expectLog(<CommandArgs>[
|
expectLog(<CommandArgs>[
|
||||||
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk'], environment: null),
|
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk']),
|
||||||
cmd(command: 'dumpsys', arguments: <String>['power']),
|
cmd(command: 'dumpsys', arguments: <String>['power']),
|
||||||
cmd(command: 'input', arguments: <String>['keyevent', '26']),
|
cmd(command: 'input', arguments: <String>['keyevent', '26']),
|
||||||
]);
|
]);
|
||||||
@ -83,7 +83,7 @@ void main() {
|
|||||||
FakeDevice.pretendAsleep();
|
FakeDevice.pretendAsleep();
|
||||||
await device.sendToSleep();
|
await device.sendToSleep();
|
||||||
expectLog(<CommandArgs>[
|
expectLog(<CommandArgs>[
|
||||||
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk'], environment: null),
|
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk']),
|
||||||
cmd(command: 'dumpsys', arguments: <String>['power']),
|
cmd(command: 'dumpsys', arguments: <String>['power']),
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
@ -92,7 +92,7 @@ void main() {
|
|||||||
FakeDevice.pretendAwake();
|
FakeDevice.pretendAwake();
|
||||||
await device.sendToSleep();
|
await device.sendToSleep();
|
||||||
expectLog(<CommandArgs>[
|
expectLog(<CommandArgs>[
|
||||||
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk'], environment: null),
|
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk']),
|
||||||
cmd(command: 'dumpsys', arguments: <String>['power']),
|
cmd(command: 'dumpsys', arguments: <String>['power']),
|
||||||
cmd(command: 'input', arguments: <String>['keyevent', '26']),
|
cmd(command: 'input', arguments: <String>['keyevent', '26']),
|
||||||
]);
|
]);
|
||||||
@ -104,7 +104,7 @@ void main() {
|
|||||||
FakeDevice.pretendAwake();
|
FakeDevice.pretendAwake();
|
||||||
await device.unlock();
|
await device.unlock();
|
||||||
expectLog(<CommandArgs>[
|
expectLog(<CommandArgs>[
|
||||||
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk'], environment: null),
|
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk']),
|
||||||
cmd(command: 'dumpsys', arguments: <String>['power']),
|
cmd(command: 'dumpsys', arguments: <String>['power']),
|
||||||
cmd(command: 'input', arguments: <String>['keyevent', '82']),
|
cmd(command: 'input', arguments: <String>['keyevent', '82']),
|
||||||
]);
|
]);
|
||||||
@ -115,7 +115,7 @@ void main() {
|
|||||||
test('tap', () async {
|
test('tap', () async {
|
||||||
await device.tap(100, 200);
|
await device.tap(100, 200);
|
||||||
expectLog(<CommandArgs>[
|
expectLog(<CommandArgs>[
|
||||||
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk'], environment: null),
|
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk']),
|
||||||
cmd(command: 'input', arguments: <String>['tap', '100', '200']),
|
cmd(command: 'input', arguments: <String>['tap', '100', '200']),
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
@ -61,7 +61,7 @@ Sat Mar 9 20:13:00 2019 49 /usr/sbin/syslogd
|
|||||||
),
|
),
|
||||||
RunningProcessInfo(
|
RunningProcessInfo(
|
||||||
'49',
|
'49',
|
||||||
DateTime(2019, 3, 9, 20, 13, 00),
|
DateTime(2019, 3, 9, 20, 13),
|
||||||
'/usr/sbin/syslogd',
|
'/usr/sbin/syslogd',
|
||||||
),
|
),
|
||||||
]));
|
]));
|
||||||
|
@ -32,14 +32,12 @@ class _TextFieldPageState extends State<TextFieldPage> {
|
|||||||
TextField(
|
TextField(
|
||||||
key: normalTextFieldKey,
|
key: normalTextFieldKey,
|
||||||
controller: _normalController,
|
controller: _normalController,
|
||||||
autofocus: false,
|
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
TextField(
|
TextField(
|
||||||
key: passwordTextFieldKey,
|
key: passwordTextFieldKey,
|
||||||
controller: _passwordController,
|
controller: _passwordController,
|
||||||
obscureText: true,
|
obscureText: true,
|
||||||
autofocus: false,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -227,7 +227,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
|||||||
setState(() {});
|
setState(() {});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return Future<dynamic>.value(null);
|
return Future<dynamic>.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> onViewMethodChannelCall(MethodCall call) {
|
Future<dynamic> onViewMethodChannelCall(MethodCall call) {
|
||||||
@ -240,7 +240,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
|||||||
setState(() {});
|
setState(() {});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return Future<dynamic>.value(null);
|
return Future<dynamic>.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget buildEventTile(BuildContext context, int index) {
|
Widget buildEventTile(BuildContext context, int index) {
|
||||||
|
@ -10,8 +10,7 @@ import 'test_step.dart';
|
|||||||
Future<TestStepResult> methodCallJsonSuccessHandshake(dynamic payload) async {
|
Future<TestStepResult> methodCallJsonSuccessHandshake(dynamic payload) async {
|
||||||
const MethodChannel channel =
|
const MethodChannel channel =
|
||||||
MethodChannel('json-method', JSONMethodCodec());
|
MethodChannel('json-method', JSONMethodCodec());
|
||||||
return _methodCallSuccessHandshake(
|
return _methodCallSuccessHandshake('JSON success($payload)', channel, payload);
|
||||||
'JSON success($payload)', channel, payload);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<TestStepResult> methodCallJsonErrorHandshake(dynamic payload) async {
|
Future<TestStepResult> methodCallJsonErrorHandshake(dynamic payload) async {
|
||||||
@ -32,8 +31,7 @@ Future<TestStepResult> methodCallStandardSuccessHandshake(
|
|||||||
'std-method',
|
'std-method',
|
||||||
StandardMethodCodec(ExtendedStandardMessageCodec()),
|
StandardMethodCodec(ExtendedStandardMessageCodec()),
|
||||||
);
|
);
|
||||||
return _methodCallSuccessHandshake(
|
return _methodCallSuccessHandshake('Standard success($payload)', channel, payload);
|
||||||
'Standard success($payload)', channel, payload);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<TestStepResult> methodCallStandardErrorHandshake(dynamic payload) async {
|
Future<TestStepResult> methodCallStandardErrorHandshake(dynamic payload) async {
|
||||||
@ -41,8 +39,7 @@ Future<TestStepResult> methodCallStandardErrorHandshake(dynamic payload) async {
|
|||||||
'std-method',
|
'std-method',
|
||||||
StandardMethodCodec(ExtendedStandardMessageCodec()),
|
StandardMethodCodec(ExtendedStandardMessageCodec()),
|
||||||
);
|
);
|
||||||
return _methodCallErrorHandshake(
|
return _methodCallErrorHandshake('Standard error($payload)', channel, payload);
|
||||||
'Standard error($payload)', channel, payload);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<TestStepResult> methodCallStandardNotImplementedHandshake() async {
|
Future<TestStepResult> methodCallStandardNotImplementedHandshake() async {
|
||||||
@ -50,8 +47,7 @@ Future<TestStepResult> methodCallStandardNotImplementedHandshake() async {
|
|||||||
'std-method',
|
'std-method',
|
||||||
StandardMethodCodec(ExtendedStandardMessageCodec()),
|
StandardMethodCodec(ExtendedStandardMessageCodec()),
|
||||||
);
|
);
|
||||||
return _methodCallNotImplementedHandshake(
|
return _methodCallNotImplementedHandshake('Standard notImplemented()', channel);
|
||||||
'Standard notImplemented()', channel);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<TestStepResult> _methodCallSuccessHandshake(
|
Future<TestStepResult> _methodCallSuccessHandshake(
|
||||||
@ -89,8 +85,7 @@ Future<TestStepResult> _methodCallErrorHandshake(
|
|||||||
final List<dynamic> received = <dynamic>[];
|
final List<dynamic> received = <dynamic>[];
|
||||||
channel.setMethodCallHandler((MethodCall call) async {
|
channel.setMethodCallHandler((MethodCall call) async {
|
||||||
received.add(call.arguments);
|
received.add(call.arguments);
|
||||||
throw PlatformException(
|
throw PlatformException(code: 'error', details: arguments);
|
||||||
code: 'error', message: null, details: arguments);
|
|
||||||
});
|
});
|
||||||
dynamic errorDetails = nothing;
|
dynamic errorDetails = nothing;
|
||||||
dynamic error = nothing;
|
dynamic error = nothing;
|
||||||
|
@ -23,8 +23,6 @@ class SectionCard extends StatelessWidget {
|
|||||||
child: DecoratedBox(
|
child: DecoratedBox(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
begin: Alignment.centerLeft,
|
|
||||||
end: Alignment.centerRight,
|
|
||||||
colors: <Color>[
|
colors: <Color>[
|
||||||
section.leftColor!,
|
section.leftColor!,
|
||||||
section.rightColor!,
|
section.rightColor!,
|
||||||
@ -132,7 +130,6 @@ class SectionDetailView extends StatelessWidget {
|
|||||||
package: detail.imageAssetPackage,
|
package: detail.imageAssetPackage,
|
||||||
),
|
),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
alignment: Alignment.center,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -136,7 +136,7 @@ class CalcExpression {
|
|||||||
/// in the calculator's display panel.
|
/// in the calculator's display panel.
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
final StringBuffer buffer = StringBuffer('');
|
final StringBuffer buffer = StringBuffer();
|
||||||
buffer.writeAll(_list);
|
buffer.writeAll(_list);
|
||||||
return buffer.toString();
|
return buffer.toString();
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,6 @@ class ColorItem extends StatelessWidget {
|
|||||||
bottom: false,
|
bottom: false,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text('$prefix$index'),
|
Text('$prefix$index'),
|
||||||
Text(colorString()),
|
Text(colorString()),
|
||||||
|
@ -327,7 +327,6 @@ class Tab1ItemPageState extends State<Tab1ItemPage> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Container(
|
Container(
|
||||||
height: 128.0,
|
height: 128.0,
|
||||||
|
@ -247,7 +247,6 @@ class _CupertinoPickerDemoState extends State<CupertinoPickerDemo> {
|
|||||||
return _BottomPicker(
|
return _BottomPicker(
|
||||||
child: CupertinoDatePicker(
|
child: CupertinoDatePicker(
|
||||||
backgroundColor: CupertinoColors.systemBackground.resolveFrom(context),
|
backgroundColor: CupertinoColors.systemBackground.resolveFrom(context),
|
||||||
mode: CupertinoDatePickerMode.dateAndTime,
|
|
||||||
initialDateTime: dateTime,
|
initialDateTime: dateTime,
|
||||||
onDateTimeChanged: (DateTime newDateTime) {
|
onDateTimeChanged: (DateTime newDateTime) {
|
||||||
setState(() => dateTime = newDateTime);
|
setState(() => dateTime = newDateTime);
|
||||||
|
@ -117,13 +117,11 @@ class _CupertinoSegmentedControlDemoState extends State<CupertinoSegmentedContro
|
|||||||
BoxShadow(
|
BoxShadow(
|
||||||
offset: Offset(0.0, 6.0),
|
offset: Offset(0.0, 6.0),
|
||||||
blurRadius: 10.0,
|
blurRadius: 10.0,
|
||||||
spreadRadius: 0.0,
|
|
||||||
color: _kKeyPenumbraOpacity,
|
color: _kKeyPenumbraOpacity,
|
||||||
),
|
),
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
offset: Offset(0.0, 1.0),
|
offset: Offset(0.0, 1.0),
|
||||||
blurRadius: 18.0,
|
blurRadius: 18.0,
|
||||||
spreadRadius: 0.0,
|
|
||||||
color: _kAmbientShadowOpacity,
|
color: _kAmbientShadowOpacity,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -42,7 +42,6 @@ class _CupertinoSliderDemoState extends State<CupertinoSliderDemo> {
|
|||||||
children: <Widget> [
|
children: <Widget> [
|
||||||
CupertinoSlider(
|
CupertinoSlider(
|
||||||
value: _value,
|
value: _value,
|
||||||
min: 0.0,
|
|
||||||
max: 100.0,
|
max: 100.0,
|
||||||
onChanged: (double value) {
|
onChanged: (double value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -58,7 +57,6 @@ class _CupertinoSliderDemoState extends State<CupertinoSliderDemo> {
|
|||||||
children: <Widget> [
|
children: <Widget> [
|
||||||
CupertinoSlider(
|
CupertinoSlider(
|
||||||
value: _discreteValue,
|
value: _discreteValue,
|
||||||
min: 0.0,
|
|
||||||
max: 100.0,
|
max: 100.0,
|
||||||
divisions: 5,
|
divisions: 5,
|
||||||
onChanged: (double value) {
|
onChanged: (double value) {
|
||||||
|
@ -27,7 +27,6 @@ class _BottomAppBarDemoState extends State<BottomAppBarDemo> {
|
|||||||
static const _ChoiceValue<Widget> kNoFab = _ChoiceValue<Widget>(
|
static const _ChoiceValue<Widget> kNoFab = _ChoiceValue<Widget>(
|
||||||
title: 'None',
|
title: 'None',
|
||||||
label: 'do not show a floating action button',
|
label: 'do not show a floating action button',
|
||||||
value: null,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
static const _ChoiceValue<Widget> kCircularFab = _ChoiceValue<Widget>(
|
static const _ChoiceValue<Widget> kCircularFab = _ChoiceValue<Widget>(
|
||||||
|
@ -275,7 +275,6 @@ class _ButtonsDemoState extends State<ButtonsDemo> {
|
|||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(24.0),
|
padding: const EdgeInsets.all(24.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
ListTile(
|
ListTile(
|
||||||
title: const Text('Simple dropdown:'),
|
title: const Text('Simple dropdown:'),
|
||||||
|
@ -344,7 +344,7 @@ class _ChipDemoState extends State<ChipDemo> {
|
|||||||
data: _showShapeBorder
|
data: _showShapeBorder
|
||||||
? theme.chipTheme.copyWith(
|
? theme.chipTheme.copyWith(
|
||||||
shape: BeveledRectangleBorder(
|
shape: BeveledRectangleBorder(
|
||||||
side: const BorderSide(width: 0.66, style: BorderStyle.solid, color: Colors.grey),
|
side: const BorderSide(width: 0.66, color: Colors.grey),
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
))
|
))
|
||||||
: theme.chipTheme,
|
: theme.chipTheme,
|
||||||
|
@ -33,8 +33,6 @@ class DialogDemoItem extends StatelessWidget {
|
|||||||
return SimpleDialogOption(
|
return SimpleDialogOption(
|
||||||
onPressed: onPressed,
|
onPressed: onPressed,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Icon(icon, size: 36.0, color: color),
|
Icon(icon, size: 36.0, color: color),
|
||||||
Padding(
|
Padding(
|
||||||
|
@ -308,7 +308,6 @@ class _ExpansionPanelsDemoState extends State<ExpansionPanelsDemo> {
|
|||||||
// Allow room for the value indicator.
|
// Allow room for the value indicator.
|
||||||
padding: const EdgeInsets.only(top: 44.0),
|
padding: const EdgeInsets.only(top: 44.0),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
min: 0.0,
|
|
||||||
max: 100.0,
|
max: 100.0,
|
||||||
divisions: 5,
|
divisions: 5,
|
||||||
activeColor: Colors.orange[100 + (field.value! * 5.0).round()],
|
activeColor: Colors.orange[100 + (field.value! * 5.0).round()],
|
||||||
|
@ -284,7 +284,6 @@ class _SlidersState extends State<_Sliders> {
|
|||||||
Slider.adaptive(
|
Slider.adaptive(
|
||||||
label: _continuousValue.toStringAsFixed(6),
|
label: _continuousValue.toStringAsFixed(6),
|
||||||
value: _continuousValue,
|
value: _continuousValue,
|
||||||
min: 0.0,
|
|
||||||
max: 100.0,
|
max: 100.0,
|
||||||
onChanged: (double value) {
|
onChanged: (double value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -307,7 +306,6 @@ class _SlidersState extends State<_Sliders> {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Slider.adaptive(
|
Slider.adaptive(
|
||||||
value: _discreteValue,
|
value: _discreteValue,
|
||||||
min: 0.0,
|
|
||||||
max: 200.0,
|
max: 200.0,
|
||||||
divisions: 5,
|
divisions: 5,
|
||||||
label: '${_discreteValue.round()}',
|
label: '${_discreteValue.round()}',
|
||||||
@ -338,7 +336,6 @@ class _SlidersState extends State<_Sliders> {
|
|||||||
),
|
),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
value: _discreteCustomValue,
|
value: _discreteCustomValue,
|
||||||
min: 0.0,
|
|
||||||
max: 200.0,
|
max: 200.0,
|
||||||
divisions: 5,
|
divisions: 5,
|
||||||
semanticFormatterCallback: (double value) => value.round().toString(),
|
semanticFormatterCallback: (double value) => value.round().toString(),
|
||||||
@ -381,7 +378,6 @@ class _RangeSlidersState extends State<_RangeSliders> {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
RangeSlider(
|
RangeSlider(
|
||||||
values: _continuousValues,
|
values: _continuousValues,
|
||||||
min: 0.0,
|
|
||||||
max: 100.0,
|
max: 100.0,
|
||||||
onChanged: (RangeValues values) {
|
onChanged: (RangeValues values) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -404,7 +400,6 @@ class _RangeSlidersState extends State<_RangeSliders> {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
RangeSlider(
|
RangeSlider(
|
||||||
values: _discreteValues,
|
values: _discreteValues,
|
||||||
min: 0.0,
|
|
||||||
max: 200.0,
|
max: 200.0,
|
||||||
divisions: 5,
|
divisions: 5,
|
||||||
labels: RangeLabels('${_discreteValues.start.round()}', '${_discreteValues.end.round()}'),
|
labels: RangeLabels('${_discreteValues.start.round()}', '${_discreteValues.end.round()}'),
|
||||||
@ -433,7 +428,6 @@ class _RangeSlidersState extends State<_RangeSliders> {
|
|||||||
),
|
),
|
||||||
child: RangeSlider(
|
child: RangeSlider(
|
||||||
values: _discreteCustomValues,
|
values: _discreteCustomValues,
|
||||||
min: 0.0,
|
|
||||||
max: 200.0,
|
max: 200.0,
|
||||||
divisions: 5,
|
divisions: 5,
|
||||||
labels: RangeLabels('${_discreteCustomValues.start.round()}', '${_discreteCustomValues.end.round()}'),
|
labels: RangeLabels('${_discreteCustomValues.start.round()}', '${_discreteCustomValues.end.round()}'),
|
||||||
|
@ -107,7 +107,6 @@ class _CardDataItem extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Align(
|
Align(
|
||||||
alignment: page!.id == 'H'
|
alignment: page!.id == 'H'
|
||||||
|
@ -252,7 +252,6 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> {
|
|||||||
suffixText: 'USD',
|
suffixText: 'USD',
|
||||||
suffixStyle: TextStyle(color: Colors.green),
|
suffixStyle: TextStyle(color: Colors.green),
|
||||||
),
|
),
|
||||||
maxLines: 1,
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: 24.0),
|
const SizedBox(height: 24.0),
|
||||||
PasswordField(
|
PasswordField(
|
||||||
|
@ -171,7 +171,7 @@ class ExpandingBottomSheetState extends State<ExpandingBottomSheet> with TickerP
|
|||||||
).animate(
|
).animate(
|
||||||
CurvedAnimation(
|
CurvedAnimation(
|
||||||
parent: _controller.view,
|
parent: _controller.view,
|
||||||
curve: const Interval(0.434, 1.0, curve: Curves.linear), // not used
|
curve: const Interval(0.434, 1.0), // not used
|
||||||
// only the reverseCurve will be used
|
// only the reverseCurve will be used
|
||||||
reverseCurve: Interval(0.434, 1.0, curve: Curves.fastOutSlowIn.flipped),
|
reverseCurve: Interval(0.434, 1.0, curve: Curves.fastOutSlowIn.flipped),
|
||||||
),
|
),
|
||||||
@ -448,7 +448,7 @@ class _ProductThumbnailRowState extends State<ProductThumbnailRow> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
final Animation<double> opacity = CurvedAnimation(
|
final Animation<double> opacity = CurvedAnimation(
|
||||||
curve: const Interval(0.33, 1.0, curve: Curves.linear),
|
curve: const Interval(0.33, 1.0),
|
||||||
parent: animation,
|
parent: animation,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -124,7 +124,6 @@ class ShoppingCartSummary extends StatelessWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
const Expanded(
|
const Expanded(
|
||||||
child: Text('TOTAL'),
|
child: Text('TOTAL'),
|
||||||
|
@ -45,7 +45,6 @@ class ProductCard extends StatelessWidget {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Column(
|
Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
AspectRatio(
|
AspectRatio(
|
||||||
aspectRatio: imageAspectRatio,
|
aspectRatio: imageAspectRatio,
|
||||||
@ -56,7 +55,6 @@ class ProductCard extends StatelessWidget {
|
|||||||
width: 121.0,
|
width: 121.0,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(
|
Text(
|
||||||
product == null ? '' : product!.name,
|
product == null ? '' : product!.name,
|
||||||
|
@ -253,7 +253,6 @@ class GridLists {
|
|||||||
// loaded from the web.
|
// loaded from the web.
|
||||||
GridView.count(
|
GridView.count(
|
||||||
crossAxisCount: 3,
|
crossAxisCount: 3,
|
||||||
childAspectRatio: 1.0,
|
|
||||||
padding: const EdgeInsets.all(4.0),
|
padding: const EdgeInsets.all(4.0),
|
||||||
mainAxisSpacing: 4.0,
|
mainAxisSpacing: 4.0,
|
||||||
crossAxisSpacing: 4.0,
|
crossAxisSpacing: 4.0,
|
||||||
|
@ -58,14 +58,12 @@ class _CategoryItem extends StatelessWidget {
|
|||||||
// repainted when the button's ink splash animates.
|
// repainted when the button's ink splash animates.
|
||||||
return RepaintBoundary(
|
return RepaintBoundary(
|
||||||
child: RawMaterialButton(
|
child: RawMaterialButton(
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
hoverColor: theme.primaryColor.withOpacity(0.05),
|
hoverColor: theme.primaryColor.withOpacity(0.05),
|
||||||
splashColor: theme.primaryColor.withOpacity(0.12),
|
splashColor: theme.primaryColor.withOpacity(0.12),
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onPressed: onTap,
|
onPressed: onTap,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(6.0),
|
padding: const EdgeInsets.all(6.0),
|
||||||
@ -184,7 +182,6 @@ class _DemoItem extends StatelessWidget {
|
|||||||
final bool isDark = theme.brightness == Brightness.dark;
|
final bool isDark = theme.brightness == Brightness.dark;
|
||||||
final double textScaleFactor = MediaQuery.textScaleFactorOf(context);
|
final double textScaleFactor = MediaQuery.textScaleFactorOf(context);
|
||||||
return RawMaterialButton(
|
return RawMaterialButton(
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
splashColor: theme.primaryColor.withOpacity(0.12),
|
splashColor: theme.primaryColor.withOpacity(0.12),
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
@ -162,7 +162,7 @@ Future<void> smokeGallery(WidgetTester tester) async {
|
|||||||
await tester.tap(find.text(category.name));
|
await tester.tap(find.text(category.name));
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
for (final GalleryDemo demo in kGalleryCategoryToDemos[category]!) {
|
for (final GalleryDemo demo in kGalleryCategoryToDemos[category]!) {
|
||||||
await Scrollable.ensureVisible(tester.element(find.text(demo.title)), alignment: 0.0);
|
await Scrollable.ensureVisible(tester.element(find.text(demo.title)));
|
||||||
await smokeDemo(tester, demo);
|
await smokeDemo(tester, demo);
|
||||||
tester.binding.debugAssertNoTransientCallbacks('A transient callback was still active after running $demo');
|
tester.binding.debugAssertNoTransientCallbacks('A transient callback was still active after running $demo');
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ Future<void> runDemos(List<String> demos, WidgetController controller) async {
|
|||||||
await controller.pumpAndSettle();
|
await controller.pumpAndSettle();
|
||||||
// Scroll back to the top
|
// Scroll back to the top
|
||||||
await controller.drag(demoList, const Offset(0.0, 10000.0));
|
await controller.drag(demoList, const Offset(0.0, 10000.0));
|
||||||
await controller.pumpAndSettle(const Duration(milliseconds: 100));
|
await controller.pumpAndSettle();
|
||||||
}
|
}
|
||||||
currentDemoCategory = demoCategory;
|
currentDemoCategory = demoCategory;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ void main([List<String> args = const <String>[]]) {
|
|||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
final int id = tester.getSemantics(find.bySemanticsLabel('Material')).id;
|
final int id = tester.getSemantics(find.bySemanticsLabel('Material')).id;
|
||||||
expect(id, greaterThan(-1));
|
expect(id, greaterThan(-1));
|
||||||
}, skip: !withSemantics, semanticsEnabled: true);
|
}, skip: !withSemantics);
|
||||||
|
|
||||||
testWidgets(
|
testWidgets(
|
||||||
'all demos',
|
'all demos',
|
||||||
|
@ -31,7 +31,6 @@ Future<void> main() async {
|
|||||||
},
|
},
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
child: const IgnorePointer(
|
child: const IgnorePointer(
|
||||||
ignoring: true,
|
|
||||||
child: GalleryApp(testMode: true),
|
child: GalleryApp(testMode: true),
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
@ -199,7 +199,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
|||||||
setState(() {});
|
setState(() {});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return Future<dynamic>.value(null);
|
return Future<dynamic>.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> onViewMethodChannelCall(MethodCall call) {
|
Future<dynamic> onViewMethodChannelCall(MethodCall call) {
|
||||||
@ -212,7 +212,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
|||||||
setState(() {});
|
setState(() {});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return Future<dynamic>.value(null);
|
return Future<dynamic>.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget buildEventTile(BuildContext context, int index) {
|
Widget buildEventTile(BuildContext context, int index) {
|
||||||
|
@ -105,6 +105,5 @@ void dispatchMouseWheelEvent(int mouseX, int mouseY,
|
|||||||
deltaMode: deltaMode,
|
deltaMode: deltaMode,
|
||||||
deltaX : deltaX,
|
deltaX : deltaX,
|
||||||
deltaY : deltaY,
|
deltaY : deltaY,
|
||||||
shiftKey: false,
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -248,13 +248,10 @@ class DragAndDropAppState extends State<DragAndDropApp> {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
ExampleDragSource(
|
ExampleDragSource(
|
||||||
color: Colors.yellow.shade300,
|
color: Colors.yellow.shade300,
|
||||||
under: true,
|
|
||||||
heavy: false,
|
|
||||||
child: const Text('under'),
|
child: const Text('under'),
|
||||||
),
|
),
|
||||||
ExampleDragSource(
|
ExampleDragSource(
|
||||||
@ -266,7 +263,6 @@ class DragAndDropAppState extends State<DragAndDropApp> {
|
|||||||
ExampleDragSource(
|
ExampleDragSource(
|
||||||
color: Colors.indigo.shade300,
|
color: Colors.indigo.shade300,
|
||||||
under: false,
|
under: false,
|
||||||
heavy: false,
|
|
||||||
child: const Text('above'),
|
child: const Text('above'),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -89,7 +89,6 @@ class _HoverDemoState extends State<HoverDemo> {
|
|||||||
const Padding(
|
const Padding(
|
||||||
padding: EdgeInsets.all(8.0),
|
padding: EdgeInsets.all(8.0),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
autofocus: false,
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
labelText: 'Enter Text',
|
labelText: 'Enter Text',
|
||||||
|
@ -96,7 +96,6 @@ class _HomeState extends State<Home> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20.0),
|
padding: const EdgeInsets.symmetric(horizontal: 20.0),
|
||||||
child: Slider(
|
child: Slider(
|
||||||
min: 0.0,
|
|
||||||
max: 1024.0,
|
max: 1024.0,
|
||||||
value: seed.toDouble(),
|
value: seed.toDouble(),
|
||||||
label: '$seed',
|
label: '$seed',
|
||||||
|
@ -250,15 +250,15 @@ ArgParser _createArgsParser() {
|
|||||||
final ArgParser parser = ArgParser();
|
final ArgParser parser = ArgParser();
|
||||||
parser.addFlag('help', abbr: 'h', negatable: false,
|
parser.addFlag('help', abbr: 'h', negatable: false,
|
||||||
help: 'Show command help.');
|
help: 'Show command help.');
|
||||||
parser.addFlag('verbose', negatable: true, defaultsTo: true,
|
parser.addFlag('verbose', defaultsTo: true,
|
||||||
help: 'Whether to report all error messages (on) or attempt to '
|
help: 'Whether to report all error messages (on) or attempt to '
|
||||||
'filter out some known false positives (off). Shut this off '
|
'filter out some known false positives (off). Shut this off '
|
||||||
'locally if you want to address Flutter-specific issues.');
|
'locally if you want to address Flutter-specific issues.');
|
||||||
parser.addFlag('checked', abbr: 'c', negatable: true,
|
parser.addFlag('checked', abbr: 'c',
|
||||||
help: 'Run dartdoc in checked mode.');
|
help: 'Run dartdoc in checked mode.');
|
||||||
parser.addFlag('json', negatable: true,
|
parser.addFlag('json',
|
||||||
help: 'Display json-formatted output from dartdoc and skip stdout/stderr prefixing.');
|
help: 'Display json-formatted output from dartdoc and skip stdout/stderr prefixing.');
|
||||||
parser.addFlag('validate-links', negatable: true,
|
parser.addFlag('validate-links',
|
||||||
help: 'Display warnings for broken links generated by dartdoc (slow)');
|
help: 'Display warnings for broken links generated by dartdoc (slow)');
|
||||||
return parser;
|
return parser;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ Future<void> cleanUp(File integrationTest) async {
|
|||||||
try {
|
try {
|
||||||
await integrationTest.delete();
|
await integrationTest.delete();
|
||||||
// Delete the integration_test directory if it is empty.
|
// Delete the integration_test directory if it is empty.
|
||||||
await integrationTest.parent.delete(recursive: false);
|
await integrationTest.parent.delete();
|
||||||
} on FileSystemException {
|
} on FileSystemException {
|
||||||
// Ignore, there might be other files in there preventing it from
|
// Ignore, there might be other files in there preventing it from
|
||||||
// being removed, or it might not exist.
|
// being removed, or it might not exist.
|
||||||
@ -205,7 +205,6 @@ Future<String> runCommand(
|
|||||||
process = await processManager.start(
|
process = await processManager.start(
|
||||||
cmd,
|
cmd,
|
||||||
workingDirectory: workingDirectory.absolute.path,
|
workingDirectory: workingDirectory.absolute.path,
|
||||||
includeParentEnvironment: true,
|
|
||||||
environment: environment,
|
environment: environment,
|
||||||
);
|
);
|
||||||
process.stdout.listen(
|
process.stdout.listen(
|
||||||
|
@ -132,7 +132,6 @@ Future<void> main(List<String> rawArguments) async {
|
|||||||
);
|
);
|
||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
'collect',
|
'collect',
|
||||||
defaultsTo: false,
|
|
||||||
negatable: false,
|
negatable: false,
|
||||||
help: 'If this flag is set, then collect and parse header files from '
|
help: 'If this flag is set, then collect and parse header files from '
|
||||||
'Chromium and Android instead of reading pre-parsed data from '
|
'Chromium and Android instead of reading pre-parsed data from '
|
||||||
@ -141,7 +140,6 @@ Future<void> main(List<String> rawArguments) async {
|
|||||||
);
|
);
|
||||||
argParser.addFlag(
|
argParser.addFlag(
|
||||||
'help',
|
'help',
|
||||||
defaultsTo: false,
|
|
||||||
negatable: false,
|
negatable: false,
|
||||||
help: 'Print help for this command.',
|
help: 'Print help for this command.',
|
||||||
);
|
);
|
||||||
|
@ -22,7 +22,7 @@ class MaskConstant {
|
|||||||
return name
|
return name
|
||||||
.split(' ')
|
.split(' ')
|
||||||
.map<String>((String word) => lowerCamelToUpperCamel(word.toLowerCase()))
|
.map<String>((String word) => lowerCamelToUpperCamel(word.toLowerCase()))
|
||||||
.join('');
|
.join();
|
||||||
}
|
}
|
||||||
|
|
||||||
String get lowerCamelName {
|
String get lowerCamelName {
|
||||||
|
@ -81,7 +81,7 @@ class IOSCodeGenerator extends PlatformCodeGenerator {
|
|||||||
buffer.write(wrapString(constant.description, prefix: ' * '));
|
buffer.write(wrapString(constant.description, prefix: ' * '));
|
||||||
buffer.writeln(' */');
|
buffer.writeln(' */');
|
||||||
buffer.writeln('const uint64_t k${constant.upperCamelName} = ${toHex(constant.value, digits: 11)};');
|
buffer.writeln('const uint64_t k${constant.upperCamelName} = ${toHex(constant.value, digits: 11)};');
|
||||||
buffer.writeln('');
|
buffer.writeln();
|
||||||
}
|
}
|
||||||
return buffer.toString().trimRight();
|
return buffer.toString().trimRight();
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ class KeyboardKeysCodeGenerator extends BaseCodeGenerator {
|
|||||||
'[RawKeyEvent.physicalKey] for more information.');
|
'[RawKeyEvent.physicalKey] for more information.');
|
||||||
lines.add(entry.usbHidCode, '''
|
lines.add(entry.usbHidCode, '''
|
||||||
$firstComment ///
|
$firstComment ///
|
||||||
$otherComments static const PhysicalKeyboardKey ${entry.constantName} = PhysicalKeyboardKey(${toHex(entry.usbHidCode, digits: 8)});
|
$otherComments static const PhysicalKeyboardKey ${entry.constantName} = PhysicalKeyboardKey(${toHex(entry.usbHidCode)});
|
||||||
''');
|
''');
|
||||||
}
|
}
|
||||||
return lines.sortedJoin().trimRight();
|
return lines.sortedJoin().trimRight();
|
||||||
@ -71,7 +71,7 @@ $otherComments static const PhysicalKeyboardKey ${entry.constantName} = Physica
|
|||||||
final OutputLines<int> lines = OutputLines<int>('Physical debug names');
|
final OutputLines<int> lines = OutputLines<int>('Physical debug names');
|
||||||
for (final PhysicalKeyEntry entry in keyData.entries) {
|
for (final PhysicalKeyEntry entry in keyData.entries) {
|
||||||
lines.add(entry.usbHidCode, '''
|
lines.add(entry.usbHidCode, '''
|
||||||
${toHex(entry.usbHidCode, digits: 8)}: '${entry.commentName}',''');
|
${toHex(entry.usbHidCode)}: '${entry.commentName}',''');
|
||||||
}
|
}
|
||||||
return lines.sortedJoin().trimRight();
|
return lines.sortedJoin().trimRight();
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ class KeyCodesCcGenerator extends BaseCodeGenerator {
|
|||||||
final OutputLines<int> lines = OutputLines<int>('Physical Key list');
|
final OutputLines<int> lines = OutputLines<int>('Physical Key list');
|
||||||
for (final PhysicalKeyEntry entry in keyData.entries) {
|
for (final PhysicalKeyEntry entry in keyData.entries) {
|
||||||
lines.add(entry.usbHidCode, '''
|
lines.add(entry.usbHidCode, '''
|
||||||
constexpr uint64_t kPhysical${_toUpperCammel(entry.constantName)} = ${toHex(entry.usbHidCode, digits: 8)};''');
|
constexpr uint64_t kPhysical${_toUpperCammel(entry.constantName)} = ${toHex(entry.usbHidCode)};''');
|
||||||
}
|
}
|
||||||
return lines.sortedJoin().trimRight();
|
return lines.sortedJoin().trimRight();
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ Future<void> main() async {
|
|||||||
final HttpClient client = HttpClient();
|
final HttpClient client = HttpClient();
|
||||||
final HttpClientRequest request = await client.getUrl(Uri.parse(registry));
|
final HttpClientRequest request = await client.getUrl(Uri.parse(registry));
|
||||||
final HttpClientResponse response = await request.close();
|
final HttpClientResponse response = await request.close();
|
||||||
final String body = (await response.cast<List<int>>().transform<String>(utf8.decoder).toList()).join('');
|
final String body = (await response.cast<List<int>>().transform<String>(utf8.decoder).toList()).join();
|
||||||
final File subtagRegistry = File('../language_subtag_registry.dart');
|
final File subtagRegistry = File('../language_subtag_registry.dart');
|
||||||
final File subtagRegistryFlutterTools = File('../../../../packages/flutter_tools/lib/src/localizations/language_subtag_registry.dart');
|
final File subtagRegistryFlutterTools = File('../../../../packages/flutter_tools/lib/src/localizations/language_subtag_registry.dart');
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ class LocaleInfo implements Comparable<LocaleInfo> {
|
|||||||
return originalString
|
return originalString
|
||||||
.split('_')
|
.split('_')
|
||||||
.map<String>((String part) => part.substring(0, 1).toUpperCase() + part.substring(1).toLowerCase())
|
.map<String>((String part) => part.substring(0, 1).toUpperCase() + part.substring(1).toLowerCase())
|
||||||
.join('');
|
.join();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -232,17 +232,14 @@ GeneratorOptions parseArgs(List<String> rawArgs) {
|
|||||||
..addFlag(
|
..addFlag(
|
||||||
'overwrite',
|
'overwrite',
|
||||||
abbr: 'w',
|
abbr: 'w',
|
||||||
defaultsTo: false,
|
|
||||||
)
|
)
|
||||||
..addFlag(
|
..addFlag(
|
||||||
'material',
|
'material',
|
||||||
help: 'Whether to print the generated classes for the Material package only. Ignored when --overwrite is passed.',
|
help: 'Whether to print the generated classes for the Material package only. Ignored when --overwrite is passed.',
|
||||||
defaultsTo: false,
|
|
||||||
)
|
)
|
||||||
..addFlag(
|
..addFlag(
|
||||||
'cupertino',
|
'cupertino',
|
||||||
help: 'Whether to print the generated classes for the Cupertino package only. Ignored when --overwrite is passed.',
|
help: 'Whether to print the generated classes for the Cupertino package only. Ignored when --overwrite is passed.',
|
||||||
defaultsTo: false,
|
|
||||||
);
|
);
|
||||||
final argslib.ArgResults args = argParser.parse(rawArgs);
|
final argslib.ArgResults args = argParser.parse(rawArgs);
|
||||||
final bool writeToFile = args['overwrite'] as bool;
|
final bool writeToFile = args['overwrite'] as bool;
|
||||||
|
@ -165,7 +165,7 @@ class SourceStats {
|
|||||||
SourceStats getStatsFor(Directory dir, [SourceStats? stats]) {
|
SourceStats getStatsFor(Directory dir, [SourceStats? stats]) {
|
||||||
stats ??= SourceStats();
|
stats ??= SourceStats();
|
||||||
|
|
||||||
for (final FileSystemEntity entity in dir.listSync(recursive: false, followLinks: false)) {
|
for (final FileSystemEntity entity in dir.listSync(followLinks: false)) {
|
||||||
final String name = path.basename(entity.path);
|
final String name = path.basename(entity.path);
|
||||||
if (entity is File && name.endsWith('.dart')) {
|
if (entity is File && name.endsWith('.dart')) {
|
||||||
stats.files += 1;
|
stats.files += 1;
|
||||||
|
@ -212,7 +212,7 @@ ArgResults _handleArguments(List<String> args) {
|
|||||||
..addOption(_iconsClassPathOption,
|
..addOption(_iconsClassPathOption,
|
||||||
defaultsTo: _defaultIconsPath,
|
defaultsTo: _defaultIconsPath,
|
||||||
help: 'Location of the material icons file')
|
help: 'Location of the material icons file')
|
||||||
..addFlag(_dryRunOption, defaultsTo: false);
|
..addFlag(_dryRunOption);
|
||||||
argParser.addFlag('help', abbr: 'h', negatable: false, callback: (bool help) {
|
argParser.addFlag('help', abbr: 'h', negatable: false, callback: (bool help) {
|
||||||
if (help) {
|
if (help) {
|
||||||
print(argParser.usage);
|
print(argParser.usage);
|
||||||
@ -289,7 +289,7 @@ String _regenerateIconsFile(String iconData, Map<String, String> tokenPairMap) {
|
|||||||
// Generate for Icons
|
// Generate for Icons
|
||||||
if (line.contains(_beginGeneratedMark)) {
|
if (line.contains(_beginGeneratedMark)) {
|
||||||
generating = true;
|
generating = true;
|
||||||
final String iconDeclarationsString = newIcons.map((_Icon icon) => icon.fullDeclaration).join('');
|
final String iconDeclarationsString = newIcons.map((_Icon icon) => icon.fullDeclaration).join();
|
||||||
buf.write(iconDeclarationsString);
|
buf.write(iconDeclarationsString);
|
||||||
} else if (line.contains(_endGeneratedMark)) {
|
} else if (line.contains(_endGeneratedMark)) {
|
||||||
generating = false;
|
generating = false;
|
||||||
|
@ -39,7 +39,6 @@ final CatmullRomSpline path = CatmullRomSpline(
|
|||||||
],
|
],
|
||||||
startHandle: const Offset(0.93, 0.93),
|
startHandle: const Offset(0.93, 0.93),
|
||||||
endHandle: const Offset(0.18, 0.23),
|
endHandle: const Offset(0.18, 0.23),
|
||||||
tension: 0.0,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
class FollowCurve2D extends StatefulWidget {
|
class FollowCurve2D extends StatefulWidget {
|
||||||
@ -74,7 +73,7 @@ class _FollowCurve2DState extends State<FollowCurve2D>
|
|||||||
animation = CurvedAnimation(parent: controller, curve: widget.curve);
|
animation = CurvedAnimation(parent: controller, curve: widget.curve);
|
||||||
// Have the controller repeat indefinitely. If you want it to "bounce" back
|
// Have the controller repeat indefinitely. If you want it to "bounce" back
|
||||||
// and forth, set the reverse parameter to true.
|
// and forth, set the reverse parameter to true.
|
||||||
controller.repeat(reverse: false);
|
controller.repeat();
|
||||||
controller.addListener(() => setState(() {}));
|
controller.addListener(() => setState(() {}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,7 +106,6 @@ class MyStatelessWidget extends StatelessWidget {
|
|||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: FollowCurve2D(
|
child: FollowCurve2D(
|
||||||
path: path,
|
path: path,
|
||||||
curve: Curves.easeInOut,
|
|
||||||
duration: const Duration(seconds: 3),
|
duration: const Duration(seconds: 3),
|
||||||
child: CircleAvatar(
|
child: CircleAvatar(
|
||||||
backgroundColor: Colors.yellow,
|
backgroundColor: Colors.yellow,
|
||||||
|
@ -53,8 +53,6 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
|||||||
largeTitle: Text('Scroll down'),
|
largeTitle: Text('Scroll down'),
|
||||||
),
|
),
|
||||||
CupertinoSliverRefreshControl(
|
CupertinoSliverRefreshControl(
|
||||||
refreshTriggerPullDistance: 100.0,
|
|
||||||
refreshIndicatorExtent: 60.0,
|
|
||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
await Future<void>.delayed(
|
await Future<void>.delayed(
|
||||||
const Duration(milliseconds: 1000),
|
const Duration(milliseconds: 1000),
|
||||||
|
@ -116,7 +116,6 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
|||||||
Align(
|
Align(
|
||||||
alignment: Alignment.topLeft,
|
alignment: Alignment.topLeft,
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Switch(
|
Switch(
|
||||||
value: useResolver,
|
value: useResolver,
|
||||||
|
@ -64,8 +64,8 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
|||||||
restorationId: 'date_picker_dialog',
|
restorationId: 'date_picker_dialog',
|
||||||
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||||
initialDate: DateTime.fromMillisecondsSinceEpoch(arguments! as int),
|
initialDate: DateTime.fromMillisecondsSinceEpoch(arguments! as int),
|
||||||
firstDate: DateTime(2021, 1, 1),
|
firstDate: DateTime(2021),
|
||||||
lastDate: DateTime(2022, 1, 1),
|
lastDate: DateTime(2022),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -41,7 +41,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
|||||||
String? get restorationId => widget.restorationId;
|
String? get restorationId => widget.restorationId;
|
||||||
|
|
||||||
final RestorableDateTimeN _startDate =
|
final RestorableDateTimeN _startDate =
|
||||||
RestorableDateTimeN(DateTime(2021, 1, 1));
|
RestorableDateTimeN(DateTime(2021));
|
||||||
final RestorableDateTimeN _endDate =
|
final RestorableDateTimeN _endDate =
|
||||||
RestorableDateTimeN(DateTime(2021, 1, 5));
|
RestorableDateTimeN(DateTime(2021, 1, 5));
|
||||||
late final RestorableRouteFuture<DateTimeRange?>
|
late final RestorableRouteFuture<DateTimeRange?>
|
||||||
@ -85,9 +85,9 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget>
|
|||||||
restorationId: 'date_picker_dialog',
|
restorationId: 'date_picker_dialog',
|
||||||
initialDateRange:
|
initialDateRange:
|
||||||
_initialDateTimeRange(arguments! as Map<dynamic, dynamic>),
|
_initialDateTimeRange(arguments! as Map<dynamic, dynamic>),
|
||||||
firstDate: DateTime(2021, 1, 1),
|
firstDate: DateTime(2021),
|
||||||
currentDate: DateTime(2021, 1, 25),
|
currentDate: DateTime(2021, 1, 25),
|
||||||
lastDate: DateTime(2022, 1, 1),
|
lastDate: DateTime(2022),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -42,7 +42,6 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
|||||||
return DropdownButton<String>(
|
return DropdownButton<String>(
|
||||||
value: dropdownValue,
|
value: dropdownValue,
|
||||||
icon: const Icon(Icons.arrow_downward),
|
icon: const Icon(Icons.arrow_downward),
|
||||||
iconSize: 24,
|
|
||||||
elevation: 16,
|
elevation: 16,
|
||||||
style: const TextStyle(color: Colors.deepPurple),
|
style: const TextStyle(color: Colors.deepPurple),
|
||||||
underline: Container(
|
underline: Container(
|
||||||
|
@ -47,7 +47,6 @@ class _ArticleDescription extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
@ -73,7 +72,6 @@ class _ArticleDescription extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
@ -49,7 +49,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
|||||||
},
|
},
|
||||||
side: MaterialStateBorderSide.resolveWith((Set<MaterialState> states) {
|
side: MaterialStateBorderSide.resolveWith((Set<MaterialState> states) {
|
||||||
if (states.contains(MaterialState.selected)) {
|
if (states.contains(MaterialState.selected)) {
|
||||||
return const BorderSide(width: 1, color: Colors.red);
|
return const BorderSide(color: Colors.red);
|
||||||
}
|
}
|
||||||
return null; // Defer to default value on the theme or widget.
|
return null; // Defer to default value on the theme or widget.
|
||||||
}),
|
}),
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user