takeScreenshot method
Takes as screenshot of the widget that was captured in this snapshot.
The snapshot must have been taken at the same frame
Implementation
Future<Screenshot> takeScreenshot({String? name}) {
return self.takeScreenshot(snapshot: this, name: name);
}