// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.import'package:flutter/material.dart';import'package:flutter_api_samples/material/animated_icon/animated_icon.0.dart'asexample;import'package:flutter_test/flutter_test.dart';voidmain(){testWidgets('AnimatedIcon animates',(WidgetTestertester)async{awaittester.pumpWidget(constexample.AnimatedIconApp(),);// Test the AnimatedIcon size.finalSizeiconSize=tester.getSize(find.byType(AnimatedIcon));expect(iconSize.width,72.0);expect(iconSize.height,72.0);// Check if AnimatedIcon is animating.awaittester.pump(constDuration(milliseconds:500));AnimatedIconanimatedIcon=tester.widget(find.byType(AnimatedIcon));expect(animatedIcon.progress.value,0.25);// Check if animation is completed.awaittester.pump(constDuration(milliseconds:1500));animatedIcon=tester.widget(find.byType(AnimatedIcon));expect(animatedIcon.progress.value,1.0);});}