FirebasePerformancePlatform class abstract
The interface that implementations of firebase_performance
must
extend.
Platform implementations should extend this class rather than implement it
as firebase_performance
does not consider newly added methods to be breaking
changes. Extending this class (using extends
) ensures that the subclass
will get the default implementation, while platform implementations that
implements
this interface will be broken by newly added
FirebasePerformancePlatform methods.
- Inheritance
-
- Object
- PlatformInterface
- FirebasePerformancePlatform
Constructors
- FirebasePerformancePlatform({FirebaseApp? appInstance})
- Create an instance using app.
- FirebasePerformancePlatform.instanceFor({required FirebaseApp app})
-
Create an instance with a
FirebaseApp
using an existing instance.factory
Properties
- app → FirebaseApp
-
Returns the
FirebaseApp
for the current instance.no setter - appInstance → FirebaseApp?
-
The
FirebaseApp
this instance was initialized with.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
delegateFor(
{required FirebaseApp app}) → FirebasePerformancePlatform -
Enables delegates to create new instances of themselves if a none default
FirebaseApp
instance is required by the user. Currently only default Firebase app only. -
isPerformanceCollectionEnabled(
) → Future< bool> - Determines whether custom performance monitoring is enabled or disabled.
-
newHttpMetric(
String url, HttpMethod httpMethod) → HttpMetricPlatform - Creates a HttpMetric object for collecting network performance data for one request/response. Only works for native apps. A stub class is created for web which does nothing.
-
newTrace(
String name) → TracePlatform - Creates a Trace object with given name. Traces can be used to measure the time taken for a sequence of steps. Traces also include “Counters”. Counters are used to track information which is cumulative in nature (e.g., Bytes downloaded).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setPerformanceCollectionEnabled(
bool enabled) → Future< void> - Enables or disables custom performance monitoring setup.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ FirebasePerformancePlatform
-
The current default FirebasePerformancePlatform instance.
getter/setter pair