// Copyright 2017 The Chromium 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_test/flutter_test.dart';import'package:flutter/rendering.dart';voidmain(){testWidgets('FlatButton implements debugFillDescription',(WidgetTestertester)async{finalDiagnosticPropertiesBuilderbuilder=newDiagnosticPropertiesBuilder();newFlatButton(onPressed:(){},textColor:constColor(0xFF00FF00),disabledTextColor:constColor(0xFFFF0000),color:constColor(0xFF000000),highlightColor:constColor(0xFF1565C0),splashColor:constColor(0xFF9E9E9E),child:constText('Hello'),).debugFillProperties(builder);finalList<String>description=builder.properties.where((DiagnosticsNoden)=>!n.isFiltered(DiagnosticLevel.info)).map((DiagnosticsNoden)=>n.toString()).toList();expect(description,<String>['textColor: Color(0xff00ff00)','disabledTextColor: Color(0xffff0000)','color: Color(0xff000000)','highlightColor: Color(0xff1565c0)','splashColor: Color(0xff9e9e9e)',]);});}