Created
April 26, 2020 02:28
-
-
Save Ticore/f189b4a145d15819ab37647bd6b462e1 to your computer and use it in GitHub Desktop.
Flutter Dump Trees Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter_test/flutter_test.dart'; | |
void main() { | |
Directionality icon = Directionality( | |
child: Icon(Icons.favorite, size: 12), | |
textDirection: TextDirection.ltr, | |
); | |
ShaderMask shaderMask = ShaderMask( | |
shaderCallback: (Rect bounds) { | |
return RadialGradient( | |
colors: <Color>[Colors.black, Colors.white], | |
).createShader(bounds); | |
}, | |
child: icon, | |
); | |
testWidgets('dump widget tree: ShaderMask()', (WidgetTester tester) async { | |
await tester.pumpWidget(shaderMask); | |
debugDumpApp(); | |
debugDumpRenderTree(); | |
debugDumpLayerTree(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment