Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::testing::ScopedStubFlutterApi Class Reference

#include <stub_flutter_api.h>

Public Member Functions

 ScopedStubFlutterApi (std::unique_ptr< StubFlutterApi > stub)
 
 ~ScopedStubFlutterApi ()
 
StubFlutterApistub ()
 

Detailed Description

Definition at line 88 of file stub_flutter_api.h.

Constructor & Destructor Documentation

◆ ScopedStubFlutterApi()

flutter::testing::ScopedStubFlutterApi::ScopedStubFlutterApi ( std::unique_ptr< StubFlutterApi stub)
explicit

Definition at line 24 of file stub_flutter_api.cc.

25 : stub_(std::move(stub)) {
26 previous_stub_ = StubFlutterApi::GetTestStub();
27 StubFlutterApi::SetTestStub(stub_.get());
28}
static void SetTestStub(StubFlutterApi *stub)
static StubFlutterApi * GetTestStub()

◆ ~ScopedStubFlutterApi()

flutter::testing::ScopedStubFlutterApi::~ScopedStubFlutterApi ( )

Definition at line 30 of file stub_flutter_api.cc.

30 {
31 StubFlutterApi::SetTestStub(previous_stub_);
32}

Member Function Documentation

◆ stub()

StubFlutterApi * flutter::testing::ScopedStubFlutterApi::stub ( )
inline

Definition at line 96 of file stub_flutter_api.h.

96{ return stub_.get(); }

The documentation for this class was generated from the following files: