implicit-casts:false in dev (#45787)
This commit is contained in:
committed by
GitHub
parent
fa0c49d775
commit
ec1a015045
@@ -56,7 +56,7 @@ void main(List<String> args) {
|
||||
|
||||
final ArgResults argResults = parser.parse(args);
|
||||
|
||||
if (argResults['help'] ||
|
||||
if (argResults['help'] as bool ||
|
||||
!argResults.wasParsed('output') ||
|
||||
!argResults.wasParsed('asset-name') ||
|
||||
argResults.rest.isEmpty) {
|
||||
@@ -71,20 +71,20 @@ void main(List<String> args) {
|
||||
final StringBuffer generatedSb = StringBuffer();
|
||||
|
||||
if (argResults.wasParsed('header')) {
|
||||
generatedSb.write(File(argResults['header']).readAsStringSync());
|
||||
generatedSb.write(File(argResults['header'] as String).readAsStringSync());
|
||||
generatedSb.write('\n');
|
||||
}
|
||||
|
||||
if (argResults['codegen_comment'])
|
||||
if (argResults['codegen_comment'] as bool)
|
||||
generatedSb.write(kCodegenComment);
|
||||
|
||||
if (argResults.wasParsed('part-of'))
|
||||
generatedSb.write('part of ${argResults['part-of']};\n');
|
||||
|
||||
final Animation animation = Animation.fromFrameData(frames);
|
||||
generatedSb.write(animation.toDart('_AnimatedIconData', argResults['asset-name']));
|
||||
generatedSb.write(animation.toDart('_AnimatedIconData', argResults['asset-name'] as String));
|
||||
|
||||
final File outFile = File(argResults['output']);
|
||||
final File outFile = File(argResults['output'] as String);
|
||||
outFile.writeAsStringSync(generatedSb.toString());
|
||||
}
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ List<SvgPath> _interpretSvgGroup(List<XmlNode> children, _Transform transform) {
|
||||
for (XmlNode node in children) {
|
||||
if (node.nodeType != XmlNodeType.ELEMENT)
|
||||
continue;
|
||||
final XmlElement element = node;
|
||||
final XmlElement element = node as XmlElement;
|
||||
|
||||
if (element.name.local == 'path') {
|
||||
paths.add(SvgPath.fromElement(element).applyTransform(transform));
|
||||
@@ -270,9 +270,9 @@ class FrameData {
|
||||
bool operator ==(Object other) {
|
||||
if (runtimeType != other.runtimeType)
|
||||
return false;
|
||||
final FrameData typedOther = other;
|
||||
return size == typedOther.size
|
||||
&& const ListEquality<SvgPath>().equals(paths, typedOther.paths);
|
||||
return other is FrameData
|
||||
&& other.size == size
|
||||
&& const ListEquality<SvgPath>().equals(other.paths, paths);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -322,10 +322,10 @@ class SvgPath {
|
||||
bool operator ==(Object other) {
|
||||
if (runtimeType != other.runtimeType)
|
||||
return false;
|
||||
final SvgPath typedOther = other;
|
||||
return id == typedOther.id
|
||||
&& opacity == typedOther.opacity
|
||||
&& const ListEquality<SvgPathCommand>().equals(commands, typedOther.commands);
|
||||
return other is SvgPath
|
||||
&& other.id == id
|
||||
&& other.opacity == opacity
|
||||
&& const ListEquality<SvgPathCommand>().equals(other.commands, commands);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -371,9 +371,9 @@ class SvgPathCommand {
|
||||
bool operator ==(Object other) {
|
||||
if (runtimeType != other.runtimeType)
|
||||
return false;
|
||||
final SvgPathCommand typedOther = other;
|
||||
return type == typedOther.type
|
||||
&& const ListEquality<Point<double>>().equals(points, typedOther.points);
|
||||
return other is SvgPathCommand
|
||||
&& other.type == type
|
||||
&& const ListEquality<Point<double>>().equals(other.points, points);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -554,7 +554,7 @@ XmlElement _extractSvgElement(XmlDocument document) {
|
||||
return document.children.singleWhere(
|
||||
(XmlNode node) => node.nodeType == XmlNodeType.ELEMENT &&
|
||||
_asElement(node).name.local == 'svg'
|
||||
);
|
||||
) as XmlElement;
|
||||
}
|
||||
|
||||
XmlElement _asElement(XmlNode node) => node;
|
||||
XmlElement _asElement(XmlNode node) => node as XmlElement;
|
||||
|
||||
@@ -622,7 +622,7 @@ class PathMatcher extends Matcher {
|
||||
if (item.runtimeType != actual.runtimeType)
|
||||
return false;
|
||||
|
||||
final SvgPath other = item;
|
||||
final SvgPath other = item as SvgPath;
|
||||
if (other.id != actual.id || other.opacity != actual.opacity)
|
||||
return false;
|
||||
|
||||
@@ -666,7 +666,7 @@ class PathAnimationMatcher extends Matcher {
|
||||
if (item.runtimeType != expected.runtimeType)
|
||||
return false;
|
||||
|
||||
final PathAnimation other = item;
|
||||
final PathAnimation other = item as PathAnimation;
|
||||
|
||||
if (!const ListEquality<double>().equals(other.opacities, expected.opacities))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user