GoogleApiHeaders class
GoogleApiHeaders provide a method for getting the headers required for calling Google APIs with a restricted key.
import 'package:google_api_headers/google_api_headers.dart';
final headers = await GoogleApiHeaders().getHeaders();
Constructors
- GoogleApiHeaders([MyPlatform? platform])
-
Constructor with an optional parameter of MyPlatform.
Default to MyPlatformImp if the parameter is not provided.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- platform → MyPlatform
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getHeaders(
) → Future< Map< String, String> > - Get the headers required for calling Google APIs with a restricted key based on the platform (iOS or Android). For web, an empty header will be returned.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
clear(
) → void - Clear cached headers.