Commit 685d7340 authored by Ashmini Jaisingh's avatar Ashmini Jaisingh

Implemented graph structures and digraph

parent 20408a09
# Miscellaneous
.env
*.class
*.log
*.pyc
......
......@@ -11,9 +11,11 @@ import 'screens/profile_screen.dart';
import 'providers/delivery_provider.dart';
import 'login.dart';
import 'signup.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await dotenv.load(fileName: ".env");
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
......
......@@ -6,8 +6,8 @@ class DeliveryAddress {
final String city;
final String state;
final String zipCode;
final double? latitude;
final double? longitude;
double? latitude;
double? longitude;
final String? notes;
final DateTime createdAt;
......
// lib/models/digraph.dart
class Edge {
final int to;
final int weight; // seconds
Edge(this.to, this.weight);
}
class Digraph {
final int n; // number of nodes
final List<List<Edge>> adj;
Digraph(this.n) : adj = List.generate(n, (_) => []);
void addEdge(int u, int v, int w) {
adj[u].add(Edge(v, w));
}
/// Basic Dijkstra returning predecessor and distance arrays
Map<String, dynamic> dijkstra(int source) {
final dist = List<int>.filled(n, 1 << 30);
final prev = List<int?>.filled(n, null);
dist[source] = 0;
final visited = List<bool>.filled(n, false);
for (int i = 0; i < n; i++) {
int u = -1;
int best = 1 << 30;
for (int v = 0; v < n; v++) {
if (!visited[v] && dist[v] < best) {
best = dist[v];
u = v;
}
}
if (u == -1) break;
visited[u] = true;
for (final e in adj[u]) {
final alt = dist[u] + e.weight;
if (alt < dist[e.to]) {
dist[e.to] = alt;
prev[e.to] = u;
}
}
}
return {'dist': dist, 'prev': prev};
}
List<int> reconstructPath(int source, int target, List<int?> prev) {
final path = <int>[];
for (int? v = target; v != null; v = prev[v]) {
path.insert(0, v);
if (v == source) break;
}
if (path.isEmpty || path.first != source) return [];
return path;
}
}
import 'package:flutter/material.dart';
import '../models/delivery_address.dart';
import '../models/digraph.dart';
import '../services/google_api_service.dart';
class GraphNode {
final String id;
......@@ -81,4 +84,75 @@ class GraphProvider extends ChangeNotifier {
notifyListeners();
}
}
// ===== T7 / Routing Graph Fields =====
final GoogleApiService apiService;
GraphProvider({GoogleApiService? apiService})
: apiService = apiService ?? GoogleApiService();
// _api = GoogleApiService();
List<DeliveryAddress> addresses = [];
Digraph? graph;
List<List<int>>? matrix;
// ===== T7 Methods =====
/// Build the routing graph from delivery addresses
Future<void> buildGraphFromAddresses(List<DeliveryAddress> input) async {
addresses = input;
// 1) Geocode addresses using fullAddress getter
final fullAddresses = addresses.map((a) => a.fullAddress).toList();
final geocodeMap = await apiService.geocodeAddresses(fullAddresses);
// Update latitude / longitude in DeliveryAddress objects
for (int i = 0; i < addresses.length; i++) {
final loc = geocodeMap[fullAddresses[i]];
if (loc != null) {
addresses[i].latitude = loc.lat;
addresses[i].longitude = loc.lng;
} else {
addresses[i].latitude = null;
addresses[i].longitude = null;
}
}
// Filter valid addresses
final valid = addresses.where((a) => a.hasCoordinates).toList();
final origins = valid.map((a) => LatLng(a.latitude!, a.longitude!)).toList();
// 2) Distance matrix
matrix = await apiService.getDistanceMatrix(origins);
// 3) Build digraph for routing
graph = Digraph(origins.length);
for (int i = 0; i < origins.length; i++) {
for (int j = 0; j < origins.length; j++) {
if (i == j) continue;
final w = matrix![i][j];
if (w < (1 << 29)) {
graph!.addEdge(i, j, w);
}
}
}
notifyListeners();
}
/// Compute shortest route between two nodes in the routing graph
Map<String, dynamic> shortestRoute(int startIndex, int endIndex) {
if (graph == null) return {'distanceSeconds': 0, 'path': []};
final res = graph!.dijkstra(startIndex);
final prev = res['prev'] as List<int?>;
final dist = res['dist'] as List<int>;
final path = graph!.reconstructPath(startIndex, endIndex, prev);
return {'distanceSeconds': dist[endIndex], 'path': path};
}
}
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../providers/graph_provider.dart';
import '../providers/delivery_provider.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
// import '../models/delivery_address.dart';
class GraphScreen extends StatelessWidget {
class GraphScreen extends StatefulWidget {
const GraphScreen({super.key});
@override
State<GraphScreen> createState() => _GraphScreenState();
}
class _GraphScreenState extends State<GraphScreen> {
bool _isLoading = false;
String _statusMessage = "";
List<int> _samplePath = [];
int _totalNodes = 0;
GoogleMapController? _mapController;
final Set<Marker> _markers = {};
final Set<Polyline> _polylines = {};
@override
Widget build(BuildContext context) {
final deliveryProvider = Provider.of<DeliveryProvider>(context);
final graphProvider = Provider.of<GraphProvider>(context);
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
......@@ -18,27 +38,131 @@ class GraphScreen extends StatelessWidget {
actions: [
IconButton(
icon: const Icon(Icons.add),
onPressed: () {
// Add node functionality
_showAddNodeDialog(context);
},
onPressed: () => _showAddNodeDialog(context),
),
IconButton(
icon: const Icon(Icons.refresh),
onPressed: () {
Provider.of<GraphProvider>(context, listen: false).clearGraph();
graphProvider.clearGraph();
},
),
],
),
body: Consumer<GraphProvider>(
body: Column(
children: [
Padding(
padding: const EdgeInsets.all(16.0),
child: ElevatedButton(
onPressed: _isLoading
? null
: () async {
setState(() {
_isLoading = true;
_statusMessage = "Building graph...";
_samplePath = [];
_totalNodes = 0;
_markers.clear();
_polylines.clear();
});
try {
// Build graph from addresses
await graphProvider.buildGraphFromAddresses(
deliveryProvider.addresses);
final graph = graphProvider.graph;
if (graph != null) {
setState(() {
_totalNodes = graph.n;
if (graph.n >= 2) {
final res =
graphProvider.shortestRoute(0, graph.n - 1);
_samplePath = List<int>.from(res['path']);
_statusMessage =
"Graph built! Nodes: ${graph.n}";
} else {
_statusMessage = "Graph built, but not enough nodes";
}
// Optional: markers for all addresses
for (int i = 0; i < deliveryProvider.addresses.length; i++) {
final addr = deliveryProvider.addresses[i];
if (addr.hasCoordinates) {
_markers.add(Marker(
markerId: MarkerId(addr.id),
position: LatLng(addr.latitude!, addr.longitude!),
infoWindow: InfoWindow(title: addr.fullAddress),
));
}
}
// Optional: polyline for sample path
if (_samplePath.isNotEmpty) {
final points = _samplePath
.map((idx) => LatLng(
deliveryProvider.addresses[idx].latitude!,
deliveryProvider.addresses[idx].longitude!))
.toList();
_polylines.add(Polyline(
polylineId: const PolylineId("sample_path"),
points: points,
color: Colors.blue,
width: 4));
}
});
} else {
setState(() {
_statusMessage = "Graph could not be built";
});
}
} catch (e) {
setState(() {
_statusMessage = "Error building graph: $e";
});
} finally {
setState(() {
_isLoading = false;
});
}
},
child: _isLoading
? const CircularProgressIndicator(color: Colors.white)
: const Text("Build Routes"),
),
),
Text(_statusMessage),
if (_samplePath.isNotEmpty)
Text("Sample shortest path: $_samplePath"),
if (_totalNodes > 0) Text("Total nodes: $_totalNodes"),
const SizedBox(height: 16),
Expanded(
child: Consumer<GraphProvider>(
builder: (context, graphProvider, child) {
return graphProvider.nodes.isEmpty
? _buildEmptyGraphPlaceholder()
: CustomPaint(
painter: GraphPainter(
graphProvider.nodes, graphProvider.edges),
child: Container(),
);
},
),
),
],
),
floatingActionButton: FloatingActionButton(
onPressed: () => _showAddNodeDialog(context),
tooltip: 'Add Node',
child: const Icon(Icons.add),
),
);
}
Widget _buildEmptyGraphPlaceholder() {
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (graphProvider.nodes.isEmpty)
Column(
children: [
Icon(
Icons.account_tree_outlined,
......@@ -48,46 +172,22 @@ class GraphScreen extends StatelessWidget {
const SizedBox(height: 16),
Text(
'No graph data yet',
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
color: Colors.grey[600],
),
style: Theme.of(context)
.textTheme
.headlineSmall
?.copyWith(color: Colors.grey[600]),
),
const SizedBox(height: 8),
Text(
'Add nodes to start building your graph',
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: Colors.grey[500],
),
),
],
)
else
Expanded(
child: CustomPaint(
painter: GraphPainter(graphProvider.nodes, graphProvider.edges),
child: Container(),
),
),
const SizedBox(height: 20),
Text(
'Nodes: ${graphProvider.nodes.length}',
style: Theme.of(context).textTheme.bodyLarge,
),
Text(
'Edges: ${graphProvider.edges.length}',
style: Theme.of(context).textTheme.bodyLarge,
'Add nodes to start building your graph or use "Build Routes"',
style: Theme.of(context)
.textTheme
.bodyMedium
?.copyWith(color: Colors.grey[500]),
),
],
),
);
},
),
floatingActionButton: FloatingActionButton(
onPressed: () => _showAddNodeDialog(context),
tooltip: 'Add Node',
child: const Icon(Icons.add),
),
);
}
void _showAddNodeDialog(BuildContext context) {
......@@ -144,8 +244,6 @@ class GraphPainter extends CustomPainter {
..strokeWidth = 2.0
..style = PaintingStyle.stroke;
// Draw edges first
for (final edge in edges) {
final startNode = nodes.firstWhere((n) => n.id == edge.fromId);
final endNode = nodes.firstWhere((n) => n.id == edge.toId);
......@@ -157,7 +255,6 @@ class GraphPainter extends CustomPainter {
);
}
// Draw nodes
for (final node in nodes) {
canvas.drawCircle(
Offset(node.x, node.y),
......@@ -165,7 +262,6 @@ class GraphPainter extends CustomPainter {
nodePaint,
);
// Draw node label
final textPainter = TextPainter(
text: TextSpan(
text: node.label,
......
// lib/services/google_api_service.dart
import 'dart:convert';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:http/http.dart' as http;
class LatLng {
final double lat;
final double lng;
LatLng(this.lat, this.lng);
}
class GoogleApiService {
final String key = dotenv.env['GOOGLE_MAPS_API_KEY'] ?? '';
Future<LatLng?> geocodeAddress(String address) async {
final encoded = Uri.encodeComponent(address);
final url = Uri.parse(
'https://maps.googleapis.com/maps/api/geocode/json?address=$encoded&key=$key',
);
final res = await http.get(url);
if (res.statusCode != 200) return null;
final data = json.decode(res.body);
if (data['status'] != 'OK' || (data['results'] as List).isEmpty) return null;
final loc = data['results'][0]['geometry']['location'];
return LatLng(loc['lat'], loc['lng']);
}
/// Geocode many addresses in parallel (with small concurrency)
Future<Map<String, LatLng?>> geocodeAddresses(List<String> addresses) async {
final Map<String, LatLng?> out = {};
// Simple sequential approach (easier to respect rate limits). You can parallelize (Future.wait) cautiously.
for (final a in addresses) {
out[a] = await geocodeAddress(a);
}
return out;
}
/// Build a distance matrix (durations in seconds). Returns matrix[i][j] = duration (int), or large = unreachable
Future<List<List<int>>> getDistanceMatrix(List<LatLng> origins, {String travelMode = 'driving'}) async {
final originStr = origins.map((o) => '${o.lat},${o.lng}').join('|');
final destinationStr = originStr; // origins==destinations for full matrix
final url = Uri.parse(
'https://maps.googleapis.com/maps/api/distancematrix/json'
'?origins=$originStr'
'&destinations=$destinationStr'
'&mode=$travelMode'
'&units=metric'
'&key=$key',
);
final res = await http.get(url);
if (res.statusCode != 200) {
throw Exception('DistanceMatrix failed: ${res.statusCode}');
}
final data = json.decode(res.body);
if (data['status'] != 'OK') {
throw Exception('DistanceMatrix response: ${data['status']}');
}
final rows = data['rows'] as List;
final n = rows.length;
final List<List<int>> matrix = List.generate(n, (_) => List.filled(n, 1 << 30));
for (int i = 0; i < n; i++) {
final elements = rows[i]['elements'] as List;
for (int j = 0; j < elements.length; j++) {
final el = elements[j];
if (el['status'] == 'OK' && el['duration'] != null) {
matrix[i][j] = el['duration']['value']; // seconds
} else {
matrix[i][j] = 1 << 30; // unreachable sentinel
}
}
}
return matrix;
}
}
......@@ -342,6 +342,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_dotenv:
dependency: "direct main"
description:
name: flutter_dotenv
sha256: b7c7be5cd9f6ef7a78429cabd2774d3c4af50e79cb2b7593e3d5d763ef95c61b
url: "https://pub.dev"
source: hosted
version: "5.2.1"
flutter_driver:
dependency: transitive
description: flutter
......
......@@ -25,6 +25,7 @@ dependencies:
google_sign_in: ^6.2.1
image_picker: ^1.0.4
firebase_storage: ^11.5.6
flutter_dotenv: ^5.0.2
dev_dependencies:
flutter_test:
......@@ -39,5 +40,5 @@ flutter:
uses-material-design: true
assets:
- assets/images/
# - assets/images/
- assets/icons/
import 'package:graph_go/services/google_api_service.dart';
import 'package:mockito/annotations.dart';
@GenerateMocks([GoogleApiService])
void main() {}
// Mocks generated by Mockito 5.4.6 from annotations
// in graph_go/test/mocks/mock_services.dart.
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i4;
import 'package:graph_go/services/google_api_service.dart' as _i2;
import 'package:mockito/mockito.dart' as _i1;
import 'package:mockito/src/dummies.dart' as _i3;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
// ignore_for_file: avoid_setters_without_getters
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: implementation_imports
// ignore_for_file: invalid_use_of_visible_for_testing_member
// ignore_for_file: must_be_immutable
// ignore_for_file: prefer_const_constructors
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
// ignore_for_file: invalid_use_of_internal_member
/// A class which mocks [GoogleApiService].
///
/// See the documentation for Mockito's code generation for more information.
class MockGoogleApiService extends _i1.Mock implements _i2.GoogleApiService {
MockGoogleApiService() {
_i1.throwOnMissingStub(this);
}
@override
String get key => (super.noSuchMethod(
Invocation.getter(#key),
returnValue: _i3.dummyValue<String>(
this,
Invocation.getter(#key),
),
) as String);
@override
_i4.Future<_i2.LatLng?> geocodeAddress(String? address) =>
(super.noSuchMethod(
Invocation.method(
#geocodeAddress,
[address],
),
returnValue: _i4.Future<_i2.LatLng?>.value(),
) as _i4.Future<_i2.LatLng?>);
@override
_i4.Future<Map<String, _i2.LatLng?>> geocodeAddresses(
List<String>? addresses) =>
(super.noSuchMethod(
Invocation.method(
#geocodeAddresses,
[addresses],
),
returnValue:
_i4.Future<Map<String, _i2.LatLng?>>.value(<String, _i2.LatLng?>{}),
) as _i4.Future<Map<String, _i2.LatLng?>>);
@override
_i4.Future<List<List<int>>> getDistanceMatrix(
List<_i2.LatLng>? origins, {
String? travelMode = 'driving',
}) =>
(super.noSuchMethod(
Invocation.method(
#getDistanceMatrix,
[origins],
{#travelMode: travelMode},
),
returnValue: _i4.Future<List<List<int>>>.value(<List<int>>[]),
) as _i4.Future<List<List<int>>>);
}
......@@ -53,7 +53,11 @@ void main() {
// Arrange
final address = DeliveryAddress(
id: 'test-id',
fullAddress: '123 Test St, Test City',
// fullAddress: '123 Test St, Test City',
streetAddress: '123 Test St',
city: 'Test City',
state: 'NY',
zipCode: '10001',
latitude: 40.7128,
longitude: -74.0060,
);
......@@ -72,7 +76,11 @@ void main() {
for (int i = 0; i < 100; i++) {
final address = DeliveryAddress(
id: 'test-id-$i',
fullAddress: '123 Test St $i, Test City',
// fullAddress: '123 Test St $i, Test City',
streetAddress: '123 Test St $i',
city: 'Test City',
state: 'NY',
zipCode: '10001',
latitude: 40.7128,
longitude: -74.0060,
);
......@@ -81,7 +89,11 @@ void main() {
final extraAddress = DeliveryAddress(
id: 'extra-id',
fullAddress: '123 Extra St, Test City',
// fullAddress: '123 Extra St, Test City',
streetAddress: '123 Extra St',
city: 'Test City',
state: 'NY',
zipCode: '10001',
latitude: 40.7128,
longitude: -74.0060,
);
......@@ -99,7 +111,11 @@ void main() {
// Arrange
final originalAddress = DeliveryAddress(
id: 'test-id',
fullAddress: '123 Test St, Test City',
// fullAddress: '123 Test St, Test City',
streetAddress: '123 Test St',
city: 'Test City',
state: 'NY',
zipCode: '10001',
latitude: 40.7128,
longitude: -74.0060,
);
......@@ -107,7 +123,11 @@ void main() {
final updatedAddress = DeliveryAddress(
id: 'test-id',
fullAddress: '456 Updated St, Updated City',
// fullAddress: '456 Updated St, Updated City',
streetAddress: '456 Updated St',
city: 'Updated City',
state: 'NY',
zipCode: '10008',
latitude: 41.7128,
longitude: -75.0060,
);
......@@ -125,7 +145,11 @@ void main() {
// Arrange
final address = DeliveryAddress(
id: 'test-id',
fullAddress: '123 Test St, Test City',
// fullAddress: '123 Test St, Test City',
streetAddress: '123 Test St',
city: 'Test City',
state: 'NY',
zipCode: '10001',
latitude: 40.7128,
longitude: -74.0060,
);
......@@ -145,19 +169,31 @@ void main() {
// Add test addresses
final address1 = DeliveryAddress(
id: 'addr1',
fullAddress: '123 First St, Test City',
// fullAddress: '123 First St, Test City',
streetAddress: '123 First St',
city: 'Test City',
state: 'NY',
zipCode: '10001',
latitude: 40.7128,
longitude: -74.0060,
);
final address2 = DeliveryAddress(
id: 'addr2',
fullAddress: '456 Second St, Test City',
// fullAddress: '456 Second St, Test City',
streetAddress: '456 Second St',
city: 'Test City',
state: 'NY',
zipCode: '10001',
latitude: 40.7589,
longitude: -73.9851,
);
final address3 = DeliveryAddress(
id: 'addr3',
fullAddress: '789 Third St, Test City',
// fullAddress: '789 Third St, Test City',
streetAddress: '789 Third St',
city: 'Test City',
state: 'NY',
zipCode: '10001',
latitude: 40.7505,
longitude: -73.9934,
);
......@@ -178,9 +214,9 @@ void main() {
expect(result.name, 'Test Route');
expect(result.algorithm, RouteAlgorithm.dijkstra);
expect(result.addresses.length, 3);
expect(result.optimizedRoute.length, 3);
expect(result.optimizedRoute?.length, 3);
expect(result.totalDistance, greaterThan(0));
expect(result.estimatedTime.inMinutes, greaterThan(0));
expect(result.estimatedTime?.inMinutes, greaterThan(0));
});
test('should optimize route with Nearest Neighbor algorithm', () async {
......@@ -194,7 +230,7 @@ void main() {
expect(result.name, 'NN Route');
expect(result.algorithm, RouteAlgorithm.nearestNeighbor);
expect(result.addresses.length, 3);
expect(result.optimizedRoute.length, 3);
expect(result.optimizedRoute?.length, 3);
});
test('should throw exception when no addresses available', () async {
......@@ -233,7 +269,11 @@ void main() {
// Arrange
final invalidAddress = DeliveryAddress(
id: 'invalid-id',
fullAddress: 'Invalid Address That Cannot Be Geocoded',
// fullAddress: 'Invalid Address That Cannot Be Geocoded',
streetAddress: 'Invalid Address That Cannot Be Geocoded',
city: 'Invalid',
state: '',
zipCode: '',
);
// Act
......@@ -250,7 +290,11 @@ void main() {
// Arrange
final address = DeliveryAddress(
id: 'test-id',
fullAddress: '123 Test St, Test City',
// fullAddress: '123 Test St, Test City',
streetAddress: '123 Test St',
city: 'Test City',
state: 'NY',
zipCode: '10001',
latitude: 40.7128,
longitude: -74.0060,
);
......
// Mocks generated by Mockito 5.4.6 from annotations
// in graph_go/test/providers/delivery_provider_test.dart.
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:typed_data' as _i9;
import 'package:cloud_firestore/cloud_firestore.dart' as _i6;
import 'package:cloud_firestore_platform_interface/cloud_firestore_platform_interface.dart'
as _i5;
import 'package:firebase_auth/firebase_auth.dart' as _i4;
import 'package:firebase_auth_platform_interface/firebase_auth_platform_interface.dart'
as _i3;
import 'package:firebase_core/firebase_core.dart' as _i2;
import 'package:graph_go/services/geocoding_service.dart' as _i10;
import 'package:mockito/mockito.dart' as _i1;
import 'package:mockito/src/dummies.dart' as _i8;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
// ignore_for_file: avoid_setters_without_getters
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: implementation_imports
// ignore_for_file: invalid_use_of_visible_for_testing_member
// ignore_for_file: must_be_immutable
// ignore_for_file: prefer_const_constructors
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
// ignore_for_file: invalid_use_of_internal_member
class _FakeFirebaseApp_0 extends _i1.SmartFake implements _i2.FirebaseApp {
_FakeFirebaseApp_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeActionCodeInfo_1 extends _i1.SmartFake
implements _i3.ActionCodeInfo {
_FakeActionCodeInfo_1(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUserCredential_2 extends _i1.SmartFake
implements _i4.UserCredential {
_FakeUserCredential_2(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeConfirmationResult_3 extends _i1.SmartFake
implements _i4.ConfirmationResult {
_FakeConfirmationResult_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUserMetadata_4 extends _i1.SmartFake implements _i3.UserMetadata {
_FakeUserMetadata_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeMultiFactor_5 extends _i1.SmartFake implements _i4.MultiFactor {
_FakeMultiFactor_5(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeIdTokenResult_6 extends _i1.SmartFake implements _i3.IdTokenResult {
_FakeIdTokenResult_6(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUser_7 extends _i1.SmartFake implements _i4.User {
_FakeUser_7(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeSettings_8 extends _i1.SmartFake implements _i5.Settings {
_FakeSettings_8(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeCollectionReference_9<T extends Object?> extends _i1.SmartFake
implements _i6.CollectionReference<T> {
_FakeCollectionReference_9(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeWriteBatch_10 extends _i1.SmartFake implements _i6.WriteBatch {
_FakeWriteBatch_10(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeLoadBundleTask_11 extends _i1.SmartFake
implements _i6.LoadBundleTask {
_FakeLoadBundleTask_11(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeQuerySnapshot_12<T1 extends Object?> extends _i1.SmartFake
implements _i6.QuerySnapshot<T1> {
_FakeQuerySnapshot_12(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeQuery_13<T extends Object?> extends _i1.SmartFake
implements _i6.Query<T> {
_FakeQuery_13(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeDocumentReference_14<T extends Object?> extends _i1.SmartFake
implements _i6.DocumentReference<T> {
_FakeDocumentReference_14(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeFuture_15<T1> extends _i1.SmartFake implements _i7.Future<T1> {
_FakeFuture_15(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeFirebaseFirestore_16 extends _i1.SmartFake
implements _i6.FirebaseFirestore {
_FakeFirebaseFirestore_16(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeAggregateQuery_17 extends _i1.SmartFake
implements _i6.AggregateQuery {
_FakeAggregateQuery_17(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeDocumentSnapshot_18<T1 extends Object?> extends _i1.SmartFake
implements _i6.DocumentSnapshot<T1> {
_FakeDocumentSnapshot_18(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeSnapshotMetadata_19 extends _i1.SmartFake
implements _i6.SnapshotMetadata {
_FakeSnapshotMetadata_19(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [FirebaseAuth].
///
/// See the documentation for Mockito's code generation for more information.
class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth {
MockFirebaseAuth() {
_i1.throwOnMissingStub(this);
}
@override
_i2.FirebaseApp get app => (super.noSuchMethod(
Invocation.getter(#app),
returnValue: _FakeFirebaseApp_0(
this,
Invocation.getter(#app),
),
) as _i2.FirebaseApp);
@override
set app(_i2.FirebaseApp? value) => super.noSuchMethod(
Invocation.setter(
#app,
value,
),
returnValueForMissingStub: null,
);
@override
set tenantId(String? tenantId) => super.noSuchMethod(
Invocation.setter(
#tenantId,
tenantId,
),
returnValueForMissingStub: null,
);
@override
Map<dynamic, dynamic> get pluginConstants => (super.noSuchMethod(
Invocation.getter(#pluginConstants),
returnValue: <dynamic, dynamic>{},
) as Map<dynamic, dynamic>);
@override
_i7.Future<void> useEmulator(String? origin) => (super.noSuchMethod(
Invocation.method(
#useEmulator,
[origin],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> useAuthEmulator(
String? host,
int? port, {
bool? automaticHostMapping = true,
}) =>
(super.noSuchMethod(
Invocation.method(
#useAuthEmulator,
[
host,
port,
],
{#automaticHostMapping: automaticHostMapping},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> applyActionCode(String? code) => (super.noSuchMethod(
Invocation.method(
#applyActionCode,
[code],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<_i3.ActionCodeInfo> checkActionCode(String? code) =>
(super.noSuchMethod(
Invocation.method(
#checkActionCode,
[code],
),
returnValue: _i7.Future<_i3.ActionCodeInfo>.value(_FakeActionCodeInfo_1(
this,
Invocation.method(
#checkActionCode,
[code],
),
)),
) as _i7.Future<_i3.ActionCodeInfo>);
@override
_i7.Future<void> confirmPasswordReset({
required String? code,
required String? newPassword,
}) =>
(super.noSuchMethod(
Invocation.method(
#confirmPasswordReset,
[],
{
#code: code,
#newPassword: newPassword,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<_i4.UserCredential> createUserWithEmailAndPassword({
required String? email,
required String? password,
}) =>
(super.noSuchMethod(
Invocation.method(
#createUserWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#createUserWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<List<String>> fetchSignInMethodsForEmail(String? email) =>
(super.noSuchMethod(
Invocation.method(
#fetchSignInMethodsForEmail,
[email],
),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
@override
_i7.Future<_i4.UserCredential> getRedirectResult() => (super.noSuchMethod(
Invocation.method(
#getRedirectResult,
[],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#getRedirectResult,
[],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
bool isSignInWithEmailLink(String? emailLink) => (super.noSuchMethod(
Invocation.method(
#isSignInWithEmailLink,
[emailLink],
),
returnValue: false,
) as bool);
@override
_i7.Stream<_i4.User?> authStateChanges() => (super.noSuchMethod(
Invocation.method(
#authStateChanges,
[],
),
returnValue: _i7.Stream<_i4.User?>.empty(),
) as _i7.Stream<_i4.User?>);
@override
_i7.Stream<_i4.User?> idTokenChanges() => (super.noSuchMethod(
Invocation.method(
#idTokenChanges,
[],
),
returnValue: _i7.Stream<_i4.User?>.empty(),
) as _i7.Stream<_i4.User?>);
@override
_i7.Stream<_i4.User?> userChanges() => (super.noSuchMethod(
Invocation.method(
#userChanges,
[],
),
returnValue: _i7.Stream<_i4.User?>.empty(),
) as _i7.Stream<_i4.User?>);
@override
_i7.Future<void> sendPasswordResetEmail({
required String? email,
_i3.ActionCodeSettings? actionCodeSettings,
}) =>
(super.noSuchMethod(
Invocation.method(
#sendPasswordResetEmail,
[],
{
#email: email,
#actionCodeSettings: actionCodeSettings,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> sendSignInLinkToEmail({
required String? email,
required _i3.ActionCodeSettings? actionCodeSettings,
}) =>
(super.noSuchMethod(
Invocation.method(
#sendSignInLinkToEmail,
[],
{
#email: email,
#actionCodeSettings: actionCodeSettings,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> setLanguageCode(String? languageCode) => (super.noSuchMethod(
Invocation.method(
#setLanguageCode,
[languageCode],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> setSettings({
bool? appVerificationDisabledForTesting = false,
String? userAccessGroup,
String? phoneNumber,
String? smsCode,
bool? forceRecaptchaFlow,
}) =>
(super.noSuchMethod(
Invocation.method(
#setSettings,
[],
{
#appVerificationDisabledForTesting:
appVerificationDisabledForTesting,
#userAccessGroup: userAccessGroup,
#phoneNumber: phoneNumber,
#smsCode: smsCode,
#forceRecaptchaFlow: forceRecaptchaFlow,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> setPersistence(_i3.Persistence? persistence) =>
(super.noSuchMethod(
Invocation.method(
#setPersistence,
[persistence],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<_i4.UserCredential> signInAnonymously() => (super.noSuchMethod(
Invocation.method(
#signInAnonymously,
[],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInAnonymously,
[],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> signInWithCredential(
_i3.AuthCredential? credential) =>
(super.noSuchMethod(
Invocation.method(
#signInWithCredential,
[credential],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithCredential,
[credential],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> signInWithCustomToken(String? token) =>
(super.noSuchMethod(
Invocation.method(
#signInWithCustomToken,
[token],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithCustomToken,
[token],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> signInWithEmailAndPassword({
required String? email,
required String? password,
}) =>
(super.noSuchMethod(
Invocation.method(
#signInWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> signInWithEmailLink({
required String? email,
required String? emailLink,
}) =>
(super.noSuchMethod(
Invocation.method(
#signInWithEmailLink,
[],
{
#email: email,
#emailLink: emailLink,
},
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithEmailLink,
[],
{
#email: email,
#emailLink: emailLink,
},
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> signInWithAuthProvider(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithAuthProvider,
[provider],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithAuthProvider,
[provider],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> signInWithProvider(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithProvider,
[provider],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithProvider,
[provider],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.ConfirmationResult> signInWithPhoneNumber(
String? phoneNumber, [
_i4.RecaptchaVerifier? verifier,
]) =>
(super.noSuchMethod(
Invocation.method(
#signInWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
returnValue:
_i7.Future<_i4.ConfirmationResult>.value(_FakeConfirmationResult_3(
this,
Invocation.method(
#signInWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
)),
) as _i7.Future<_i4.ConfirmationResult>);
@override
_i7.Future<_i4.UserCredential> signInWithPopup(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithPopup,
[provider],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithPopup,
[provider],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<void> signInWithRedirect(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithRedirect,
[provider],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> signOut() => (super.noSuchMethod(
Invocation.method(
#signOut,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<String> verifyPasswordResetCode(String? code) =>
(super.noSuchMethod(
Invocation.method(
#verifyPasswordResetCode,
[code],
),
returnValue: _i7.Future<String>.value(_i8.dummyValue<String>(
this,
Invocation.method(
#verifyPasswordResetCode,
[code],
),
)),
) as _i7.Future<String>);
@override
_i7.Future<void> verifyPhoneNumber({
String? phoneNumber,
_i3.PhoneMultiFactorInfo? multiFactorInfo,
required _i3.PhoneVerificationCompleted? verificationCompleted,
required _i3.PhoneVerificationFailed? verificationFailed,
required _i3.PhoneCodeSent? codeSent,
required _i3.PhoneCodeAutoRetrievalTimeout? codeAutoRetrievalTimeout,
String? autoRetrievedSmsCodeForTesting,
Duration? timeout = const Duration(seconds: 30),
int? forceResendingToken,
_i3.MultiFactorSession? multiFactorSession,
}) =>
(super.noSuchMethod(
Invocation.method(
#verifyPhoneNumber,
[],
{
#phoneNumber: phoneNumber,
#multiFactorInfo: multiFactorInfo,
#verificationCompleted: verificationCompleted,
#verificationFailed: verificationFailed,
#codeSent: codeSent,
#codeAutoRetrievalTimeout: codeAutoRetrievalTimeout,
#autoRetrievedSmsCodeForTesting: autoRetrievedSmsCodeForTesting,
#timeout: timeout,
#forceResendingToken: forceResendingToken,
#multiFactorSession: multiFactorSession,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> revokeTokenWithAuthorizationCode(
String? authorizationCode) =>
(super.noSuchMethod(
Invocation.method(
#revokeTokenWithAuthorizationCode,
[authorizationCode],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
}
/// A class which mocks [User].
///
/// See the documentation for Mockito's code generation for more information.
class MockUser extends _i1.Mock implements _i4.User {
MockUser() {
_i1.throwOnMissingStub(this);
}
@override
bool get emailVerified => (super.noSuchMethod(
Invocation.getter(#emailVerified),
returnValue: false,
) as bool);
@override
bool get isAnonymous => (super.noSuchMethod(
Invocation.getter(#isAnonymous),
returnValue: false,
) as bool);
@override
_i3.UserMetadata get metadata => (super.noSuchMethod(
Invocation.getter(#metadata),
returnValue: _FakeUserMetadata_4(
this,
Invocation.getter(#metadata),
),
) as _i3.UserMetadata);
@override
List<_i3.UserInfo> get providerData => (super.noSuchMethod(
Invocation.getter(#providerData),
returnValue: <_i3.UserInfo>[],
) as List<_i3.UserInfo>);
@override
String get uid => (super.noSuchMethod(
Invocation.getter(#uid),
returnValue: _i8.dummyValue<String>(
this,
Invocation.getter(#uid),
),
) as String);
@override
_i4.MultiFactor get multiFactor => (super.noSuchMethod(
Invocation.getter(#multiFactor),
returnValue: _FakeMultiFactor_5(
this,
Invocation.getter(#multiFactor),
),
) as _i4.MultiFactor);
@override
_i7.Future<void> delete() => (super.noSuchMethod(
Invocation.method(
#delete,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<String?> getIdToken([bool? forceRefresh = false]) =>
(super.noSuchMethod(
Invocation.method(
#getIdToken,
[forceRefresh],
),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
_i7.Future<_i3.IdTokenResult> getIdTokenResult(
[bool? forceRefresh = false]) =>
(super.noSuchMethod(
Invocation.method(
#getIdTokenResult,
[forceRefresh],
),
returnValue: _i7.Future<_i3.IdTokenResult>.value(_FakeIdTokenResult_6(
this,
Invocation.method(
#getIdTokenResult,
[forceRefresh],
),
)),
) as _i7.Future<_i3.IdTokenResult>);
@override
_i7.Future<_i4.UserCredential> linkWithCredential(
_i3.AuthCredential? credential) =>
(super.noSuchMethod(
Invocation.method(
#linkWithCredential,
[credential],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#linkWithCredential,
[credential],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> linkWithProvider(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#linkWithProvider,
[provider],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#linkWithProvider,
[provider],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> reauthenticateWithProvider(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithProvider,
[provider],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#reauthenticateWithProvider,
[provider],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> reauthenticateWithPopup(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithPopup,
[provider],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#reauthenticateWithPopup,
[provider],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<void> reauthenticateWithRedirect(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithRedirect,
[provider],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<_i4.UserCredential> linkWithPopup(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#linkWithPopup,
[provider],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#linkWithPopup,
[provider],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<void> linkWithRedirect(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#linkWithRedirect,
[provider],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<_i4.ConfirmationResult> linkWithPhoneNumber(
String? phoneNumber, [
_i4.RecaptchaVerifier? verifier,
]) =>
(super.noSuchMethod(
Invocation.method(
#linkWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
returnValue:
_i7.Future<_i4.ConfirmationResult>.value(_FakeConfirmationResult_3(
this,
Invocation.method(
#linkWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
)),
) as _i7.Future<_i4.ConfirmationResult>);
@override
_i7.Future<_i4.UserCredential> reauthenticateWithCredential(
_i3.AuthCredential? credential) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithCredential,
[credential],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#reauthenticateWithCredential,
[credential],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<void> reload() => (super.noSuchMethod(
Invocation.method(
#reload,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> sendEmailVerification(
[_i3.ActionCodeSettings? actionCodeSettings]) =>
(super.noSuchMethod(
Invocation.method(
#sendEmailVerification,
[actionCodeSettings],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<_i4.User> unlink(String? providerId) => (super.noSuchMethod(
Invocation.method(
#unlink,
[providerId],
),
returnValue: _i7.Future<_i4.User>.value(_FakeUser_7(
this,
Invocation.method(
#unlink,
[providerId],
),
)),
) as _i7.Future<_i4.User>);
@override
_i7.Future<void> updateEmail(String? newEmail) => (super.noSuchMethod(
Invocation.method(
#updateEmail,
[newEmail],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> updatePassword(String? newPassword) => (super.noSuchMethod(
Invocation.method(
#updatePassword,
[newPassword],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> updatePhoneNumber(
_i3.PhoneAuthCredential? phoneCredential) =>
(super.noSuchMethod(
Invocation.method(
#updatePhoneNumber,
[phoneCredential],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> updateDisplayName(String? displayName) =>
(super.noSuchMethod(
Invocation.method(
#updateDisplayName,
[displayName],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> updatePhotoURL(String? photoURL) => (super.noSuchMethod(
Invocation.method(
#updatePhotoURL,
[photoURL],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> updateProfile({
String? displayName,
String? photoURL,
}) =>
(super.noSuchMethod(
Invocation.method(
#updateProfile,
[],
{
#displayName: displayName,
#photoURL: photoURL,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> verifyBeforeUpdateEmail(
String? newEmail, [
_i3.ActionCodeSettings? actionCodeSettings,
]) =>
(super.noSuchMethod(
Invocation.method(
#verifyBeforeUpdateEmail,
[
newEmail,
actionCodeSettings,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
}
/// A class which mocks [FirebaseFirestore].
///
/// See the documentation for Mockito's code generation for more information.
class MockFirebaseFirestore extends _i1.Mock implements _i6.FirebaseFirestore {
MockFirebaseFirestore() {
_i1.throwOnMissingStub(this);
}
@override
_i2.FirebaseApp get app => (super.noSuchMethod(
Invocation.getter(#app),
returnValue: _FakeFirebaseApp_0(
this,
Invocation.getter(#app),
),
) as _i2.FirebaseApp);
@override
String get databaseURL => (super.noSuchMethod(
Invocation.getter(#databaseURL),
returnValue: _i8.dummyValue<String>(
this,
Invocation.getter(#databaseURL),
),
) as String);
@override
String get databaseId => (super.noSuchMethod(
Invocation.getter(#databaseId),
returnValue: _i8.dummyValue<String>(
this,
Invocation.getter(#databaseId),
),
) as String);
@override
_i5.Settings get settings => (super.noSuchMethod(
Invocation.getter(#settings),
returnValue: _FakeSettings_8(
this,
Invocation.getter(#settings),
),
) as _i5.Settings);
@override
set app(_i2.FirebaseApp? value) => super.noSuchMethod(
Invocation.setter(
#app,
value,
),
returnValueForMissingStub: null,
);
@override
set databaseURL(String? value) => super.noSuchMethod(
Invocation.setter(
#databaseURL,
value,
),
returnValueForMissingStub: null,
);
@override
set databaseId(String? value) => super.noSuchMethod(
Invocation.setter(
#databaseId,
value,
),
returnValueForMissingStub: null,
);
@override
set settings(_i5.Settings? settings) => super.noSuchMethod(
Invocation.setter(
#settings,
settings,
),
returnValueForMissingStub: null,
);
@override
Map<dynamic, dynamic> get pluginConstants => (super.noSuchMethod(
Invocation.getter(#pluginConstants),
returnValue: <dynamic, dynamic>{},
) as Map<dynamic, dynamic>);
@override
_i6.CollectionReference<Map<String, dynamic>> collection(
String? collectionPath) =>
(super.noSuchMethod(
Invocation.method(
#collection,
[collectionPath],
),
returnValue: _FakeCollectionReference_9<Map<String, dynamic>>(
this,
Invocation.method(
#collection,
[collectionPath],
),
),
) as _i6.CollectionReference<Map<String, dynamic>>);
@override
_i6.WriteBatch batch() => (super.noSuchMethod(
Invocation.method(
#batch,
[],
),
returnValue: _FakeWriteBatch_10(
this,
Invocation.method(
#batch,
[],
),
),
) as _i6.WriteBatch);
@override
_i7.Future<void> clearPersistence() => (super.noSuchMethod(
Invocation.method(
#clearPersistence,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> enablePersistence(
[_i5.PersistenceSettings? persistenceSettings]) =>
(super.noSuchMethod(
Invocation.method(
#enablePersistence,
[persistenceSettings],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.LoadBundleTask loadBundle(_i9.Uint8List? bundle) => (super.noSuchMethod(
Invocation.method(
#loadBundle,
[bundle],
),
returnValue: _FakeLoadBundleTask_11(
this,
Invocation.method(
#loadBundle,
[bundle],
),
),
) as _i6.LoadBundleTask);
@override
void useFirestoreEmulator(
String? host,
int? port, {
bool? sslEnabled = false,
bool? automaticHostMapping = true,
}) =>
super.noSuchMethod(
Invocation.method(
#useFirestoreEmulator,
[
host,
port,
],
{
#sslEnabled: sslEnabled,
#automaticHostMapping: automaticHostMapping,
},
),
returnValueForMissingStub: null,
);
@override
_i7.Future<_i6.QuerySnapshot<T>> namedQueryWithConverterGet<T>(
String? name, {
_i5.GetOptions? options = const _i5.GetOptions(),
required _i6.FromFirestore<T>? fromFirestore,
required _i6.ToFirestore<T>? toFirestore,
}) =>
(super.noSuchMethod(
Invocation.method(
#namedQueryWithConverterGet,
[name],
{
#options: options,
#fromFirestore: fromFirestore,
#toFirestore: toFirestore,
},
),
returnValue:
_i7.Future<_i6.QuerySnapshot<T>>.value(_FakeQuerySnapshot_12<T>(
this,
Invocation.method(
#namedQueryWithConverterGet,
[name],
{
#options: options,
#fromFirestore: fromFirestore,
#toFirestore: toFirestore,
},
),
)),
) as _i7.Future<_i6.QuerySnapshot<T>>);
@override
_i7.Future<_i6.QuerySnapshot<Map<String, dynamic>>> namedQueryGet(
String? name, {
_i5.GetOptions? options = const _i5.GetOptions(),
}) =>
(super.noSuchMethod(
Invocation.method(
#namedQueryGet,
[name],
{#options: options},
),
returnValue: _i7.Future<_i6.QuerySnapshot<Map<String, dynamic>>>.value(
_FakeQuerySnapshot_12<Map<String, dynamic>>(
this,
Invocation.method(
#namedQueryGet,
[name],
{#options: options},
),
)),
) as _i7.Future<_i6.QuerySnapshot<Map<String, dynamic>>>);
@override
_i6.Query<Map<String, dynamic>> collectionGroup(String? collectionPath) =>
(super.noSuchMethod(
Invocation.method(
#collectionGroup,
[collectionPath],
),
returnValue: _FakeQuery_13<Map<String, dynamic>>(
this,
Invocation.method(
#collectionGroup,
[collectionPath],
),
),
) as _i6.Query<Map<String, dynamic>>);
@override
_i7.Future<void> disableNetwork() => (super.noSuchMethod(
Invocation.method(
#disableNetwork,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.DocumentReference<Map<String, dynamic>> doc(String? documentPath) =>
(super.noSuchMethod(
Invocation.method(
#doc,
[documentPath],
),
returnValue: _FakeDocumentReference_14<Map<String, dynamic>>(
this,
Invocation.method(
#doc,
[documentPath],
),
),
) as _i6.DocumentReference<Map<String, dynamic>>);
@override
_i7.Future<void> enableNetwork() => (super.noSuchMethod(
Invocation.method(
#enableNetwork,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Stream<void> snapshotsInSync() => (super.noSuchMethod(
Invocation.method(
#snapshotsInSync,
[],
),
returnValue: _i7.Stream<void>.empty(),
) as _i7.Stream<void>);
@override
_i7.Future<T> runTransaction<T>(
_i6.TransactionHandler<T>? transactionHandler, {
Duration? timeout = const Duration(seconds: 30),
int? maxAttempts = 5,
}) =>
(super.noSuchMethod(
Invocation.method(
#runTransaction,
[transactionHandler],
{
#timeout: timeout,
#maxAttempts: maxAttempts,
},
),
returnValue: _i8.ifNotNull(
_i8.dummyValueOrNull<T>(
this,
Invocation.method(
#runTransaction,
[transactionHandler],
{
#timeout: timeout,
#maxAttempts: maxAttempts,
},
),
),
(T v) => _i7.Future<T>.value(v),
) ??
_FakeFuture_15<T>(
this,
Invocation.method(
#runTransaction,
[transactionHandler],
{
#timeout: timeout,
#maxAttempts: maxAttempts,
},
),
),
) as _i7.Future<T>);
@override
_i7.Future<void> terminate() => (super.noSuchMethod(
Invocation.method(
#terminate,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> waitForPendingWrites() => (super.noSuchMethod(
Invocation.method(
#waitForPendingWrites,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> setIndexConfiguration({
required List<_i5.Index>? indexes,
List<_i5.FieldOverrides>? fieldOverrides,
}) =>
(super.noSuchMethod(
Invocation.method(
#setIndexConfiguration,
[],
{
#indexes: indexes,
#fieldOverrides: fieldOverrides,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> setIndexConfigurationFromJSON(String? json) =>
(super.noSuchMethod(
Invocation.method(
#setIndexConfigurationFromJSON,
[json],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
}
/// A class which mocks [CollectionReference].
///
/// See the documentation for Mockito's code generation for more information.
// ignore: must_be_immutable
class MockCollectionReference<T extends Object?> extends _i1.Mock
implements _i6.CollectionReference<T> {
MockCollectionReference() {
_i1.throwOnMissingStub(this);
}
@override
String get id => (super.noSuchMethod(
Invocation.getter(#id),
returnValue: _i8.dummyValue<String>(
this,
Invocation.getter(#id),
),
) as String);
@override
String get path => (super.noSuchMethod(
Invocation.getter(#path),
returnValue: _i8.dummyValue<String>(
this,
Invocation.getter(#path),
),
) as String);
@override
_i6.FirebaseFirestore get firestore => (super.noSuchMethod(
Invocation.getter(#firestore),
returnValue: _FakeFirebaseFirestore_16(
this,
Invocation.getter(#firestore),
),
) as _i6.FirebaseFirestore);
@override
Map<String, dynamic> get parameters => (super.noSuchMethod(
Invocation.getter(#parameters),
returnValue: <String, dynamic>{},
) as Map<String, dynamic>);
@override
_i7.Future<_i6.DocumentReference<T>> add(T? data) => (super.noSuchMethod(
Invocation.method(
#add,
[data],
),
returnValue: _i7.Future<_i6.DocumentReference<T>>.value(
_FakeDocumentReference_14<T>(
this,
Invocation.method(
#add,
[data],
),
)),
) as _i7.Future<_i6.DocumentReference<T>>);
@override
_i6.DocumentReference<T> doc([String? path]) => (super.noSuchMethod(
Invocation.method(
#doc,
[path],
),
returnValue: _FakeDocumentReference_14<T>(
this,
Invocation.method(
#doc,
[path],
),
),
) as _i6.DocumentReference<T>);
@override
_i6.CollectionReference<R> withConverter<R extends Object?>({
required _i6.FromFirestore<R>? fromFirestore,
required _i6.ToFirestore<R>? toFirestore,
}) =>
(super.noSuchMethod(
Invocation.method(
#withConverter,
[],
{
#fromFirestore: fromFirestore,
#toFirestore: toFirestore,
},
),
returnValue: _FakeCollectionReference_9<R>(
this,
Invocation.method(
#withConverter,
[],
{
#fromFirestore: fromFirestore,
#toFirestore: toFirestore,
},
),
),
) as _i6.CollectionReference<R>);
@override
_i6.Query<T> endAtDocument(_i6.DocumentSnapshot<Object?>? documentSnapshot) =>
(super.noSuchMethod(
Invocation.method(
#endAtDocument,
[documentSnapshot],
),
returnValue: _FakeQuery_13<T>(
this,
Invocation.method(
#endAtDocument,
[documentSnapshot],
),
),
) as _i6.Query<T>);
@override
_i6.Query<T> endAt(Iterable<Object?>? values) => (super.noSuchMethod(
Invocation.method(
#endAt,
[values],
),
returnValue: _FakeQuery_13<T>(
this,
Invocation.method(
#endAt,
[values],
),
),
) as _i6.Query<T>);
@override
_i6.Query<T> endBeforeDocument(
_i6.DocumentSnapshot<Object?>? documentSnapshot) =>
(super.noSuchMethod(
Invocation.method(
#endBeforeDocument,
[documentSnapshot],
),
returnValue: _FakeQuery_13<T>(
this,
Invocation.method(
#endBeforeDocument,
[documentSnapshot],
),
),
) as _i6.Query<T>);
@override
_i6.Query<T> endBefore(Iterable<Object?>? values) => (super.noSuchMethod(
Invocation.method(
#endBefore,
[values],
),
returnValue: _FakeQuery_13<T>(
this,
Invocation.method(
#endBefore,
[values],
),
),
) as _i6.Query<T>);
@override
_i7.Future<_i6.QuerySnapshot<T>> get([_i5.GetOptions? options]) =>
(super.noSuchMethod(
Invocation.method(
#get,
[options],
),
returnValue:
_i7.Future<_i6.QuerySnapshot<T>>.value(_FakeQuerySnapshot_12<T>(
this,
Invocation.method(
#get,
[options],
),
)),
) as _i7.Future<_i6.QuerySnapshot<T>>);
@override
_i6.Query<T> limit(int? limit) => (super.noSuchMethod(
Invocation.method(
#limit,
[limit],
),
returnValue: _FakeQuery_13<T>(
this,
Invocation.method(
#limit,
[limit],
),
),
) as _i6.Query<T>);
@override
_i6.Query<T> limitToLast(int? limit) => (super.noSuchMethod(
Invocation.method(
#limitToLast,
[limit],
),
returnValue: _FakeQuery_13<T>(
this,
Invocation.method(
#limitToLast,
[limit],
),
),
) as _i6.Query<T>);
@override
_i7.Stream<_i6.QuerySnapshot<T>> snapshots({
bool? includeMetadataChanges = false,
_i5.ListenSource? source = _i5.ListenSource.defaultSource,
}) =>
(super.noSuchMethod(
Invocation.method(
#snapshots,
[],
{
#includeMetadataChanges: includeMetadataChanges,
#source: source,
},
),
returnValue: _i7.Stream<_i6.QuerySnapshot<T>>.empty(),
) as _i7.Stream<_i6.QuerySnapshot<T>>);
@override
_i6.Query<T> orderBy(
Object? field, {
bool? descending = false,
}) =>
(super.noSuchMethod(
Invocation.method(
#orderBy,
[field],
{#descending: descending},
),
returnValue: _FakeQuery_13<T>(
this,
Invocation.method(
#orderBy,
[field],
{#descending: descending},
),
),
) as _i6.Query<T>);
@override
_i6.Query<T> startAfterDocument(
_i6.DocumentSnapshot<Object?>? documentSnapshot) =>
(super.noSuchMethod(
Invocation.method(
#startAfterDocument,
[documentSnapshot],
),
returnValue: _FakeQuery_13<T>(
this,
Invocation.method(
#startAfterDocument,
[documentSnapshot],
),
),
) as _i6.Query<T>);
@override
_i6.Query<T> startAfter(Iterable<Object?>? values) => (super.noSuchMethod(
Invocation.method(
#startAfter,
[values],
),
returnValue: _FakeQuery_13<T>(
this,
Invocation.method(
#startAfter,
[values],
),
),
) as _i6.Query<T>);
@override
_i6.Query<T> startAtDocument(
_i6.DocumentSnapshot<Object?>? documentSnapshot) =>
(super.noSuchMethod(
Invocation.method(
#startAtDocument,
[documentSnapshot],
),
returnValue: _FakeQuery_13<T>(
this,
Invocation.method(
#startAtDocument,
[documentSnapshot],
),
),
) as _i6.Query<T>);
@override
_i6.Query<T> startAt(Iterable<Object?>? values) => (super.noSuchMethod(
Invocation.method(
#startAt,
[values],
),
returnValue: _FakeQuery_13<T>(
this,
Invocation.method(
#startAt,
[values],
),
),
) as _i6.Query<T>);
@override
_i6.Query<T> where(
Object? field, {
Object? isEqualTo,
Object? isNotEqualTo,
Object? isLessThan,
Object? isLessThanOrEqualTo,
Object? isGreaterThan,
Object? isGreaterThanOrEqualTo,
Object? arrayContains,
Iterable<Object?>? arrayContainsAny,
Iterable<Object?>? whereIn,
Iterable<Object?>? whereNotIn,
bool? isNull,
}) =>
(super.noSuchMethod(
Invocation.method(
#where,
[field],
{
#isEqualTo: isEqualTo,
#isNotEqualTo: isNotEqualTo,
#isLessThan: isLessThan,
#isLessThanOrEqualTo: isLessThanOrEqualTo,
#isGreaterThan: isGreaterThan,
#isGreaterThanOrEqualTo: isGreaterThanOrEqualTo,
#arrayContains: arrayContains,
#arrayContainsAny: arrayContainsAny,
#whereIn: whereIn,
#whereNotIn: whereNotIn,
#isNull: isNull,
},
),
returnValue: _FakeQuery_13<T>(
this,
Invocation.method(
#where,
[field],
{
#isEqualTo: isEqualTo,
#isNotEqualTo: isNotEqualTo,
#isLessThan: isLessThan,
#isLessThanOrEqualTo: isLessThanOrEqualTo,
#isGreaterThan: isGreaterThan,
#isGreaterThanOrEqualTo: isGreaterThanOrEqualTo,
#arrayContains: arrayContains,
#arrayContainsAny: arrayContainsAny,
#whereIn: whereIn,
#whereNotIn: whereNotIn,
#isNull: isNull,
},
),
),
) as _i6.Query<T>);
@override
_i6.AggregateQuery count() => (super.noSuchMethod(
Invocation.method(
#count,
[],
),
returnValue: _FakeAggregateQuery_17(
this,
Invocation.method(
#count,
[],
),
),
) as _i6.AggregateQuery);
@override
_i6.AggregateQuery aggregate(
_i5.AggregateField? aggregateField1, [
_i5.AggregateField? aggregateField2,
_i5.AggregateField? aggregateField3,
_i5.AggregateField? aggregateField4,
_i5.AggregateField? aggregateField5,
_i5.AggregateField? aggregateField6,
_i5.AggregateField? aggregateField7,
_i5.AggregateField? aggregateField8,
_i5.AggregateField? aggregateField9,
_i5.AggregateField? aggregateField10,
_i5.AggregateField? aggregateField11,
_i5.AggregateField? aggregateField12,
_i5.AggregateField? aggregateField13,
_i5.AggregateField? aggregateField14,
_i5.AggregateField? aggregateField15,
_i5.AggregateField? aggregateField16,
_i5.AggregateField? aggregateField17,
_i5.AggregateField? aggregateField18,
_i5.AggregateField? aggregateField19,
_i5.AggregateField? aggregateField20,
_i5.AggregateField? aggregateField21,
_i5.AggregateField? aggregateField22,
_i5.AggregateField? aggregateField23,
_i5.AggregateField? aggregateField24,
_i5.AggregateField? aggregateField25,
_i5.AggregateField? aggregateField26,
_i5.AggregateField? aggregateField27,
_i5.AggregateField? aggregateField28,
_i5.AggregateField? aggregateField29,
_i5.AggregateField? aggregateField30,
]) =>
(super.noSuchMethod(
Invocation.method(
#aggregate,
[
aggregateField1,
aggregateField2,
aggregateField3,
aggregateField4,
aggregateField5,
aggregateField6,
aggregateField7,
aggregateField8,
aggregateField9,
aggregateField10,
aggregateField11,
aggregateField12,
aggregateField13,
aggregateField14,
aggregateField15,
aggregateField16,
aggregateField17,
aggregateField18,
aggregateField19,
aggregateField20,
aggregateField21,
aggregateField22,
aggregateField23,
aggregateField24,
aggregateField25,
aggregateField26,
aggregateField27,
aggregateField28,
aggregateField29,
aggregateField30,
],
),
returnValue: _FakeAggregateQuery_17(
this,
Invocation.method(
#aggregate,
[
aggregateField1,
aggregateField2,
aggregateField3,
aggregateField4,
aggregateField5,
aggregateField6,
aggregateField7,
aggregateField8,
aggregateField9,
aggregateField10,
aggregateField11,
aggregateField12,
aggregateField13,
aggregateField14,
aggregateField15,
aggregateField16,
aggregateField17,
aggregateField18,
aggregateField19,
aggregateField20,
aggregateField21,
aggregateField22,
aggregateField23,
aggregateField24,
aggregateField25,
aggregateField26,
aggregateField27,
aggregateField28,
aggregateField29,
aggregateField30,
],
),
),
) as _i6.AggregateQuery);
}
/// A class which mocks [DocumentReference].
///
/// See the documentation for Mockito's code generation for more information.
// ignore: must_be_immutable
class MockDocumentReference<T extends Object?> extends _i1.Mock
implements _i6.DocumentReference<T> {
MockDocumentReference() {
_i1.throwOnMissingStub(this);
}
@override
_i6.FirebaseFirestore get firestore => (super.noSuchMethod(
Invocation.getter(#firestore),
returnValue: _FakeFirebaseFirestore_16(
this,
Invocation.getter(#firestore),
),
) as _i6.FirebaseFirestore);
@override
String get id => (super.noSuchMethod(
Invocation.getter(#id),
returnValue: _i8.dummyValue<String>(
this,
Invocation.getter(#id),
),
) as String);
@override
_i6.CollectionReference<T> get parent => (super.noSuchMethod(
Invocation.getter(#parent),
returnValue: _FakeCollectionReference_9<T>(
this,
Invocation.getter(#parent),
),
) as _i6.CollectionReference<T>);
@override
String get path => (super.noSuchMethod(
Invocation.getter(#path),
returnValue: _i8.dummyValue<String>(
this,
Invocation.getter(#path),
),
) as String);
@override
_i6.CollectionReference<Map<String, dynamic>> collection(
String? collectionPath) =>
(super.noSuchMethod(
Invocation.method(
#collection,
[collectionPath],
),
returnValue: _FakeCollectionReference_9<Map<String, dynamic>>(
this,
Invocation.method(
#collection,
[collectionPath],
),
),
) as _i6.CollectionReference<Map<String, dynamic>>);
@override
_i7.Future<void> delete() => (super.noSuchMethod(
Invocation.method(
#delete,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> update(Map<Object, Object?>? data) => (super.noSuchMethod(
Invocation.method(
#update,
[data],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<_i6.DocumentSnapshot<T>> get([_i5.GetOptions? options]) =>
(super.noSuchMethod(
Invocation.method(
#get,
[options],
),
returnValue: _i7.Future<_i6.DocumentSnapshot<T>>.value(
_FakeDocumentSnapshot_18<T>(
this,
Invocation.method(
#get,
[options],
),
)),
) as _i7.Future<_i6.DocumentSnapshot<T>>);
@override
_i7.Stream<_i6.DocumentSnapshot<T>> snapshots({
bool? includeMetadataChanges = false,
_i5.ListenSource? source = _i5.ListenSource.defaultSource,
}) =>
(super.noSuchMethod(
Invocation.method(
#snapshots,
[],
{
#includeMetadataChanges: includeMetadataChanges,
#source: source,
},
),
returnValue: _i7.Stream<_i6.DocumentSnapshot<T>>.empty(),
) as _i7.Stream<_i6.DocumentSnapshot<T>>);
@override
_i7.Future<void> set(
T? data, [
_i5.SetOptions? options,
]) =>
(super.noSuchMethod(
Invocation.method(
#set,
[
data,
options,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.DocumentReference<R> withConverter<R>({
required _i6.FromFirestore<R>? fromFirestore,
required _i6.ToFirestore<R>? toFirestore,
}) =>
(super.noSuchMethod(
Invocation.method(
#withConverter,
[],
{
#fromFirestore: fromFirestore,
#toFirestore: toFirestore,
},
),
returnValue: _FakeDocumentReference_14<R>(
this,
Invocation.method(
#withConverter,
[],
{
#fromFirestore: fromFirestore,
#toFirestore: toFirestore,
},
),
),
) as _i6.DocumentReference<R>);
}
/// A class which mocks [QuerySnapshot].
///
/// See the documentation for Mockito's code generation for more information.
class MockQuerySnapshot<T extends Object?> extends _i1.Mock
implements _i6.QuerySnapshot<T> {
MockQuerySnapshot() {
_i1.throwOnMissingStub(this);
}
@override
List<_i6.QueryDocumentSnapshot<T>> get docs => (super.noSuchMethod(
Invocation.getter(#docs),
returnValue: <_i6.QueryDocumentSnapshot<T>>[],
) as List<_i6.QueryDocumentSnapshot<T>>);
@override
List<_i6.DocumentChange<T>> get docChanges => (super.noSuchMethod(
Invocation.getter(#docChanges),
returnValue: <_i6.DocumentChange<T>>[],
) as List<_i6.DocumentChange<T>>);
@override
_i6.SnapshotMetadata get metadata => (super.noSuchMethod(
Invocation.getter(#metadata),
returnValue: _FakeSnapshotMetadata_19(
this,
Invocation.getter(#metadata),
),
) as _i6.SnapshotMetadata);
@override
int get size => (super.noSuchMethod(
Invocation.getter(#size),
returnValue: 0,
) as int);
}
/// A class which mocks [QueryDocumentSnapshot].
///
/// See the documentation for Mockito's code generation for more information.
class MockQueryDocumentSnapshot<T extends Object?> extends _i1.Mock
implements _i6.QueryDocumentSnapshot<T> {
MockQueryDocumentSnapshot() {
_i1.throwOnMissingStub(this);
}
@override
String get id => (super.noSuchMethod(
Invocation.getter(#id),
returnValue: _i8.dummyValue<String>(
this,
Invocation.getter(#id),
),
) as String);
@override
_i6.DocumentReference<T> get reference => (super.noSuchMethod(
Invocation.getter(#reference),
returnValue: _FakeDocumentReference_14<T>(
this,
Invocation.getter(#reference),
),
) as _i6.DocumentReference<T>);
@override
_i6.SnapshotMetadata get metadata => (super.noSuchMethod(
Invocation.getter(#metadata),
returnValue: _FakeSnapshotMetadata_19(
this,
Invocation.getter(#metadata),
),
) as _i6.SnapshotMetadata);
@override
bool get exists => (super.noSuchMethod(
Invocation.getter(#exists),
returnValue: false,
) as bool);
@override
T data() => (super.noSuchMethod(
Invocation.method(
#data,
[],
),
returnValue: _i8.dummyValue<T>(
this,
Invocation.method(
#data,
[],
),
),
) as T);
@override
dynamic get(Object? field) => super.noSuchMethod(Invocation.method(
#get,
[field],
));
@override
dynamic operator [](Object? field) => super.noSuchMethod(Invocation.method(
#[],
[field],
));
}
/// A class which mocks [GeocodingService].
///
/// See the documentation for Mockito's code generation for more information.
class MockGeocodingService extends _i1.Mock implements _i10.GeocodingService {
MockGeocodingService() {
_i1.throwOnMissingStub(this);
}
}
import 'package:mockito/annotations.dart';
import 'package:graph_go/services/google_api_service.dart';
@GenerateMocks([GoogleApiService])
void main() {}
// Mocks generated by Mockito 5.4.6 from annotations
// in graph_go/test/providers/google_api_service_test.dart.
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i4;
import 'package:graph_go/services/google_api_service.dart' as _i2;
import 'package:mockito/mockito.dart' as _i1;
import 'package:mockito/src/dummies.dart' as _i3;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
// ignore_for_file: avoid_setters_without_getters
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: implementation_imports
// ignore_for_file: invalid_use_of_visible_for_testing_member
// ignore_for_file: must_be_immutable
// ignore_for_file: prefer_const_constructors
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
// ignore_for_file: invalid_use_of_internal_member
/// A class which mocks [GoogleApiService].
///
/// See the documentation for Mockito's code generation for more information.
class MockGoogleApiService extends _i1.Mock implements _i2.GoogleApiService {
MockGoogleApiService() {
_i1.throwOnMissingStub(this);
}
@override
String get key => (super.noSuchMethod(
Invocation.getter(#key),
returnValue: _i3.dummyValue<String>(
this,
Invocation.getter(#key),
),
) as String);
@override
_i4.Future<_i2.LatLng?> geocodeAddress(String? address) =>
(super.noSuchMethod(
Invocation.method(
#geocodeAddress,
[address],
),
returnValue: _i4.Future<_i2.LatLng?>.value(),
) as _i4.Future<_i2.LatLng?>);
@override
_i4.Future<Map<String, _i2.LatLng?>> geocodeAddresses(
List<String>? addresses) =>
(super.noSuchMethod(
Invocation.method(
#geocodeAddresses,
[addresses],
),
returnValue:
_i4.Future<Map<String, _i2.LatLng?>>.value(<String, _i2.LatLng?>{}),
) as _i4.Future<Map<String, _i2.LatLng?>>);
@override
_i4.Future<List<List<int>>> getDistanceMatrix(
List<_i2.LatLng>? origins, {
String? travelMode = 'driving',
}) =>
(super.noSuchMethod(
Invocation.method(
#getDistanceMatrix,
[origins],
{#travelMode: travelMode},
),
returnValue: _i4.Future<List<List<int>>>.value(<List<int>>[]),
) as _i4.Future<List<List<int>>>);
}
import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/mockito.dart';
import 'package:graph_go/providers/graph_provider.dart';
import 'package:graph_go/models/delivery_address.dart';
import 'google_api_service_test.mocks.dart'; // import the generated mock
import 'package:graph_go/services/google_api_service.dart';
void main() {
late GraphProvider graphProvider;
late MockGoogleApiService mockApi;
setUp(() {
mockApi = MockGoogleApiService();
// Make sure GraphProvider accepts GoogleApiService via constructor
graphProvider = GraphProvider(apiService: mockApi);
});
test('buildGraphFromAddresses populates graph correctly', () async {
// Step 1: Create test addresses
final testAddresses = [
DeliveryAddress(
streetAddress: '1600 Amphitheatre Parkway',
city: 'Mountain View',
state: 'CA',
zipCode: '94043',
),
DeliveryAddress(
streetAddress: '1 Infinite Loop',
city: 'Cupertino',
state: 'CA',
zipCode: '95014',
),
DeliveryAddress(
streetAddress: '500 Terry A Francois Blvd',
city: 'San Francisco',
state: 'CA',
zipCode: '94158',
),
];
// Step 2: Mock GoogleApiService responses
when(mockApi.geocodeAddresses(any)).thenAnswer((_) async => {
testAddresses[0].fullAddress: LatLng(37.422, -122.084),
testAddresses[1].fullAddress: LatLng(37.331, -122.030),
testAddresses[2].fullAddress: LatLng(37.770, -122.387),
});
when(mockApi.getDistanceMatrix(any)).thenAnswer((_) async => [
[0, 1000, 2000],
[1000, 0, 1500],
[2000, 1500, 0],
]);
// Step 3: Run the method under test
await graphProvider.buildGraphFromAddresses(testAddresses);
// Step 4: Verify coordinates were populated
for (var addr in testAddresses) {
expect(addr.hasCoordinates, true);
}
// Step 5: Verify distance matrix
expect(graphProvider.matrix!.length, 3);
expect(graphProvider.matrix![0][1], 1000);
// Step 6: Verify digraph adjacency
expect(graphProvider.graph!.adj[0].length, 2); // edges to node 1 & 2
// Step 7: Test shortest path computation
final result = graphProvider.shortestRoute(0, 2);
expect(result['path'], isNotEmpty);
expect(result['distanceSeconds'], 2000);
});
}
......@@ -6,6 +6,8 @@ import 'package:mockito/mockito.dart';
import 'package:mockito/annotations.dart';
import 'package:graph_go/screens/home_screen.dart';
import 'package:graph_go/providers/delivery_provider.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
// Generate mocks
@GenerateMocks([FirebaseAuth, User, DeliveryProvider])
......
// Mocks generated by Mockito 5.4.6 from annotations
// in graph_go/test/screens/home_screen_maps_test.dart.
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i6;
import 'dart:ui' as _i10;
import 'package:firebase_auth/firebase_auth.dart' as _i4;
import 'package:firebase_auth_platform_interface/firebase_auth_platform_interface.dart'
as _i3;
import 'package:firebase_core/firebase_core.dart' as _i2;
import 'package:graph_go/models/delivery_address.dart' as _i9;
import 'package:graph_go/models/route_optimization.dart' as _i5;
import 'package:graph_go/providers/delivery_provider.dart' as _i8;
import 'package:mockito/mockito.dart' as _i1;
import 'package:mockito/src/dummies.dart' as _i7;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
// ignore_for_file: avoid_setters_without_getters
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: implementation_imports
// ignore_for_file: invalid_use_of_visible_for_testing_member
// ignore_for_file: must_be_immutable
// ignore_for_file: prefer_const_constructors
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
// ignore_for_file: invalid_use_of_internal_member
class _FakeFirebaseApp_0 extends _i1.SmartFake implements _i2.FirebaseApp {
_FakeFirebaseApp_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeActionCodeInfo_1 extends _i1.SmartFake
implements _i3.ActionCodeInfo {
_FakeActionCodeInfo_1(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUserCredential_2 extends _i1.SmartFake
implements _i4.UserCredential {
_FakeUserCredential_2(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeConfirmationResult_3 extends _i1.SmartFake
implements _i4.ConfirmationResult {
_FakeConfirmationResult_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUserMetadata_4 extends _i1.SmartFake implements _i3.UserMetadata {
_FakeUserMetadata_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeMultiFactor_5 extends _i1.SmartFake implements _i4.MultiFactor {
_FakeMultiFactor_5(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeIdTokenResult_6 extends _i1.SmartFake implements _i3.IdTokenResult {
_FakeIdTokenResult_6(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUser_7 extends _i1.SmartFake implements _i4.User {
_FakeUser_7(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeRouteOptimization_8 extends _i1.SmartFake
implements _i5.RouteOptimization {
_FakeRouteOptimization_8(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [FirebaseAuth].
///
/// See the documentation for Mockito's code generation for more information.
class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth {
MockFirebaseAuth() {
_i1.throwOnMissingStub(this);
}
@override
_i2.FirebaseApp get app => (super.noSuchMethod(
Invocation.getter(#app),
returnValue: _FakeFirebaseApp_0(
this,
Invocation.getter(#app),
),
) as _i2.FirebaseApp);
@override
set app(_i2.FirebaseApp? value) => super.noSuchMethod(
Invocation.setter(
#app,
value,
),
returnValueForMissingStub: null,
);
@override
set tenantId(String? tenantId) => super.noSuchMethod(
Invocation.setter(
#tenantId,
tenantId,
),
returnValueForMissingStub: null,
);
@override
Map<dynamic, dynamic> get pluginConstants => (super.noSuchMethod(
Invocation.getter(#pluginConstants),
returnValue: <dynamic, dynamic>{},
) as Map<dynamic, dynamic>);
@override
_i6.Future<void> useEmulator(String? origin) => (super.noSuchMethod(
Invocation.method(
#useEmulator,
[origin],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> useAuthEmulator(
String? host,
int? port, {
bool? automaticHostMapping = true,
}) =>
(super.noSuchMethod(
Invocation.method(
#useAuthEmulator,
[
host,
port,
],
{#automaticHostMapping: automaticHostMapping},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> applyActionCode(String? code) => (super.noSuchMethod(
Invocation.method(
#applyActionCode,
[code],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<_i3.ActionCodeInfo> checkActionCode(String? code) =>
(super.noSuchMethod(
Invocation.method(
#checkActionCode,
[code],
),
returnValue: _i6.Future<_i3.ActionCodeInfo>.value(_FakeActionCodeInfo_1(
this,
Invocation.method(
#checkActionCode,
[code],
),
)),
) as _i6.Future<_i3.ActionCodeInfo>);
@override
_i6.Future<void> confirmPasswordReset({
required String? code,
required String? newPassword,
}) =>
(super.noSuchMethod(
Invocation.method(
#confirmPasswordReset,
[],
{
#code: code,
#newPassword: newPassword,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<_i4.UserCredential> createUserWithEmailAndPassword({
required String? email,
required String? password,
}) =>
(super.noSuchMethod(
Invocation.method(
#createUserWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#createUserWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
_i6.Future<List<String>> fetchSignInMethodsForEmail(String? email) =>
(super.noSuchMethod(
Invocation.method(
#fetchSignInMethodsForEmail,
[email],
),
returnValue: _i6.Future<List<String>>.value(<String>[]),
) as _i6.Future<List<String>>);
@override
_i6.Future<_i4.UserCredential> getRedirectResult() => (super.noSuchMethod(
Invocation.method(
#getRedirectResult,
[],
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#getRedirectResult,
[],
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
bool isSignInWithEmailLink(String? emailLink) => (super.noSuchMethod(
Invocation.method(
#isSignInWithEmailLink,
[emailLink],
),
returnValue: false,
) as bool);
@override
_i6.Stream<_i4.User?> authStateChanges() => (super.noSuchMethod(
Invocation.method(
#authStateChanges,
[],
),
returnValue: _i6.Stream<_i4.User?>.empty(),
) as _i6.Stream<_i4.User?>);
@override
_i6.Stream<_i4.User?> idTokenChanges() => (super.noSuchMethod(
Invocation.method(
#idTokenChanges,
[],
),
returnValue: _i6.Stream<_i4.User?>.empty(),
) as _i6.Stream<_i4.User?>);
@override
_i6.Stream<_i4.User?> userChanges() => (super.noSuchMethod(
Invocation.method(
#userChanges,
[],
),
returnValue: _i6.Stream<_i4.User?>.empty(),
) as _i6.Stream<_i4.User?>);
@override
_i6.Future<void> sendPasswordResetEmail({
required String? email,
_i3.ActionCodeSettings? actionCodeSettings,
}) =>
(super.noSuchMethod(
Invocation.method(
#sendPasswordResetEmail,
[],
{
#email: email,
#actionCodeSettings: actionCodeSettings,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> sendSignInLinkToEmail({
required String? email,
required _i3.ActionCodeSettings? actionCodeSettings,
}) =>
(super.noSuchMethod(
Invocation.method(
#sendSignInLinkToEmail,
[],
{
#email: email,
#actionCodeSettings: actionCodeSettings,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> setLanguageCode(String? languageCode) => (super.noSuchMethod(
Invocation.method(
#setLanguageCode,
[languageCode],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> setSettings({
bool? appVerificationDisabledForTesting = false,
String? userAccessGroup,
String? phoneNumber,
String? smsCode,
bool? forceRecaptchaFlow,
}) =>
(super.noSuchMethod(
Invocation.method(
#setSettings,
[],
{
#appVerificationDisabledForTesting:
appVerificationDisabledForTesting,
#userAccessGroup: userAccessGroup,
#phoneNumber: phoneNumber,
#smsCode: smsCode,
#forceRecaptchaFlow: forceRecaptchaFlow,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> setPersistence(_i3.Persistence? persistence) =>
(super.noSuchMethod(
Invocation.method(
#setPersistence,
[persistence],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<_i4.UserCredential> signInAnonymously() => (super.noSuchMethod(
Invocation.method(
#signInAnonymously,
[],
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInAnonymously,
[],
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
_i6.Future<_i4.UserCredential> signInWithCredential(
_i3.AuthCredential? credential) =>
(super.noSuchMethod(
Invocation.method(
#signInWithCredential,
[credential],
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithCredential,
[credential],
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
_i6.Future<_i4.UserCredential> signInWithCustomToken(String? token) =>
(super.noSuchMethod(
Invocation.method(
#signInWithCustomToken,
[token],
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithCustomToken,
[token],
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
_i6.Future<_i4.UserCredential> signInWithEmailAndPassword({
required String? email,
required String? password,
}) =>
(super.noSuchMethod(
Invocation.method(
#signInWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
_i6.Future<_i4.UserCredential> signInWithEmailLink({
required String? email,
required String? emailLink,
}) =>
(super.noSuchMethod(
Invocation.method(
#signInWithEmailLink,
[],
{
#email: email,
#emailLink: emailLink,
},
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithEmailLink,
[],
{
#email: email,
#emailLink: emailLink,
},
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
_i6.Future<_i4.UserCredential> signInWithAuthProvider(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithAuthProvider,
[provider],
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithAuthProvider,
[provider],
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
_i6.Future<_i4.UserCredential> signInWithProvider(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithProvider,
[provider],
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithProvider,
[provider],
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
_i6.Future<_i4.ConfirmationResult> signInWithPhoneNumber(
String? phoneNumber, [
_i4.RecaptchaVerifier? verifier,
]) =>
(super.noSuchMethod(
Invocation.method(
#signInWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
returnValue:
_i6.Future<_i4.ConfirmationResult>.value(_FakeConfirmationResult_3(
this,
Invocation.method(
#signInWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
)),
) as _i6.Future<_i4.ConfirmationResult>);
@override
_i6.Future<_i4.UserCredential> signInWithPopup(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithPopup,
[provider],
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithPopup,
[provider],
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
_i6.Future<void> signInWithRedirect(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithRedirect,
[provider],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> signOut() => (super.noSuchMethod(
Invocation.method(
#signOut,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<String> verifyPasswordResetCode(String? code) =>
(super.noSuchMethod(
Invocation.method(
#verifyPasswordResetCode,
[code],
),
returnValue: _i6.Future<String>.value(_i7.dummyValue<String>(
this,
Invocation.method(
#verifyPasswordResetCode,
[code],
),
)),
) as _i6.Future<String>);
@override
_i6.Future<void> verifyPhoneNumber({
String? phoneNumber,
_i3.PhoneMultiFactorInfo? multiFactorInfo,
required _i3.PhoneVerificationCompleted? verificationCompleted,
required _i3.PhoneVerificationFailed? verificationFailed,
required _i3.PhoneCodeSent? codeSent,
required _i3.PhoneCodeAutoRetrievalTimeout? codeAutoRetrievalTimeout,
String? autoRetrievedSmsCodeForTesting,
Duration? timeout = const Duration(seconds: 30),
int? forceResendingToken,
_i3.MultiFactorSession? multiFactorSession,
}) =>
(super.noSuchMethod(
Invocation.method(
#verifyPhoneNumber,
[],
{
#phoneNumber: phoneNumber,
#multiFactorInfo: multiFactorInfo,
#verificationCompleted: verificationCompleted,
#verificationFailed: verificationFailed,
#codeSent: codeSent,
#codeAutoRetrievalTimeout: codeAutoRetrievalTimeout,
#autoRetrievedSmsCodeForTesting: autoRetrievedSmsCodeForTesting,
#timeout: timeout,
#forceResendingToken: forceResendingToken,
#multiFactorSession: multiFactorSession,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> revokeTokenWithAuthorizationCode(
String? authorizationCode) =>
(super.noSuchMethod(
Invocation.method(
#revokeTokenWithAuthorizationCode,
[authorizationCode],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
}
/// A class which mocks [User].
///
/// See the documentation for Mockito's code generation for more information.
class MockUser extends _i1.Mock implements _i4.User {
MockUser() {
_i1.throwOnMissingStub(this);
}
@override
bool get emailVerified => (super.noSuchMethod(
Invocation.getter(#emailVerified),
returnValue: false,
) as bool);
@override
bool get isAnonymous => (super.noSuchMethod(
Invocation.getter(#isAnonymous),
returnValue: false,
) as bool);
@override
_i3.UserMetadata get metadata => (super.noSuchMethod(
Invocation.getter(#metadata),
returnValue: _FakeUserMetadata_4(
this,
Invocation.getter(#metadata),
),
) as _i3.UserMetadata);
@override
List<_i3.UserInfo> get providerData => (super.noSuchMethod(
Invocation.getter(#providerData),
returnValue: <_i3.UserInfo>[],
) as List<_i3.UserInfo>);
@override
String get uid => (super.noSuchMethod(
Invocation.getter(#uid),
returnValue: _i7.dummyValue<String>(
this,
Invocation.getter(#uid),
),
) as String);
@override
_i4.MultiFactor get multiFactor => (super.noSuchMethod(
Invocation.getter(#multiFactor),
returnValue: _FakeMultiFactor_5(
this,
Invocation.getter(#multiFactor),
),
) as _i4.MultiFactor);
@override
_i6.Future<void> delete() => (super.noSuchMethod(
Invocation.method(
#delete,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<String?> getIdToken([bool? forceRefresh = false]) =>
(super.noSuchMethod(
Invocation.method(
#getIdToken,
[forceRefresh],
),
returnValue: _i6.Future<String?>.value(),
) as _i6.Future<String?>);
@override
_i6.Future<_i3.IdTokenResult> getIdTokenResult(
[bool? forceRefresh = false]) =>
(super.noSuchMethod(
Invocation.method(
#getIdTokenResult,
[forceRefresh],
),
returnValue: _i6.Future<_i3.IdTokenResult>.value(_FakeIdTokenResult_6(
this,
Invocation.method(
#getIdTokenResult,
[forceRefresh],
),
)),
) as _i6.Future<_i3.IdTokenResult>);
@override
_i6.Future<_i4.UserCredential> linkWithCredential(
_i3.AuthCredential? credential) =>
(super.noSuchMethod(
Invocation.method(
#linkWithCredential,
[credential],
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#linkWithCredential,
[credential],
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
_i6.Future<_i4.UserCredential> linkWithProvider(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#linkWithProvider,
[provider],
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#linkWithProvider,
[provider],
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
_i6.Future<_i4.UserCredential> reauthenticateWithProvider(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithProvider,
[provider],
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#reauthenticateWithProvider,
[provider],
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
_i6.Future<_i4.UserCredential> reauthenticateWithPopup(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithPopup,
[provider],
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#reauthenticateWithPopup,
[provider],
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
_i6.Future<void> reauthenticateWithRedirect(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithRedirect,
[provider],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<_i4.UserCredential> linkWithPopup(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#linkWithPopup,
[provider],
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#linkWithPopup,
[provider],
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
_i6.Future<void> linkWithRedirect(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#linkWithRedirect,
[provider],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<_i4.ConfirmationResult> linkWithPhoneNumber(
String? phoneNumber, [
_i4.RecaptchaVerifier? verifier,
]) =>
(super.noSuchMethod(
Invocation.method(
#linkWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
returnValue:
_i6.Future<_i4.ConfirmationResult>.value(_FakeConfirmationResult_3(
this,
Invocation.method(
#linkWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
)),
) as _i6.Future<_i4.ConfirmationResult>);
@override
_i6.Future<_i4.UserCredential> reauthenticateWithCredential(
_i3.AuthCredential? credential) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithCredential,
[credential],
),
returnValue: _i6.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#reauthenticateWithCredential,
[credential],
),
)),
) as _i6.Future<_i4.UserCredential>);
@override
_i6.Future<void> reload() => (super.noSuchMethod(
Invocation.method(
#reload,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> sendEmailVerification(
[_i3.ActionCodeSettings? actionCodeSettings]) =>
(super.noSuchMethod(
Invocation.method(
#sendEmailVerification,
[actionCodeSettings],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<_i4.User> unlink(String? providerId) => (super.noSuchMethod(
Invocation.method(
#unlink,
[providerId],
),
returnValue: _i6.Future<_i4.User>.value(_FakeUser_7(
this,
Invocation.method(
#unlink,
[providerId],
),
)),
) as _i6.Future<_i4.User>);
@override
_i6.Future<void> updateEmail(String? newEmail) => (super.noSuchMethod(
Invocation.method(
#updateEmail,
[newEmail],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> updatePassword(String? newPassword) => (super.noSuchMethod(
Invocation.method(
#updatePassword,
[newPassword],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> updatePhoneNumber(
_i3.PhoneAuthCredential? phoneCredential) =>
(super.noSuchMethod(
Invocation.method(
#updatePhoneNumber,
[phoneCredential],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> updateDisplayName(String? displayName) =>
(super.noSuchMethod(
Invocation.method(
#updateDisplayName,
[displayName],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> updatePhotoURL(String? photoURL) => (super.noSuchMethod(
Invocation.method(
#updatePhotoURL,
[photoURL],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> updateProfile({
String? displayName,
String? photoURL,
}) =>
(super.noSuchMethod(
Invocation.method(
#updateProfile,
[],
{
#displayName: displayName,
#photoURL: photoURL,
},
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> verifyBeforeUpdateEmail(
String? newEmail, [
_i3.ActionCodeSettings? actionCodeSettings,
]) =>
(super.noSuchMethod(
Invocation.method(
#verifyBeforeUpdateEmail,
[
newEmail,
actionCodeSettings,
],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
}
/// A class which mocks [DeliveryProvider].
///
/// See the documentation for Mockito's code generation for more information.
class MockDeliveryProvider extends _i1.Mock implements _i8.DeliveryProvider {
MockDeliveryProvider() {
_i1.throwOnMissingStub(this);
}
@override
List<_i9.DeliveryAddress> get addresses => (super.noSuchMethod(
Invocation.getter(#addresses),
returnValue: <_i9.DeliveryAddress>[],
) as List<_i9.DeliveryAddress>);
@override
List<_i5.RouteOptimization> get routeOptimizations => (super.noSuchMethod(
Invocation.getter(#routeOptimizations),
returnValue: <_i5.RouteOptimization>[],
) as List<_i5.RouteOptimization>);
@override
bool get isLoading => (super.noSuchMethod(
Invocation.getter(#isLoading),
returnValue: false,
) as bool);
@override
bool get hasAddresses => (super.noSuchMethod(
Invocation.getter(#hasAddresses),
returnValue: false,
) as bool);
@override
int get addressCount => (super.noSuchMethod(
Invocation.getter(#addressCount),
returnValue: 0,
) as int);
@override
bool get canAddMoreAddresses => (super.noSuchMethod(
Invocation.getter(#canAddMoreAddresses),
returnValue: false,
) as bool);
@override
bool get hasListeners => (super.noSuchMethod(
Invocation.getter(#hasListeners),
returnValue: false,
) as bool);
@override
_i6.Future<void> initialize() => (super.noSuchMethod(
Invocation.method(
#initialize,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> addAddress(_i9.DeliveryAddress? address) =>
(super.noSuchMethod(
Invocation.method(
#addAddress,
[address],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> updateAddress(_i9.DeliveryAddress? address) =>
(super.noSuchMethod(
Invocation.method(
#updateAddress,
[address],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> removeAddress(String? addressId) => (super.noSuchMethod(
Invocation.method(
#removeAddress,
[addressId],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<void> geocodeAllAddresses() => (super.noSuchMethod(
Invocation.method(
#geocodeAllAddresses,
[],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
_i6.Future<_i5.RouteOptimization> optimizeRoute({
required String? name,
required _i5.RouteAlgorithm? algorithm,
_i9.DeliveryAddress? startAddress,
}) =>
(super.noSuchMethod(
Invocation.method(
#optimizeRoute,
[],
{
#name: name,
#algorithm: algorithm,
#startAddress: startAddress,
},
),
returnValue:
_i6.Future<_i5.RouteOptimization>.value(_FakeRouteOptimization_8(
this,
Invocation.method(
#optimizeRoute,
[],
{
#name: name,
#algorithm: algorithm,
#startAddress: startAddress,
},
),
)),
) as _i6.Future<_i5.RouteOptimization>);
@override
_i6.Future<void> deleteRouteOptimization(String? routeId) =>
(super.noSuchMethod(
Invocation.method(
#deleteRouteOptimization,
[routeId],
),
returnValue: _i6.Future<void>.value(),
returnValueForMissingStub: _i6.Future<void>.value(),
) as _i6.Future<void>);
@override
void addListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#addListener,
[listener],
),
returnValueForMissingStub: null,
);
@override
void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod(
Invocation.method(
#removeListener,
[listener],
),
returnValueForMissingStub: null,
);
@override
void dispose() => super.noSuchMethod(
Invocation.method(
#dispose,
[],
),
returnValueForMissingStub: null,
);
@override
void notifyListeners() => super.noSuchMethod(
Invocation.method(
#notifyListeners,
[],
),
returnValueForMissingStub: null,
);
}
......@@ -8,6 +8,8 @@ import 'package:mockito/annotations.dart';
import 'package:graph_go/main.dart';
import 'package:graph_go/screens/home_screen.dart';
import 'package:graph_go/providers/delivery_provider.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'home_screen_test.mocks.dart';
......
// Mocks generated by Mockito 5.4.6 from annotations
// in graph_go/test/screens/home_screen_test.dart.
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i5;
import 'package:firebase_auth/firebase_auth.dart' as _i4;
import 'package:firebase_auth_platform_interface/firebase_auth_platform_interface.dart'
as _i3;
import 'package:firebase_core/firebase_core.dart' as _i2;
import 'package:mockito/mockito.dart' as _i1;
import 'package:mockito/src/dummies.dart' as _i6;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
// ignore_for_file: avoid_setters_without_getters
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: implementation_imports
// ignore_for_file: invalid_use_of_visible_for_testing_member
// ignore_for_file: must_be_immutable
// ignore_for_file: prefer_const_constructors
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
// ignore_for_file: invalid_use_of_internal_member
class _FakeFirebaseApp_0 extends _i1.SmartFake implements _i2.FirebaseApp {
_FakeFirebaseApp_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeActionCodeInfo_1 extends _i1.SmartFake
implements _i3.ActionCodeInfo {
_FakeActionCodeInfo_1(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUserCredential_2 extends _i1.SmartFake
implements _i4.UserCredential {
_FakeUserCredential_2(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeConfirmationResult_3 extends _i1.SmartFake
implements _i4.ConfirmationResult {
_FakeConfirmationResult_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUserMetadata_4 extends _i1.SmartFake implements _i3.UserMetadata {
_FakeUserMetadata_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeMultiFactor_5 extends _i1.SmartFake implements _i4.MultiFactor {
_FakeMultiFactor_5(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeIdTokenResult_6 extends _i1.SmartFake implements _i3.IdTokenResult {
_FakeIdTokenResult_6(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUser_7 extends _i1.SmartFake implements _i4.User {
_FakeUser_7(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [FirebaseAuth].
///
/// See the documentation for Mockito's code generation for more information.
class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth {
MockFirebaseAuth() {
_i1.throwOnMissingStub(this);
}
@override
_i2.FirebaseApp get app => (super.noSuchMethod(
Invocation.getter(#app),
returnValue: _FakeFirebaseApp_0(
this,
Invocation.getter(#app),
),
) as _i2.FirebaseApp);
@override
set app(_i2.FirebaseApp? value) => super.noSuchMethod(
Invocation.setter(
#app,
value,
),
returnValueForMissingStub: null,
);
@override
set tenantId(String? tenantId) => super.noSuchMethod(
Invocation.setter(
#tenantId,
tenantId,
),
returnValueForMissingStub: null,
);
@override
Map<dynamic, dynamic> get pluginConstants => (super.noSuchMethod(
Invocation.getter(#pluginConstants),
returnValue: <dynamic, dynamic>{},
) as Map<dynamic, dynamic>);
@override
_i5.Future<void> useEmulator(String? origin) => (super.noSuchMethod(
Invocation.method(
#useEmulator,
[origin],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> useAuthEmulator(
String? host,
int? port, {
bool? automaticHostMapping = true,
}) =>
(super.noSuchMethod(
Invocation.method(
#useAuthEmulator,
[
host,
port,
],
{#automaticHostMapping: automaticHostMapping},
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> applyActionCode(String? code) => (super.noSuchMethod(
Invocation.method(
#applyActionCode,
[code],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<_i3.ActionCodeInfo> checkActionCode(String? code) =>
(super.noSuchMethod(
Invocation.method(
#checkActionCode,
[code],
),
returnValue: _i5.Future<_i3.ActionCodeInfo>.value(_FakeActionCodeInfo_1(
this,
Invocation.method(
#checkActionCode,
[code],
),
)),
) as _i5.Future<_i3.ActionCodeInfo>);
@override
_i5.Future<void> confirmPasswordReset({
required String? code,
required String? newPassword,
}) =>
(super.noSuchMethod(
Invocation.method(
#confirmPasswordReset,
[],
{
#code: code,
#newPassword: newPassword,
},
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<_i4.UserCredential> createUserWithEmailAndPassword({
required String? email,
required String? password,
}) =>
(super.noSuchMethod(
Invocation.method(
#createUserWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#createUserWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<List<String>> fetchSignInMethodsForEmail(String? email) =>
(super.noSuchMethod(
Invocation.method(
#fetchSignInMethodsForEmail,
[email],
),
returnValue: _i5.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<String>>);
@override
_i5.Future<_i4.UserCredential> getRedirectResult() => (super.noSuchMethod(
Invocation.method(
#getRedirectResult,
[],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#getRedirectResult,
[],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
bool isSignInWithEmailLink(String? emailLink) => (super.noSuchMethod(
Invocation.method(
#isSignInWithEmailLink,
[emailLink],
),
returnValue: false,
) as bool);
@override
_i5.Stream<_i4.User?> authStateChanges() => (super.noSuchMethod(
Invocation.method(
#authStateChanges,
[],
),
returnValue: _i5.Stream<_i4.User?>.empty(),
) as _i5.Stream<_i4.User?>);
@override
_i5.Stream<_i4.User?> idTokenChanges() => (super.noSuchMethod(
Invocation.method(
#idTokenChanges,
[],
),
returnValue: _i5.Stream<_i4.User?>.empty(),
) as _i5.Stream<_i4.User?>);
@override
_i5.Stream<_i4.User?> userChanges() => (super.noSuchMethod(
Invocation.method(
#userChanges,
[],
),
returnValue: _i5.Stream<_i4.User?>.empty(),
) as _i5.Stream<_i4.User?>);
@override
_i5.Future<void> sendPasswordResetEmail({
required String? email,
_i3.ActionCodeSettings? actionCodeSettings,
}) =>
(super.noSuchMethod(
Invocation.method(
#sendPasswordResetEmail,
[],
{
#email: email,
#actionCodeSettings: actionCodeSettings,
},
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> sendSignInLinkToEmail({
required String? email,
required _i3.ActionCodeSettings? actionCodeSettings,
}) =>
(super.noSuchMethod(
Invocation.method(
#sendSignInLinkToEmail,
[],
{
#email: email,
#actionCodeSettings: actionCodeSettings,
},
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> setLanguageCode(String? languageCode) => (super.noSuchMethod(
Invocation.method(
#setLanguageCode,
[languageCode],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> setSettings({
bool? appVerificationDisabledForTesting = false,
String? userAccessGroup,
String? phoneNumber,
String? smsCode,
bool? forceRecaptchaFlow,
}) =>
(super.noSuchMethod(
Invocation.method(
#setSettings,
[],
{
#appVerificationDisabledForTesting:
appVerificationDisabledForTesting,
#userAccessGroup: userAccessGroup,
#phoneNumber: phoneNumber,
#smsCode: smsCode,
#forceRecaptchaFlow: forceRecaptchaFlow,
},
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> setPersistence(_i3.Persistence? persistence) =>
(super.noSuchMethod(
Invocation.method(
#setPersistence,
[persistence],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<_i4.UserCredential> signInAnonymously() => (super.noSuchMethod(
Invocation.method(
#signInAnonymously,
[],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInAnonymously,
[],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> signInWithCredential(
_i3.AuthCredential? credential) =>
(super.noSuchMethod(
Invocation.method(
#signInWithCredential,
[credential],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithCredential,
[credential],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> signInWithCustomToken(String? token) =>
(super.noSuchMethod(
Invocation.method(
#signInWithCustomToken,
[token],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithCustomToken,
[token],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> signInWithEmailAndPassword({
required String? email,
required String? password,
}) =>
(super.noSuchMethod(
Invocation.method(
#signInWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> signInWithEmailLink({
required String? email,
required String? emailLink,
}) =>
(super.noSuchMethod(
Invocation.method(
#signInWithEmailLink,
[],
{
#email: email,
#emailLink: emailLink,
},
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithEmailLink,
[],
{
#email: email,
#emailLink: emailLink,
},
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> signInWithAuthProvider(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithAuthProvider,
[provider],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithAuthProvider,
[provider],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> signInWithProvider(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithProvider,
[provider],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithProvider,
[provider],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.ConfirmationResult> signInWithPhoneNumber(
String? phoneNumber, [
_i4.RecaptchaVerifier? verifier,
]) =>
(super.noSuchMethod(
Invocation.method(
#signInWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
returnValue:
_i5.Future<_i4.ConfirmationResult>.value(_FakeConfirmationResult_3(
this,
Invocation.method(
#signInWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
)),
) as _i5.Future<_i4.ConfirmationResult>);
@override
_i5.Future<_i4.UserCredential> signInWithPopup(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithPopup,
[provider],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithPopup,
[provider],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<void> signInWithRedirect(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithRedirect,
[provider],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> signOut() => (super.noSuchMethod(
Invocation.method(
#signOut,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<String> verifyPasswordResetCode(String? code) =>
(super.noSuchMethod(
Invocation.method(
#verifyPasswordResetCode,
[code],
),
returnValue: _i5.Future<String>.value(_i6.dummyValue<String>(
this,
Invocation.method(
#verifyPasswordResetCode,
[code],
),
)),
) as _i5.Future<String>);
@override
_i5.Future<void> verifyPhoneNumber({
String? phoneNumber,
_i3.PhoneMultiFactorInfo? multiFactorInfo,
required _i3.PhoneVerificationCompleted? verificationCompleted,
required _i3.PhoneVerificationFailed? verificationFailed,
required _i3.PhoneCodeSent? codeSent,
required _i3.PhoneCodeAutoRetrievalTimeout? codeAutoRetrievalTimeout,
String? autoRetrievedSmsCodeForTesting,
Duration? timeout = const Duration(seconds: 30),
int? forceResendingToken,
_i3.MultiFactorSession? multiFactorSession,
}) =>
(super.noSuchMethod(
Invocation.method(
#verifyPhoneNumber,
[],
{
#phoneNumber: phoneNumber,
#multiFactorInfo: multiFactorInfo,
#verificationCompleted: verificationCompleted,
#verificationFailed: verificationFailed,
#codeSent: codeSent,
#codeAutoRetrievalTimeout: codeAutoRetrievalTimeout,
#autoRetrievedSmsCodeForTesting: autoRetrievedSmsCodeForTesting,
#timeout: timeout,
#forceResendingToken: forceResendingToken,
#multiFactorSession: multiFactorSession,
},
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> revokeTokenWithAuthorizationCode(
String? authorizationCode) =>
(super.noSuchMethod(
Invocation.method(
#revokeTokenWithAuthorizationCode,
[authorizationCode],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
}
/// A class which mocks [User].
///
/// See the documentation for Mockito's code generation for more information.
class MockUser extends _i1.Mock implements _i4.User {
MockUser() {
_i1.throwOnMissingStub(this);
}
@override
bool get emailVerified => (super.noSuchMethod(
Invocation.getter(#emailVerified),
returnValue: false,
) as bool);
@override
bool get isAnonymous => (super.noSuchMethod(
Invocation.getter(#isAnonymous),
returnValue: false,
) as bool);
@override
_i3.UserMetadata get metadata => (super.noSuchMethod(
Invocation.getter(#metadata),
returnValue: _FakeUserMetadata_4(
this,
Invocation.getter(#metadata),
),
) as _i3.UserMetadata);
@override
List<_i3.UserInfo> get providerData => (super.noSuchMethod(
Invocation.getter(#providerData),
returnValue: <_i3.UserInfo>[],
) as List<_i3.UserInfo>);
@override
String get uid => (super.noSuchMethod(
Invocation.getter(#uid),
returnValue: _i6.dummyValue<String>(
this,
Invocation.getter(#uid),
),
) as String);
@override
_i4.MultiFactor get multiFactor => (super.noSuchMethod(
Invocation.getter(#multiFactor),
returnValue: _FakeMultiFactor_5(
this,
Invocation.getter(#multiFactor),
),
) as _i4.MultiFactor);
@override
_i5.Future<void> delete() => (super.noSuchMethod(
Invocation.method(
#delete,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<String?> getIdToken([bool? forceRefresh = false]) =>
(super.noSuchMethod(
Invocation.method(
#getIdToken,
[forceRefresh],
),
returnValue: _i5.Future<String?>.value(),
) as _i5.Future<String?>);
@override
_i5.Future<_i3.IdTokenResult> getIdTokenResult(
[bool? forceRefresh = false]) =>
(super.noSuchMethod(
Invocation.method(
#getIdTokenResult,
[forceRefresh],
),
returnValue: _i5.Future<_i3.IdTokenResult>.value(_FakeIdTokenResult_6(
this,
Invocation.method(
#getIdTokenResult,
[forceRefresh],
),
)),
) as _i5.Future<_i3.IdTokenResult>);
@override
_i5.Future<_i4.UserCredential> linkWithCredential(
_i3.AuthCredential? credential) =>
(super.noSuchMethod(
Invocation.method(
#linkWithCredential,
[credential],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#linkWithCredential,
[credential],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> linkWithProvider(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#linkWithProvider,
[provider],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#linkWithProvider,
[provider],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> reauthenticateWithProvider(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithProvider,
[provider],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#reauthenticateWithProvider,
[provider],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> reauthenticateWithPopup(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithPopup,
[provider],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#reauthenticateWithPopup,
[provider],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<void> reauthenticateWithRedirect(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithRedirect,
[provider],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<_i4.UserCredential> linkWithPopup(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#linkWithPopup,
[provider],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#linkWithPopup,
[provider],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<void> linkWithRedirect(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#linkWithRedirect,
[provider],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<_i4.ConfirmationResult> linkWithPhoneNumber(
String? phoneNumber, [
_i4.RecaptchaVerifier? verifier,
]) =>
(super.noSuchMethod(
Invocation.method(
#linkWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
returnValue:
_i5.Future<_i4.ConfirmationResult>.value(_FakeConfirmationResult_3(
this,
Invocation.method(
#linkWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
)),
) as _i5.Future<_i4.ConfirmationResult>);
@override
_i5.Future<_i4.UserCredential> reauthenticateWithCredential(
_i3.AuthCredential? credential) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithCredential,
[credential],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#reauthenticateWithCredential,
[credential],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<void> reload() => (super.noSuchMethod(
Invocation.method(
#reload,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> sendEmailVerification(
[_i3.ActionCodeSettings? actionCodeSettings]) =>
(super.noSuchMethod(
Invocation.method(
#sendEmailVerification,
[actionCodeSettings],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<_i4.User> unlink(String? providerId) => (super.noSuchMethod(
Invocation.method(
#unlink,
[providerId],
),
returnValue: _i5.Future<_i4.User>.value(_FakeUser_7(
this,
Invocation.method(
#unlink,
[providerId],
),
)),
) as _i5.Future<_i4.User>);
@override
_i5.Future<void> updateEmail(String? newEmail) => (super.noSuchMethod(
Invocation.method(
#updateEmail,
[newEmail],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> updatePassword(String? newPassword) => (super.noSuchMethod(
Invocation.method(
#updatePassword,
[newPassword],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> updatePhoneNumber(
_i3.PhoneAuthCredential? phoneCredential) =>
(super.noSuchMethod(
Invocation.method(
#updatePhoneNumber,
[phoneCredential],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> updateDisplayName(String? displayName) =>
(super.noSuchMethod(
Invocation.method(
#updateDisplayName,
[displayName],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> updatePhotoURL(String? photoURL) => (super.noSuchMethod(
Invocation.method(
#updatePhotoURL,
[photoURL],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> updateProfile({
String? displayName,
String? photoURL,
}) =>
(super.noSuchMethod(
Invocation.method(
#updateProfile,
[],
{
#displayName: displayName,
#photoURL: photoURL,
},
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> verifyBeforeUpdateEmail(
String? newEmail, [
_i3.ActionCodeSettings? actionCodeSettings,
]) =>
(super.noSuchMethod(
Invocation.method(
#verifyBeforeUpdateEmail,
[
newEmail,
actionCodeSettings,
],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
}
// Mocks generated by Mockito 5.4.6 from annotations
// in graph_go/test/screens/login_test.dart.
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i5;
import 'package:firebase_auth/firebase_auth.dart' as _i4;
import 'package:firebase_auth_platform_interface/firebase_auth_platform_interface.dart'
as _i3;
import 'package:firebase_core/firebase_core.dart' as _i2;
import 'package:graph_go/services/google_auth_service.dart' as _i7;
import 'package:mockito/mockito.dart' as _i1;
import 'package:mockito/src/dummies.dart' as _i6;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
// ignore_for_file: avoid_setters_without_getters
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: implementation_imports
// ignore_for_file: invalid_use_of_visible_for_testing_member
// ignore_for_file: must_be_immutable
// ignore_for_file: prefer_const_constructors
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
// ignore_for_file: invalid_use_of_internal_member
class _FakeFirebaseApp_0 extends _i1.SmartFake implements _i2.FirebaseApp {
_FakeFirebaseApp_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeActionCodeInfo_1 extends _i1.SmartFake
implements _i3.ActionCodeInfo {
_FakeActionCodeInfo_1(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUserCredential_2 extends _i1.SmartFake
implements _i4.UserCredential {
_FakeUserCredential_2(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeConfirmationResult_3 extends _i1.SmartFake
implements _i4.ConfirmationResult {
_FakeConfirmationResult_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUserMetadata_4 extends _i1.SmartFake implements _i3.UserMetadata {
_FakeUserMetadata_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeMultiFactor_5 extends _i1.SmartFake implements _i4.MultiFactor {
_FakeMultiFactor_5(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeIdTokenResult_6 extends _i1.SmartFake implements _i3.IdTokenResult {
_FakeIdTokenResult_6(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUser_7 extends _i1.SmartFake implements _i4.User {
_FakeUser_7(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [FirebaseAuth].
///
/// See the documentation for Mockito's code generation for more information.
class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth {
MockFirebaseAuth() {
_i1.throwOnMissingStub(this);
}
@override
_i2.FirebaseApp get app => (super.noSuchMethod(
Invocation.getter(#app),
returnValue: _FakeFirebaseApp_0(
this,
Invocation.getter(#app),
),
) as _i2.FirebaseApp);
@override
set app(_i2.FirebaseApp? value) => super.noSuchMethod(
Invocation.setter(
#app,
value,
),
returnValueForMissingStub: null,
);
@override
set tenantId(String? tenantId) => super.noSuchMethod(
Invocation.setter(
#tenantId,
tenantId,
),
returnValueForMissingStub: null,
);
@override
Map<dynamic, dynamic> get pluginConstants => (super.noSuchMethod(
Invocation.getter(#pluginConstants),
returnValue: <dynamic, dynamic>{},
) as Map<dynamic, dynamic>);
@override
_i5.Future<void> useEmulator(String? origin) => (super.noSuchMethod(
Invocation.method(
#useEmulator,
[origin],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> useAuthEmulator(
String? host,
int? port, {
bool? automaticHostMapping = true,
}) =>
(super.noSuchMethod(
Invocation.method(
#useAuthEmulator,
[
host,
port,
],
{#automaticHostMapping: automaticHostMapping},
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> applyActionCode(String? code) => (super.noSuchMethod(
Invocation.method(
#applyActionCode,
[code],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<_i3.ActionCodeInfo> checkActionCode(String? code) =>
(super.noSuchMethod(
Invocation.method(
#checkActionCode,
[code],
),
returnValue: _i5.Future<_i3.ActionCodeInfo>.value(_FakeActionCodeInfo_1(
this,
Invocation.method(
#checkActionCode,
[code],
),
)),
) as _i5.Future<_i3.ActionCodeInfo>);
@override
_i5.Future<void> confirmPasswordReset({
required String? code,
required String? newPassword,
}) =>
(super.noSuchMethod(
Invocation.method(
#confirmPasswordReset,
[],
{
#code: code,
#newPassword: newPassword,
},
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<_i4.UserCredential> createUserWithEmailAndPassword({
required String? email,
required String? password,
}) =>
(super.noSuchMethod(
Invocation.method(
#createUserWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#createUserWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<List<String>> fetchSignInMethodsForEmail(String? email) =>
(super.noSuchMethod(
Invocation.method(
#fetchSignInMethodsForEmail,
[email],
),
returnValue: _i5.Future<List<String>>.value(<String>[]),
) as _i5.Future<List<String>>);
@override
_i5.Future<_i4.UserCredential> getRedirectResult() => (super.noSuchMethod(
Invocation.method(
#getRedirectResult,
[],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#getRedirectResult,
[],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
bool isSignInWithEmailLink(String? emailLink) => (super.noSuchMethod(
Invocation.method(
#isSignInWithEmailLink,
[emailLink],
),
returnValue: false,
) as bool);
@override
_i5.Stream<_i4.User?> authStateChanges() => (super.noSuchMethod(
Invocation.method(
#authStateChanges,
[],
),
returnValue: _i5.Stream<_i4.User?>.empty(),
) as _i5.Stream<_i4.User?>);
@override
_i5.Stream<_i4.User?> idTokenChanges() => (super.noSuchMethod(
Invocation.method(
#idTokenChanges,
[],
),
returnValue: _i5.Stream<_i4.User?>.empty(),
) as _i5.Stream<_i4.User?>);
@override
_i5.Stream<_i4.User?> userChanges() => (super.noSuchMethod(
Invocation.method(
#userChanges,
[],
),
returnValue: _i5.Stream<_i4.User?>.empty(),
) as _i5.Stream<_i4.User?>);
@override
_i5.Future<void> sendPasswordResetEmail({
required String? email,
_i3.ActionCodeSettings? actionCodeSettings,
}) =>
(super.noSuchMethod(
Invocation.method(
#sendPasswordResetEmail,
[],
{
#email: email,
#actionCodeSettings: actionCodeSettings,
},
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> sendSignInLinkToEmail({
required String? email,
required _i3.ActionCodeSettings? actionCodeSettings,
}) =>
(super.noSuchMethod(
Invocation.method(
#sendSignInLinkToEmail,
[],
{
#email: email,
#actionCodeSettings: actionCodeSettings,
},
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> setLanguageCode(String? languageCode) => (super.noSuchMethod(
Invocation.method(
#setLanguageCode,
[languageCode],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> setSettings({
bool? appVerificationDisabledForTesting = false,
String? userAccessGroup,
String? phoneNumber,
String? smsCode,
bool? forceRecaptchaFlow,
}) =>
(super.noSuchMethod(
Invocation.method(
#setSettings,
[],
{
#appVerificationDisabledForTesting:
appVerificationDisabledForTesting,
#userAccessGroup: userAccessGroup,
#phoneNumber: phoneNumber,
#smsCode: smsCode,
#forceRecaptchaFlow: forceRecaptchaFlow,
},
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> setPersistence(_i3.Persistence? persistence) =>
(super.noSuchMethod(
Invocation.method(
#setPersistence,
[persistence],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<_i4.UserCredential> signInAnonymously() => (super.noSuchMethod(
Invocation.method(
#signInAnonymously,
[],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInAnonymously,
[],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> signInWithCredential(
_i3.AuthCredential? credential) =>
(super.noSuchMethod(
Invocation.method(
#signInWithCredential,
[credential],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithCredential,
[credential],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> signInWithCustomToken(String? token) =>
(super.noSuchMethod(
Invocation.method(
#signInWithCustomToken,
[token],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithCustomToken,
[token],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> signInWithEmailAndPassword({
required String? email,
required String? password,
}) =>
(super.noSuchMethod(
Invocation.method(
#signInWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> signInWithEmailLink({
required String? email,
required String? emailLink,
}) =>
(super.noSuchMethod(
Invocation.method(
#signInWithEmailLink,
[],
{
#email: email,
#emailLink: emailLink,
},
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithEmailLink,
[],
{
#email: email,
#emailLink: emailLink,
},
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> signInWithAuthProvider(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithAuthProvider,
[provider],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithAuthProvider,
[provider],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> signInWithProvider(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithProvider,
[provider],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithProvider,
[provider],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.ConfirmationResult> signInWithPhoneNumber(
String? phoneNumber, [
_i4.RecaptchaVerifier? verifier,
]) =>
(super.noSuchMethod(
Invocation.method(
#signInWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
returnValue:
_i5.Future<_i4.ConfirmationResult>.value(_FakeConfirmationResult_3(
this,
Invocation.method(
#signInWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
)),
) as _i5.Future<_i4.ConfirmationResult>);
@override
_i5.Future<_i4.UserCredential> signInWithPopup(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithPopup,
[provider],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithPopup,
[provider],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<void> signInWithRedirect(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithRedirect,
[provider],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> signOut() => (super.noSuchMethod(
Invocation.method(
#signOut,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<String> verifyPasswordResetCode(String? code) =>
(super.noSuchMethod(
Invocation.method(
#verifyPasswordResetCode,
[code],
),
returnValue: _i5.Future<String>.value(_i6.dummyValue<String>(
this,
Invocation.method(
#verifyPasswordResetCode,
[code],
),
)),
) as _i5.Future<String>);
@override
_i5.Future<void> verifyPhoneNumber({
String? phoneNumber,
_i3.PhoneMultiFactorInfo? multiFactorInfo,
required _i3.PhoneVerificationCompleted? verificationCompleted,
required _i3.PhoneVerificationFailed? verificationFailed,
required _i3.PhoneCodeSent? codeSent,
required _i3.PhoneCodeAutoRetrievalTimeout? codeAutoRetrievalTimeout,
String? autoRetrievedSmsCodeForTesting,
Duration? timeout = const Duration(seconds: 30),
int? forceResendingToken,
_i3.MultiFactorSession? multiFactorSession,
}) =>
(super.noSuchMethod(
Invocation.method(
#verifyPhoneNumber,
[],
{
#phoneNumber: phoneNumber,
#multiFactorInfo: multiFactorInfo,
#verificationCompleted: verificationCompleted,
#verificationFailed: verificationFailed,
#codeSent: codeSent,
#codeAutoRetrievalTimeout: codeAutoRetrievalTimeout,
#autoRetrievedSmsCodeForTesting: autoRetrievedSmsCodeForTesting,
#timeout: timeout,
#forceResendingToken: forceResendingToken,
#multiFactorSession: multiFactorSession,
},
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> revokeTokenWithAuthorizationCode(
String? authorizationCode) =>
(super.noSuchMethod(
Invocation.method(
#revokeTokenWithAuthorizationCode,
[authorizationCode],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
}
/// A class which mocks [UserCredential].
///
/// See the documentation for Mockito's code generation for more information.
class MockUserCredential extends _i1.Mock implements _i4.UserCredential {
MockUserCredential() {
_i1.throwOnMissingStub(this);
}
}
/// A class which mocks [User].
///
/// See the documentation for Mockito's code generation for more information.
class MockUser extends _i1.Mock implements _i4.User {
MockUser() {
_i1.throwOnMissingStub(this);
}
@override
bool get emailVerified => (super.noSuchMethod(
Invocation.getter(#emailVerified),
returnValue: false,
) as bool);
@override
bool get isAnonymous => (super.noSuchMethod(
Invocation.getter(#isAnonymous),
returnValue: false,
) as bool);
@override
_i3.UserMetadata get metadata => (super.noSuchMethod(
Invocation.getter(#metadata),
returnValue: _FakeUserMetadata_4(
this,
Invocation.getter(#metadata),
),
) as _i3.UserMetadata);
@override
List<_i3.UserInfo> get providerData => (super.noSuchMethod(
Invocation.getter(#providerData),
returnValue: <_i3.UserInfo>[],
) as List<_i3.UserInfo>);
@override
String get uid => (super.noSuchMethod(
Invocation.getter(#uid),
returnValue: _i6.dummyValue<String>(
this,
Invocation.getter(#uid),
),
) as String);
@override
_i4.MultiFactor get multiFactor => (super.noSuchMethod(
Invocation.getter(#multiFactor),
returnValue: _FakeMultiFactor_5(
this,
Invocation.getter(#multiFactor),
),
) as _i4.MultiFactor);
@override
_i5.Future<void> delete() => (super.noSuchMethod(
Invocation.method(
#delete,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<String?> getIdToken([bool? forceRefresh = false]) =>
(super.noSuchMethod(
Invocation.method(
#getIdToken,
[forceRefresh],
),
returnValue: _i5.Future<String?>.value(),
) as _i5.Future<String?>);
@override
_i5.Future<_i3.IdTokenResult> getIdTokenResult(
[bool? forceRefresh = false]) =>
(super.noSuchMethod(
Invocation.method(
#getIdTokenResult,
[forceRefresh],
),
returnValue: _i5.Future<_i3.IdTokenResult>.value(_FakeIdTokenResult_6(
this,
Invocation.method(
#getIdTokenResult,
[forceRefresh],
),
)),
) as _i5.Future<_i3.IdTokenResult>);
@override
_i5.Future<_i4.UserCredential> linkWithCredential(
_i3.AuthCredential? credential) =>
(super.noSuchMethod(
Invocation.method(
#linkWithCredential,
[credential],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#linkWithCredential,
[credential],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> linkWithProvider(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#linkWithProvider,
[provider],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#linkWithProvider,
[provider],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> reauthenticateWithProvider(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithProvider,
[provider],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#reauthenticateWithProvider,
[provider],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<_i4.UserCredential> reauthenticateWithPopup(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithPopup,
[provider],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#reauthenticateWithPopup,
[provider],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<void> reauthenticateWithRedirect(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithRedirect,
[provider],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<_i4.UserCredential> linkWithPopup(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#linkWithPopup,
[provider],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#linkWithPopup,
[provider],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<void> linkWithRedirect(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#linkWithRedirect,
[provider],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<_i4.ConfirmationResult> linkWithPhoneNumber(
String? phoneNumber, [
_i4.RecaptchaVerifier? verifier,
]) =>
(super.noSuchMethod(
Invocation.method(
#linkWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
returnValue:
_i5.Future<_i4.ConfirmationResult>.value(_FakeConfirmationResult_3(
this,
Invocation.method(
#linkWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
)),
) as _i5.Future<_i4.ConfirmationResult>);
@override
_i5.Future<_i4.UserCredential> reauthenticateWithCredential(
_i3.AuthCredential? credential) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithCredential,
[credential],
),
returnValue: _i5.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#reauthenticateWithCredential,
[credential],
),
)),
) as _i5.Future<_i4.UserCredential>);
@override
_i5.Future<void> reload() => (super.noSuchMethod(
Invocation.method(
#reload,
[],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> sendEmailVerification(
[_i3.ActionCodeSettings? actionCodeSettings]) =>
(super.noSuchMethod(
Invocation.method(
#sendEmailVerification,
[actionCodeSettings],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<_i4.User> unlink(String? providerId) => (super.noSuchMethod(
Invocation.method(
#unlink,
[providerId],
),
returnValue: _i5.Future<_i4.User>.value(_FakeUser_7(
this,
Invocation.method(
#unlink,
[providerId],
),
)),
) as _i5.Future<_i4.User>);
@override
_i5.Future<void> updateEmail(String? newEmail) => (super.noSuchMethod(
Invocation.method(
#updateEmail,
[newEmail],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> updatePassword(String? newPassword) => (super.noSuchMethod(
Invocation.method(
#updatePassword,
[newPassword],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> updatePhoneNumber(
_i3.PhoneAuthCredential? phoneCredential) =>
(super.noSuchMethod(
Invocation.method(
#updatePhoneNumber,
[phoneCredential],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> updateDisplayName(String? displayName) =>
(super.noSuchMethod(
Invocation.method(
#updateDisplayName,
[displayName],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> updatePhotoURL(String? photoURL) => (super.noSuchMethod(
Invocation.method(
#updatePhotoURL,
[photoURL],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> updateProfile({
String? displayName,
String? photoURL,
}) =>
(super.noSuchMethod(
Invocation.method(
#updateProfile,
[],
{
#displayName: displayName,
#photoURL: photoURL,
},
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
@override
_i5.Future<void> verifyBeforeUpdateEmail(
String? newEmail, [
_i3.ActionCodeSettings? actionCodeSettings,
]) =>
(super.noSuchMethod(
Invocation.method(
#verifyBeforeUpdateEmail,
[
newEmail,
actionCodeSettings,
],
),
returnValue: _i5.Future<void>.value(),
returnValueForMissingStub: _i5.Future<void>.value(),
) as _i5.Future<void>);
}
/// A class which mocks [GoogleAuthService].
///
/// See the documentation for Mockito's code generation for more information.
class MockGoogleAuthService extends _i1.Mock implements _i7.GoogleAuthService {
MockGoogleAuthService() {
_i1.throwOnMissingStub(this);
}
}
// Mocks generated by Mockito 5.4.6 from annotations
// in graph_go/test/screens/profile_screen_test.dart.
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i7;
import 'dart:typed_data' as _i11;
import 'package:cloud_firestore/cloud_firestore.dart' as _i6;
import 'package:cloud_firestore_platform_interface/cloud_firestore_platform_interface.dart'
as _i5;
import 'package:firebase_auth/firebase_auth.dart' as _i4;
import 'package:firebase_auth_platform_interface/firebase_auth_platform_interface.dart'
as _i3;
import 'package:firebase_core/firebase_core.dart' as _i2;
import 'package:firebase_storage/firebase_storage.dart' as _i8;
import 'package:image_picker/image_picker.dart' as _i12;
import 'package:image_picker_platform_interface/image_picker_platform_interface.dart'
as _i9;
import 'package:mockito/mockito.dart' as _i1;
import 'package:mockito/src/dummies.dart' as _i10;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
// ignore_for_file: avoid_setters_without_getters
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: implementation_imports
// ignore_for_file: invalid_use_of_visible_for_testing_member
// ignore_for_file: must_be_immutable
// ignore_for_file: prefer_const_constructors
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
// ignore_for_file: invalid_use_of_internal_member
class _FakeFirebaseApp_0 extends _i1.SmartFake implements _i2.FirebaseApp {
_FakeFirebaseApp_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeActionCodeInfo_1 extends _i1.SmartFake
implements _i3.ActionCodeInfo {
_FakeActionCodeInfo_1(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUserCredential_2 extends _i1.SmartFake
implements _i4.UserCredential {
_FakeUserCredential_2(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeConfirmationResult_3 extends _i1.SmartFake
implements _i4.ConfirmationResult {
_FakeConfirmationResult_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUserMetadata_4 extends _i1.SmartFake implements _i3.UserMetadata {
_FakeUserMetadata_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeMultiFactor_5 extends _i1.SmartFake implements _i4.MultiFactor {
_FakeMultiFactor_5(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeIdTokenResult_6 extends _i1.SmartFake implements _i3.IdTokenResult {
_FakeIdTokenResult_6(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUser_7 extends _i1.SmartFake implements _i4.User {
_FakeUser_7(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeSettings_8 extends _i1.SmartFake implements _i5.Settings {
_FakeSettings_8(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeCollectionReference_9<T extends Object?> extends _i1.SmartFake
implements _i6.CollectionReference<T> {
_FakeCollectionReference_9(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeWriteBatch_10 extends _i1.SmartFake implements _i6.WriteBatch {
_FakeWriteBatch_10(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeLoadBundleTask_11 extends _i1.SmartFake
implements _i6.LoadBundleTask {
_FakeLoadBundleTask_11(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeQuerySnapshot_12<T1 extends Object?> extends _i1.SmartFake
implements _i6.QuerySnapshot<T1> {
_FakeQuerySnapshot_12(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeQuery_13<T extends Object?> extends _i1.SmartFake
implements _i6.Query<T> {
_FakeQuery_13(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeDocumentReference_14<T extends Object?> extends _i1.SmartFake
implements _i6.DocumentReference<T> {
_FakeDocumentReference_14(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeFuture_15<T1> extends _i1.SmartFake implements _i7.Future<T1> {
_FakeFuture_15(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeDuration_16 extends _i1.SmartFake implements Duration {
_FakeDuration_16(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeReference_17 extends _i1.SmartFake implements _i8.Reference {
_FakeReference_17(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeLostDataResponse_18 extends _i1.SmartFake
implements _i9.LostDataResponse {
_FakeLostDataResponse_18(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [FirebaseAuth].
///
/// See the documentation for Mockito's code generation for more information.
class MockFirebaseAuth extends _i1.Mock implements _i4.FirebaseAuth {
MockFirebaseAuth() {
_i1.throwOnMissingStub(this);
}
@override
_i2.FirebaseApp get app => (super.noSuchMethod(
Invocation.getter(#app),
returnValue: _FakeFirebaseApp_0(
this,
Invocation.getter(#app),
),
) as _i2.FirebaseApp);
@override
set app(_i2.FirebaseApp? value) => super.noSuchMethod(
Invocation.setter(
#app,
value,
),
returnValueForMissingStub: null,
);
@override
set tenantId(String? tenantId) => super.noSuchMethod(
Invocation.setter(
#tenantId,
tenantId,
),
returnValueForMissingStub: null,
);
@override
Map<dynamic, dynamic> get pluginConstants => (super.noSuchMethod(
Invocation.getter(#pluginConstants),
returnValue: <dynamic, dynamic>{},
) as Map<dynamic, dynamic>);
@override
_i7.Future<void> useEmulator(String? origin) => (super.noSuchMethod(
Invocation.method(
#useEmulator,
[origin],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> useAuthEmulator(
String? host,
int? port, {
bool? automaticHostMapping = true,
}) =>
(super.noSuchMethod(
Invocation.method(
#useAuthEmulator,
[
host,
port,
],
{#automaticHostMapping: automaticHostMapping},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> applyActionCode(String? code) => (super.noSuchMethod(
Invocation.method(
#applyActionCode,
[code],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<_i3.ActionCodeInfo> checkActionCode(String? code) =>
(super.noSuchMethod(
Invocation.method(
#checkActionCode,
[code],
),
returnValue: _i7.Future<_i3.ActionCodeInfo>.value(_FakeActionCodeInfo_1(
this,
Invocation.method(
#checkActionCode,
[code],
),
)),
) as _i7.Future<_i3.ActionCodeInfo>);
@override
_i7.Future<void> confirmPasswordReset({
required String? code,
required String? newPassword,
}) =>
(super.noSuchMethod(
Invocation.method(
#confirmPasswordReset,
[],
{
#code: code,
#newPassword: newPassword,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<_i4.UserCredential> createUserWithEmailAndPassword({
required String? email,
required String? password,
}) =>
(super.noSuchMethod(
Invocation.method(
#createUserWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#createUserWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<List<String>> fetchSignInMethodsForEmail(String? email) =>
(super.noSuchMethod(
Invocation.method(
#fetchSignInMethodsForEmail,
[email],
),
returnValue: _i7.Future<List<String>>.value(<String>[]),
) as _i7.Future<List<String>>);
@override
_i7.Future<_i4.UserCredential> getRedirectResult() => (super.noSuchMethod(
Invocation.method(
#getRedirectResult,
[],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#getRedirectResult,
[],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
bool isSignInWithEmailLink(String? emailLink) => (super.noSuchMethod(
Invocation.method(
#isSignInWithEmailLink,
[emailLink],
),
returnValue: false,
) as bool);
@override
_i7.Stream<_i4.User?> authStateChanges() => (super.noSuchMethod(
Invocation.method(
#authStateChanges,
[],
),
returnValue: _i7.Stream<_i4.User?>.empty(),
) as _i7.Stream<_i4.User?>);
@override
_i7.Stream<_i4.User?> idTokenChanges() => (super.noSuchMethod(
Invocation.method(
#idTokenChanges,
[],
),
returnValue: _i7.Stream<_i4.User?>.empty(),
) as _i7.Stream<_i4.User?>);
@override
_i7.Stream<_i4.User?> userChanges() => (super.noSuchMethod(
Invocation.method(
#userChanges,
[],
),
returnValue: _i7.Stream<_i4.User?>.empty(),
) as _i7.Stream<_i4.User?>);
@override
_i7.Future<void> sendPasswordResetEmail({
required String? email,
_i3.ActionCodeSettings? actionCodeSettings,
}) =>
(super.noSuchMethod(
Invocation.method(
#sendPasswordResetEmail,
[],
{
#email: email,
#actionCodeSettings: actionCodeSettings,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> sendSignInLinkToEmail({
required String? email,
required _i3.ActionCodeSettings? actionCodeSettings,
}) =>
(super.noSuchMethod(
Invocation.method(
#sendSignInLinkToEmail,
[],
{
#email: email,
#actionCodeSettings: actionCodeSettings,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> setLanguageCode(String? languageCode) => (super.noSuchMethod(
Invocation.method(
#setLanguageCode,
[languageCode],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> setSettings({
bool? appVerificationDisabledForTesting = false,
String? userAccessGroup,
String? phoneNumber,
String? smsCode,
bool? forceRecaptchaFlow,
}) =>
(super.noSuchMethod(
Invocation.method(
#setSettings,
[],
{
#appVerificationDisabledForTesting:
appVerificationDisabledForTesting,
#userAccessGroup: userAccessGroup,
#phoneNumber: phoneNumber,
#smsCode: smsCode,
#forceRecaptchaFlow: forceRecaptchaFlow,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> setPersistence(_i3.Persistence? persistence) =>
(super.noSuchMethod(
Invocation.method(
#setPersistence,
[persistence],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<_i4.UserCredential> signInAnonymously() => (super.noSuchMethod(
Invocation.method(
#signInAnonymously,
[],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInAnonymously,
[],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> signInWithCredential(
_i3.AuthCredential? credential) =>
(super.noSuchMethod(
Invocation.method(
#signInWithCredential,
[credential],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithCredential,
[credential],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> signInWithCustomToken(String? token) =>
(super.noSuchMethod(
Invocation.method(
#signInWithCustomToken,
[token],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithCustomToken,
[token],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> signInWithEmailAndPassword({
required String? email,
required String? password,
}) =>
(super.noSuchMethod(
Invocation.method(
#signInWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithEmailAndPassword,
[],
{
#email: email,
#password: password,
},
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> signInWithEmailLink({
required String? email,
required String? emailLink,
}) =>
(super.noSuchMethod(
Invocation.method(
#signInWithEmailLink,
[],
{
#email: email,
#emailLink: emailLink,
},
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithEmailLink,
[],
{
#email: email,
#emailLink: emailLink,
},
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> signInWithAuthProvider(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithAuthProvider,
[provider],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithAuthProvider,
[provider],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> signInWithProvider(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithProvider,
[provider],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithProvider,
[provider],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.ConfirmationResult> signInWithPhoneNumber(
String? phoneNumber, [
_i4.RecaptchaVerifier? verifier,
]) =>
(super.noSuchMethod(
Invocation.method(
#signInWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
returnValue:
_i7.Future<_i4.ConfirmationResult>.value(_FakeConfirmationResult_3(
this,
Invocation.method(
#signInWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
)),
) as _i7.Future<_i4.ConfirmationResult>);
@override
_i7.Future<_i4.UserCredential> signInWithPopup(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithPopup,
[provider],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#signInWithPopup,
[provider],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<void> signInWithRedirect(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#signInWithRedirect,
[provider],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> signOut() => (super.noSuchMethod(
Invocation.method(
#signOut,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<String> verifyPasswordResetCode(String? code) =>
(super.noSuchMethod(
Invocation.method(
#verifyPasswordResetCode,
[code],
),
returnValue: _i7.Future<String>.value(_i10.dummyValue<String>(
this,
Invocation.method(
#verifyPasswordResetCode,
[code],
),
)),
) as _i7.Future<String>);
@override
_i7.Future<void> verifyPhoneNumber({
String? phoneNumber,
_i3.PhoneMultiFactorInfo? multiFactorInfo,
required _i3.PhoneVerificationCompleted? verificationCompleted,
required _i3.PhoneVerificationFailed? verificationFailed,
required _i3.PhoneCodeSent? codeSent,
required _i3.PhoneCodeAutoRetrievalTimeout? codeAutoRetrievalTimeout,
String? autoRetrievedSmsCodeForTesting,
Duration? timeout = const Duration(seconds: 30),
int? forceResendingToken,
_i3.MultiFactorSession? multiFactorSession,
}) =>
(super.noSuchMethod(
Invocation.method(
#verifyPhoneNumber,
[],
{
#phoneNumber: phoneNumber,
#multiFactorInfo: multiFactorInfo,
#verificationCompleted: verificationCompleted,
#verificationFailed: verificationFailed,
#codeSent: codeSent,
#codeAutoRetrievalTimeout: codeAutoRetrievalTimeout,
#autoRetrievedSmsCodeForTesting: autoRetrievedSmsCodeForTesting,
#timeout: timeout,
#forceResendingToken: forceResendingToken,
#multiFactorSession: multiFactorSession,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> revokeTokenWithAuthorizationCode(
String? authorizationCode) =>
(super.noSuchMethod(
Invocation.method(
#revokeTokenWithAuthorizationCode,
[authorizationCode],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
}
/// A class which mocks [User].
///
/// See the documentation for Mockito's code generation for more information.
class MockUser extends _i1.Mock implements _i4.User {
MockUser() {
_i1.throwOnMissingStub(this);
}
@override
bool get emailVerified => (super.noSuchMethod(
Invocation.getter(#emailVerified),
returnValue: false,
) as bool);
@override
bool get isAnonymous => (super.noSuchMethod(
Invocation.getter(#isAnonymous),
returnValue: false,
) as bool);
@override
_i3.UserMetadata get metadata => (super.noSuchMethod(
Invocation.getter(#metadata),
returnValue: _FakeUserMetadata_4(
this,
Invocation.getter(#metadata),
),
) as _i3.UserMetadata);
@override
List<_i3.UserInfo> get providerData => (super.noSuchMethod(
Invocation.getter(#providerData),
returnValue: <_i3.UserInfo>[],
) as List<_i3.UserInfo>);
@override
String get uid => (super.noSuchMethod(
Invocation.getter(#uid),
returnValue: _i10.dummyValue<String>(
this,
Invocation.getter(#uid),
),
) as String);
@override
_i4.MultiFactor get multiFactor => (super.noSuchMethod(
Invocation.getter(#multiFactor),
returnValue: _FakeMultiFactor_5(
this,
Invocation.getter(#multiFactor),
),
) as _i4.MultiFactor);
@override
_i7.Future<void> delete() => (super.noSuchMethod(
Invocation.method(
#delete,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<String?> getIdToken([bool? forceRefresh = false]) =>
(super.noSuchMethod(
Invocation.method(
#getIdToken,
[forceRefresh],
),
returnValue: _i7.Future<String?>.value(),
) as _i7.Future<String?>);
@override
_i7.Future<_i3.IdTokenResult> getIdTokenResult(
[bool? forceRefresh = false]) =>
(super.noSuchMethod(
Invocation.method(
#getIdTokenResult,
[forceRefresh],
),
returnValue: _i7.Future<_i3.IdTokenResult>.value(_FakeIdTokenResult_6(
this,
Invocation.method(
#getIdTokenResult,
[forceRefresh],
),
)),
) as _i7.Future<_i3.IdTokenResult>);
@override
_i7.Future<_i4.UserCredential> linkWithCredential(
_i3.AuthCredential? credential) =>
(super.noSuchMethod(
Invocation.method(
#linkWithCredential,
[credential],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#linkWithCredential,
[credential],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> linkWithProvider(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#linkWithProvider,
[provider],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#linkWithProvider,
[provider],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> reauthenticateWithProvider(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithProvider,
[provider],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#reauthenticateWithProvider,
[provider],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<_i4.UserCredential> reauthenticateWithPopup(
_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithPopup,
[provider],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#reauthenticateWithPopup,
[provider],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<void> reauthenticateWithRedirect(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithRedirect,
[provider],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<_i4.UserCredential> linkWithPopup(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#linkWithPopup,
[provider],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#linkWithPopup,
[provider],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<void> linkWithRedirect(_i3.AuthProvider? provider) =>
(super.noSuchMethod(
Invocation.method(
#linkWithRedirect,
[provider],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<_i4.ConfirmationResult> linkWithPhoneNumber(
String? phoneNumber, [
_i4.RecaptchaVerifier? verifier,
]) =>
(super.noSuchMethod(
Invocation.method(
#linkWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
returnValue:
_i7.Future<_i4.ConfirmationResult>.value(_FakeConfirmationResult_3(
this,
Invocation.method(
#linkWithPhoneNumber,
[
phoneNumber,
verifier,
],
),
)),
) as _i7.Future<_i4.ConfirmationResult>);
@override
_i7.Future<_i4.UserCredential> reauthenticateWithCredential(
_i3.AuthCredential? credential) =>
(super.noSuchMethod(
Invocation.method(
#reauthenticateWithCredential,
[credential],
),
returnValue: _i7.Future<_i4.UserCredential>.value(_FakeUserCredential_2(
this,
Invocation.method(
#reauthenticateWithCredential,
[credential],
),
)),
) as _i7.Future<_i4.UserCredential>);
@override
_i7.Future<void> reload() => (super.noSuchMethod(
Invocation.method(
#reload,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> sendEmailVerification(
[_i3.ActionCodeSettings? actionCodeSettings]) =>
(super.noSuchMethod(
Invocation.method(
#sendEmailVerification,
[actionCodeSettings],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<_i4.User> unlink(String? providerId) => (super.noSuchMethod(
Invocation.method(
#unlink,
[providerId],
),
returnValue: _i7.Future<_i4.User>.value(_FakeUser_7(
this,
Invocation.method(
#unlink,
[providerId],
),
)),
) as _i7.Future<_i4.User>);
@override
_i7.Future<void> updateEmail(String? newEmail) => (super.noSuchMethod(
Invocation.method(
#updateEmail,
[newEmail],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> updatePassword(String? newPassword) => (super.noSuchMethod(
Invocation.method(
#updatePassword,
[newPassword],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> updatePhoneNumber(
_i3.PhoneAuthCredential? phoneCredential) =>
(super.noSuchMethod(
Invocation.method(
#updatePhoneNumber,
[phoneCredential],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> updateDisplayName(String? displayName) =>
(super.noSuchMethod(
Invocation.method(
#updateDisplayName,
[displayName],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> updatePhotoURL(String? photoURL) => (super.noSuchMethod(
Invocation.method(
#updatePhotoURL,
[photoURL],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> updateProfile({
String? displayName,
String? photoURL,
}) =>
(super.noSuchMethod(
Invocation.method(
#updateProfile,
[],
{
#displayName: displayName,
#photoURL: photoURL,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> verifyBeforeUpdateEmail(
String? newEmail, [
_i3.ActionCodeSettings? actionCodeSettings,
]) =>
(super.noSuchMethod(
Invocation.method(
#verifyBeforeUpdateEmail,
[
newEmail,
actionCodeSettings,
],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
}
/// A class which mocks [FirebaseFirestore].
///
/// See the documentation for Mockito's code generation for more information.
class MockFirebaseFirestore extends _i1.Mock implements _i6.FirebaseFirestore {
MockFirebaseFirestore() {
_i1.throwOnMissingStub(this);
}
@override
_i2.FirebaseApp get app => (super.noSuchMethod(
Invocation.getter(#app),
returnValue: _FakeFirebaseApp_0(
this,
Invocation.getter(#app),
),
) as _i2.FirebaseApp);
@override
String get databaseURL => (super.noSuchMethod(
Invocation.getter(#databaseURL),
returnValue: _i10.dummyValue<String>(
this,
Invocation.getter(#databaseURL),
),
) as String);
@override
String get databaseId => (super.noSuchMethod(
Invocation.getter(#databaseId),
returnValue: _i10.dummyValue<String>(
this,
Invocation.getter(#databaseId),
),
) as String);
@override
_i5.Settings get settings => (super.noSuchMethod(
Invocation.getter(#settings),
returnValue: _FakeSettings_8(
this,
Invocation.getter(#settings),
),
) as _i5.Settings);
@override
set app(_i2.FirebaseApp? value) => super.noSuchMethod(
Invocation.setter(
#app,
value,
),
returnValueForMissingStub: null,
);
@override
set databaseURL(String? value) => super.noSuchMethod(
Invocation.setter(
#databaseURL,
value,
),
returnValueForMissingStub: null,
);
@override
set databaseId(String? value) => super.noSuchMethod(
Invocation.setter(
#databaseId,
value,
),
returnValueForMissingStub: null,
);
@override
set settings(_i5.Settings? settings) => super.noSuchMethod(
Invocation.setter(
#settings,
settings,
),
returnValueForMissingStub: null,
);
@override
Map<dynamic, dynamic> get pluginConstants => (super.noSuchMethod(
Invocation.getter(#pluginConstants),
returnValue: <dynamic, dynamic>{},
) as Map<dynamic, dynamic>);
@override
_i6.CollectionReference<Map<String, dynamic>> collection(
String? collectionPath) =>
(super.noSuchMethod(
Invocation.method(
#collection,
[collectionPath],
),
returnValue: _FakeCollectionReference_9<Map<String, dynamic>>(
this,
Invocation.method(
#collection,
[collectionPath],
),
),
) as _i6.CollectionReference<Map<String, dynamic>>);
@override
_i6.WriteBatch batch() => (super.noSuchMethod(
Invocation.method(
#batch,
[],
),
returnValue: _FakeWriteBatch_10(
this,
Invocation.method(
#batch,
[],
),
),
) as _i6.WriteBatch);
@override
_i7.Future<void> clearPersistence() => (super.noSuchMethod(
Invocation.method(
#clearPersistence,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> enablePersistence(
[_i5.PersistenceSettings? persistenceSettings]) =>
(super.noSuchMethod(
Invocation.method(
#enablePersistence,
[persistenceSettings],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.LoadBundleTask loadBundle(_i11.Uint8List? bundle) => (super.noSuchMethod(
Invocation.method(
#loadBundle,
[bundle],
),
returnValue: _FakeLoadBundleTask_11(
this,
Invocation.method(
#loadBundle,
[bundle],
),
),
) as _i6.LoadBundleTask);
@override
void useFirestoreEmulator(
String? host,
int? port, {
bool? sslEnabled = false,
bool? automaticHostMapping = true,
}) =>
super.noSuchMethod(
Invocation.method(
#useFirestoreEmulator,
[
host,
port,
],
{
#sslEnabled: sslEnabled,
#automaticHostMapping: automaticHostMapping,
},
),
returnValueForMissingStub: null,
);
@override
_i7.Future<_i6.QuerySnapshot<T>> namedQueryWithConverterGet<T>(
String? name, {
_i5.GetOptions? options = const _i5.GetOptions(),
required _i6.FromFirestore<T>? fromFirestore,
required _i6.ToFirestore<T>? toFirestore,
}) =>
(super.noSuchMethod(
Invocation.method(
#namedQueryWithConverterGet,
[name],
{
#options: options,
#fromFirestore: fromFirestore,
#toFirestore: toFirestore,
},
),
returnValue:
_i7.Future<_i6.QuerySnapshot<T>>.value(_FakeQuerySnapshot_12<T>(
this,
Invocation.method(
#namedQueryWithConverterGet,
[name],
{
#options: options,
#fromFirestore: fromFirestore,
#toFirestore: toFirestore,
},
),
)),
) as _i7.Future<_i6.QuerySnapshot<T>>);
@override
_i7.Future<_i6.QuerySnapshot<Map<String, dynamic>>> namedQueryGet(
String? name, {
_i5.GetOptions? options = const _i5.GetOptions(),
}) =>
(super.noSuchMethod(
Invocation.method(
#namedQueryGet,
[name],
{#options: options},
),
returnValue: _i7.Future<_i6.QuerySnapshot<Map<String, dynamic>>>.value(
_FakeQuerySnapshot_12<Map<String, dynamic>>(
this,
Invocation.method(
#namedQueryGet,
[name],
{#options: options},
),
)),
) as _i7.Future<_i6.QuerySnapshot<Map<String, dynamic>>>);
@override
_i6.Query<Map<String, dynamic>> collectionGroup(String? collectionPath) =>
(super.noSuchMethod(
Invocation.method(
#collectionGroup,
[collectionPath],
),
returnValue: _FakeQuery_13<Map<String, dynamic>>(
this,
Invocation.method(
#collectionGroup,
[collectionPath],
),
),
) as _i6.Query<Map<String, dynamic>>);
@override
_i7.Future<void> disableNetwork() => (super.noSuchMethod(
Invocation.method(
#disableNetwork,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i6.DocumentReference<Map<String, dynamic>> doc(String? documentPath) =>
(super.noSuchMethod(
Invocation.method(
#doc,
[documentPath],
),
returnValue: _FakeDocumentReference_14<Map<String, dynamic>>(
this,
Invocation.method(
#doc,
[documentPath],
),
),
) as _i6.DocumentReference<Map<String, dynamic>>);
@override
_i7.Future<void> enableNetwork() => (super.noSuchMethod(
Invocation.method(
#enableNetwork,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Stream<void> snapshotsInSync() => (super.noSuchMethod(
Invocation.method(
#snapshotsInSync,
[],
),
returnValue: _i7.Stream<void>.empty(),
) as _i7.Stream<void>);
@override
_i7.Future<T> runTransaction<T>(
_i6.TransactionHandler<T>? transactionHandler, {
Duration? timeout = const Duration(seconds: 30),
int? maxAttempts = 5,
}) =>
(super.noSuchMethod(
Invocation.method(
#runTransaction,
[transactionHandler],
{
#timeout: timeout,
#maxAttempts: maxAttempts,
},
),
returnValue: _i10.ifNotNull(
_i10.dummyValueOrNull<T>(
this,
Invocation.method(
#runTransaction,
[transactionHandler],
{
#timeout: timeout,
#maxAttempts: maxAttempts,
},
),
),
(T v) => _i7.Future<T>.value(v),
) ??
_FakeFuture_15<T>(
this,
Invocation.method(
#runTransaction,
[transactionHandler],
{
#timeout: timeout,
#maxAttempts: maxAttempts,
},
),
),
) as _i7.Future<T>);
@override
_i7.Future<void> terminate() => (super.noSuchMethod(
Invocation.method(
#terminate,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> waitForPendingWrites() => (super.noSuchMethod(
Invocation.method(
#waitForPendingWrites,
[],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> setIndexConfiguration({
required List<_i5.Index>? indexes,
List<_i5.FieldOverrides>? fieldOverrides,
}) =>
(super.noSuchMethod(
Invocation.method(
#setIndexConfiguration,
[],
{
#indexes: indexes,
#fieldOverrides: fieldOverrides,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> setIndexConfigurationFromJSON(String? json) =>
(super.noSuchMethod(
Invocation.method(
#setIndexConfigurationFromJSON,
[json],
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
}
/// A class which mocks [FirebaseStorage].
///
/// See the documentation for Mockito's code generation for more information.
class MockFirebaseStorage extends _i1.Mock implements _i8.FirebaseStorage {
MockFirebaseStorage() {
_i1.throwOnMissingStub(this);
}
@override
_i2.FirebaseApp get app => (super.noSuchMethod(
Invocation.getter(#app),
returnValue: _FakeFirebaseApp_0(
this,
Invocation.getter(#app),
),
) as _i2.FirebaseApp);
@override
String get bucket => (super.noSuchMethod(
Invocation.getter(#bucket),
returnValue: _i10.dummyValue<String>(
this,
Invocation.getter(#bucket),
),
) as String);
@override
Duration get maxOperationRetryTime => (super.noSuchMethod(
Invocation.getter(#maxOperationRetryTime),
returnValue: _FakeDuration_16(
this,
Invocation.getter(#maxOperationRetryTime),
),
) as Duration);
@override
Duration get maxUploadRetryTime => (super.noSuchMethod(
Invocation.getter(#maxUploadRetryTime),
returnValue: _FakeDuration_16(
this,
Invocation.getter(#maxUploadRetryTime),
),
) as Duration);
@override
Duration get maxDownloadRetryTime => (super.noSuchMethod(
Invocation.getter(#maxDownloadRetryTime),
returnValue: _FakeDuration_16(
this,
Invocation.getter(#maxDownloadRetryTime),
),
) as Duration);
@override
set app(_i2.FirebaseApp? value) => super.noSuchMethod(
Invocation.setter(
#app,
value,
),
returnValueForMissingStub: null,
);
@override
set bucket(String? value) => super.noSuchMethod(
Invocation.setter(
#bucket,
value,
),
returnValueForMissingStub: null,
);
@override
Map<dynamic, dynamic> get pluginConstants => (super.noSuchMethod(
Invocation.getter(#pluginConstants),
returnValue: <dynamic, dynamic>{},
) as Map<dynamic, dynamic>);
@override
_i8.Reference ref([String? path]) => (super.noSuchMethod(
Invocation.method(
#ref,
[path],
),
returnValue: _FakeReference_17(
this,
Invocation.method(
#ref,
[path],
),
),
) as _i8.Reference);
@override
_i8.Reference refFromURL(String? url) => (super.noSuchMethod(
Invocation.method(
#refFromURL,
[url],
),
returnValue: _FakeReference_17(
this,
Invocation.method(
#refFromURL,
[url],
),
),
) as _i8.Reference);
@override
void setMaxOperationRetryTime(Duration? time) => super.noSuchMethod(
Invocation.method(
#setMaxOperationRetryTime,
[time],
),
returnValueForMissingStub: null,
);
@override
void setMaxUploadRetryTime(Duration? time) => super.noSuchMethod(
Invocation.method(
#setMaxUploadRetryTime,
[time],
),
returnValueForMissingStub: null,
);
@override
void setMaxDownloadRetryTime(Duration? time) => super.noSuchMethod(
Invocation.method(
#setMaxDownloadRetryTime,
[time],
),
returnValueForMissingStub: null,
);
@override
_i7.Future<void> useEmulator({
required String? host,
required int? port,
}) =>
(super.noSuchMethod(
Invocation.method(
#useEmulator,
[],
{
#host: host,
#port: port,
},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
@override
_i7.Future<void> useStorageEmulator(
String? host,
int? port, {
bool? automaticHostMapping = true,
}) =>
(super.noSuchMethod(
Invocation.method(
#useStorageEmulator,
[
host,
port,
],
{#automaticHostMapping: automaticHostMapping},
),
returnValue: _i7.Future<void>.value(),
returnValueForMissingStub: _i7.Future<void>.value(),
) as _i7.Future<void>);
}
/// A class which mocks [ImagePicker].
///
/// See the documentation for Mockito's code generation for more information.
class MockImagePicker extends _i1.Mock implements _i12.ImagePicker {
MockImagePicker() {
_i1.throwOnMissingStub(this);
}
@override
_i7.Future<_i9.XFile?> pickImage({
required _i9.ImageSource? source,
double? maxWidth,
double? maxHeight,
int? imageQuality,
_i9.CameraDevice? preferredCameraDevice = _i9.CameraDevice.rear,
bool? requestFullMetadata = true,
}) =>
(super.noSuchMethod(
Invocation.method(
#pickImage,
[],
{
#source: source,
#maxWidth: maxWidth,
#maxHeight: maxHeight,
#imageQuality: imageQuality,
#preferredCameraDevice: preferredCameraDevice,
#requestFullMetadata: requestFullMetadata,
},
),
returnValue: _i7.Future<_i9.XFile?>.value(),
) as _i7.Future<_i9.XFile?>);
@override
_i7.Future<List<_i9.XFile>> pickMultiImage({
double? maxWidth,
double? maxHeight,
int? imageQuality,
int? limit,
bool? requestFullMetadata = true,
}) =>
(super.noSuchMethod(
Invocation.method(
#pickMultiImage,
[],
{
#maxWidth: maxWidth,
#maxHeight: maxHeight,
#imageQuality: imageQuality,
#limit: limit,
#requestFullMetadata: requestFullMetadata,
},
),
returnValue: _i7.Future<List<_i9.XFile>>.value(<_i9.XFile>[]),
) as _i7.Future<List<_i9.XFile>>);
@override
_i7.Future<_i9.XFile?> pickMedia({
double? maxWidth,
double? maxHeight,
int? imageQuality,
bool? requestFullMetadata = true,
}) =>
(super.noSuchMethod(
Invocation.method(
#pickMedia,
[],
{
#maxWidth: maxWidth,
#maxHeight: maxHeight,
#imageQuality: imageQuality,
#requestFullMetadata: requestFullMetadata,
},
),
returnValue: _i7.Future<_i9.XFile?>.value(),
) as _i7.Future<_i9.XFile?>);
@override
_i7.Future<List<_i9.XFile>> pickMultipleMedia({
double? maxWidth,
double? maxHeight,
int? imageQuality,
int? limit,
bool? requestFullMetadata = true,
}) =>
(super.noSuchMethod(
Invocation.method(
#pickMultipleMedia,
[],
{
#maxWidth: maxWidth,
#maxHeight: maxHeight,
#imageQuality: imageQuality,
#limit: limit,
#requestFullMetadata: requestFullMetadata,
},
),
returnValue: _i7.Future<List<_i9.XFile>>.value(<_i9.XFile>[]),
) as _i7.Future<List<_i9.XFile>>);
@override
_i7.Future<_i9.XFile?> pickVideo({
required _i9.ImageSource? source,
_i9.CameraDevice? preferredCameraDevice = _i9.CameraDevice.rear,
Duration? maxDuration,
}) =>
(super.noSuchMethod(
Invocation.method(
#pickVideo,
[],
{
#source: source,
#preferredCameraDevice: preferredCameraDevice,
#maxDuration: maxDuration,
},
),
returnValue: _i7.Future<_i9.XFile?>.value(),
) as _i7.Future<_i9.XFile?>);
@override
_i7.Future<List<_i9.XFile>> pickMultiVideo({
Duration? maxDuration,
int? limit,
}) =>
(super.noSuchMethod(
Invocation.method(
#pickMultiVideo,
[],
{
#maxDuration: maxDuration,
#limit: limit,
},
),
returnValue: _i7.Future<List<_i9.XFile>>.value(<_i9.XFile>[]),
) as _i7.Future<List<_i9.XFile>>);
@override
_i7.Future<_i9.LostDataResponse> retrieveLostData() => (super.noSuchMethod(
Invocation.method(
#retrieveLostData,
[],
),
returnValue:
_i7.Future<_i9.LostDataResponse>.value(_FakeLostDataResponse_18(
this,
Invocation.method(
#retrieveLostData,
[],
),
)),
) as _i7.Future<_i9.LostDataResponse>);
@override
bool supportsImageSource(_i9.ImageSource? source) => (super.noSuchMethod(
Invocation.method(
#supportsImageSource,
[source],
),
returnValue: false,
) as bool);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment