setUp method

  1. @override
Future<TargetPlatform?> setUp(
  1. TargetPlatform value

A function that will be called before each value is tested, with the value that will be tested.

This function should preserve any state needed to restore the testing environment back to its base state when tearDown is called in the Object that is returned. The returned object will then be passed to tearDown as a memento when the test is complete.


Future<TargetPlatform?> setUp(TargetPlatform value) async {
  final TargetPlatform? previousTargetPlatform = debugDefaultTargetPlatformOverride;
  debugDefaultTargetPlatformOverride = value;
  return previousTargetPlatform;