diff --git a/devtools_options.yaml b/devtools_options.yaml new file mode 100644 index 000000000..fa0b357c4 --- /dev/null +++ b/devtools_options.yaml @@ -0,0 +1,3 @@ +description: This file stores settings for Dart & Flutter DevTools. +documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states +extensions: diff --git a/lib/locator.dart b/lib/locator.dart index 429f979d4..5295ba48c 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -1,6 +1,5 @@ import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:get_it/get_it.dart'; -import 'package:graphql_flutter/graphql_flutter.dart'; import 'package:image_cropper/image_cropper.dart'; import 'package:image_picker/image_picker.dart'; import 'package:talawa/main.dart'; @@ -105,9 +104,7 @@ final actionHandlerService = locator(); Future setupLocator() async { locator.registerSingleton(DataBaseMutationFunctions()); - locator.registerSingleton(GraphqlConfig( - httpLink: HttpLink('http://10.0.2.2:4000/'), - webSocketLink: WebSocketLink("ws://10.0.2.2:4000/graphql/"))); + locator.registerSingleton(GraphqlConfig()); //services locator.registerSingleton(NavigationService()); diff --git a/lib/models/chats/chat_list_tile_data_model.g.dart b/lib/models/chats/chat_list_tile_data_model.g.dart index 200e51549..b50e3025e 100644 --- a/lib/models/chats/chat_list_tile_data_model.g.dart +++ b/lib/models/chats/chat_list_tile_data_model.g.dart @@ -7,8 +7,7 @@ part of 'chat_list_tile_data_model.dart'; // ************************************************************************** ChatListTileDataModel _$ChatListTileDataModelFromJson( - Map json, -) => + Map json) => ChatListTileDataModel( (json['users'] as List?) ?.map((e) => ChatUser.fromJson(e as Map)) @@ -17,8 +16,7 @@ ChatListTileDataModel _$ChatListTileDataModelFromJson( ); Map _$ChatListTileDataModelToJson( - ChatListTileDataModel instance, -) => + ChatListTileDataModel instance) => { 'users': instance.users, 'id': instance.id, diff --git a/lib/services/graphql_config.dart b/lib/services/graphql_config.dart index ae1fd27f3..5d77768ba 100644 --- a/lib/services/graphql_config.dart +++ b/lib/services/graphql_config.dart @@ -16,10 +16,6 @@ class GraphqlConfig { static String? token; late HttpLink httpLink; late WebSocketLink webSocketLink; - - GraphqlConfig({required this.httpLink, required this.webSocketLink}); - // httpLink = HttpLink('http://10.0.2.2:4000/graphql'); - // webSocketLink = WebSocketLink("http://10.0.2.2:4000/graphql"); diff --git a/lib/services/image_service.dart b/lib/services/image_service.dart index b8a2a1a90..daf8ea554 100644 --- a/lib/services/image_service.dart +++ b/lib/services/image_service.dart @@ -29,10 +29,6 @@ class ImageService { try { final CroppedFile? croppedImage = await _imageCropper.cropImage( sourcePath: imageFile.path, - aspectRatioPresets: [ - CropAspectRatioPreset.square, - CropAspectRatioPreset.original, - ], uiSettings: [ AndroidUiSettings( toolbarTitle: 'Crop Image', diff --git a/lib/view_model/pre_auth_view_models/set_url_view_model.dart b/lib/view_model/pre_auth_view_models/set_url_view_model.dart index ff72bfb50..387393b36 100644 --- a/lib/view_model/pre_auth_view_models/set_url_view_model.dart +++ b/lib/view_model/pre_auth_view_models/set_url_view_model.dart @@ -1,10 +1,6 @@ import 'package:flutter/material.dart'; import 'package:hive/hive.dart'; -// import 'package:qr_code_scanner/qr_code_scanner.dart'; import 'package:mobile_scanner/mobile_scanner.dart'; -import 'dart:developer'; - -import 'package:qr_flutter/qr_flutter.dart'; import 'package:talawa/constants/app_strings.dart'; import 'package:talawa/enums/enums.dart'; import 'package:talawa/locator.dart'; @@ -59,6 +55,9 @@ class SetUrlViewModel extends BaseModel { /// qrValidator. AutovalidateMode validate = AutovalidateMode.disabled; + /// qrController. + final MobileScannerController controller = MobileScannerController(); + /// This function initialises the variables. /// /// **params**: @@ -239,64 +238,44 @@ class SetUrlViewModel extends BaseModel { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - // SizedBox( - // height: 250, - // width: 250, - // child: QRView( - // key: qrKey, - // onQRViewCreated: _onQRViewCreated, - // overlay: QrScannerOverlayShape( - // borderRadius: 10, - // borderLength: 20, - // borderWidth: 10, - // cutOutSize: 250, - // ), - // /*overlayMargin: EdgeInsets.all(50)*/ - // ), - // ), - SizedBox( height: 250, width: 250, child: MobileScanner( fit: BoxFit.contain, - onDetectError: (error, stackTrace) { - debugPrint('On detect Error: $error'); - }, - errorBuilder: (p0, error, p2) { - if (error.errorCode == - MobileScannerErrorCode.permissionDenied) { - log('Camera permission was denied.'); - navigationService.showTalawaErrorSnackBar( - 'The Camera is not working', - MessageType.error, - ); - } else if (error.errorCode == - MobileScannerErrorCode.unsupported) { - log('This device does not support scanning.'); - navigationService.showTalawaErrorSnackBar( - 'Scanning is unsupported on this device', - MessageType.error, - ); - } else { - log('An unknown error occurred: $error'); + controller: controller, + errorBuilder: (ctx, error, _) { + String errorMessage = ''; + switch (error.errorCode) { + case MobileScannerErrorCode.controllerUninitialized: + errorMessage = 'camera is not ready'; + break; + case MobileScannerErrorCode.permissionDenied: + errorMessage = + 'Please provide camera permission to scan QR code'; + break; + case MobileScannerErrorCode.unsupported: + errorMessage = + 'This device does not support scanning.'; + break; + default: + errorMessage = 'An unkonwn error occurred'; + } + + WidgetsBinding.instance.addPostFrameCallback((_) { navigationService.showTalawaErrorSnackBar( - 'An unknown error occurred', + errorMessage, MessageType.error, ); - } - return const Text("Something went wrong"); - }, - onDetect: (barcode) { - if (barcode.raw != null && barcode.barcodes.isNotEmpty) { - final String code = - barcode.barcodes.first.displayValue!; - // Handle the scanned QR code here - print('QR Code found: $code'); - } else { - print('Failed to scan QR Code'); - } + }); + + return Center( + child: Text( + errorMessage, + ), + ); }, + onDetect: _onQRViewCreated, ), ), @@ -318,18 +297,15 @@ class SetUrlViewModel extends BaseModel { /// This is the helper function which execute when the on QR view created. /// /// **params**: - /// * `controller`: QRViewController + /// * `scanData`: BarcodeCapture /// /// **returns**: /// None - void _onQRViewCreated(MobileScannerController controller) { - controller.barcodes.listen((BarcodeCapture scanData) { - /// if the scanData is not empty. - if (scanData.barcodes.isNotEmpty) { - final String code = scanData.barcodes.first.displayValue!; - print(code); - // try { + void _onQRViewCreated(BarcodeCapture scanData) { + if (scanData.raw != null && scanData.barcodes.isNotEmpty) { + final String code = scanData.barcodes.first.displayValue!; + try { final List data = code.split('?'); url.text = data[0]; final List queries = data[1].split('&'); @@ -343,81 +319,13 @@ class SetUrlViewModel extends BaseModel { graphqlConfig.getOrgUrl(); Navigator.pop(navigationService.navigatorKey.currentContext!); navigationService.pushScreen('/selectOrg', arguments: orgId); - // } on MobileScannerBarcodeException catch (e) { - // debugPrint(e.toString()); - // navigationService.showTalawaErrorSnackBar( - // "The Camera is not working", - // MessageType.error, - // ); - // } on QrEmbeddedImageException catch (e) { - // debugPrint(e.toString()); - // navigationService.showTalawaErrorDialog( - // "The QR is not Working", - // MessageType.error, - // ); - // } on QrUnsupportedVersionException catch (e) { - // debugPrint(e.toString()); - // navigationService.showTalawaErrorDialog( - // "This QR version is not Supported.", - // MessageType.error, - // ); - // } on Exception catch (e) { - // debugPrint(e.toString()); - // navigationService.showTalawaErrorSnackBar( - // "This QR is not for the App", - // MessageType.error, - // ); - // } - // } + } on Exception catch (e) { + debugPrint(e.toString()); + navigationService.showTalawaErrorSnackBar( + "The Camera is not working", + MessageType.error, + ); } - }); - -// void _onQRViewCreated(QRViewController controller) { -// controller.scannedDataStream.listen((scanData) { -// /// if the scanData is not empty. -// if (scanData.code!.isNotEmpty) { -// print(scanData.code); -// try { -// final List data = scanData.code!.split('?'); -// url.text = data[0]; -// final List queries = data[1].split('&'); -// orgId = queries[0].split('=')[1]; -// Vibration.vibrate(duration: 100); -// controller.stopCamera(); -// controller.dispose(); -// final box = Hive.box('url'); -// box.put(urlKey, url.text); -// box.put(imageUrlKey, "${url.text}/talawa/"); -// graphqlConfig.getOrgUrl(); -// Navigator.pop(navigationService.navigatorKey.currentContext!); -// navigationService.pushScreen('/selectOrg', arguments: orgId); -// } on CameraException catch (e) { -// debugPrint(e.toString()); -// navigationService.showTalawaErrorSnackBar( -// "The Camera is not working", -// MessageType.error, -// ); -// } on QrEmbeddedImageException catch (e) { -// debugPrint(e.toString()); -// navigationService.showTalawaErrorDialog( -// "The QR is not Working", -// MessageType.error, -// ); -// } on QrUnsupportedVersionException catch (e) { -// debugPrint(e.toString()); -// navigationService.showTalawaErrorDialog( -// "This QR version is not Supported.", -// MessageType.error, -// ); -// } on Exception catch (e) { -// debugPrint(e.toString()); -// navigationService.showTalawaErrorSnackBar( -// "This QR is not for the App", -// MessageType.error, -// ); -// } -// } -// }); -// } + } } } diff --git a/lib/views/after_auth_screens/join_org_after_auth/join_organisation_after_auth.dart b/lib/views/after_auth_screens/join_org_after_auth/join_organisation_after_auth.dart index b852614b5..97be010c5 100644 --- a/lib/views/after_auth_screens/join_org_after_auth/join_organisation_after_auth.dart +++ b/lib/views/after_auth_screens/join_org_after_auth/join_organisation_after_auth.dart @@ -1,9 +1,7 @@ // ignore_for_file: talawa_api_doc, talawa_good_doc_comments import 'package:flutter/material.dart'; -import 'dart:developer'; import 'package:mobile_scanner/mobile_scanner.dart'; -// import 'package:qr_code_scanner/qr_code_scanner.dart'; import 'package:talawa/enums/enums.dart'; import 'package:talawa/locator.dart'; import 'package:talawa/services/graphql_config.dart'; @@ -16,17 +14,26 @@ import 'package:talawa/widgets/organization_search_list.dart'; import 'package:vibration/vibration.dart'; /// JoinOrganisationAfterAuth returns a widget for page to join the organization just after user authentication. -class JoinOrganisationAfterAuth extends StatelessWidget { +class JoinOrganisationAfterAuth extends StatefulWidget { const JoinOrganisationAfterAuth({super.key, required this.orgId}); /// org identifier. /// final String orgId; + @override + State createState() => + _JoinOrganisationAfterAuthState(); +} + +class _JoinOrganisationAfterAuthState extends State { + /// qrController. + final MobileScannerController controller = MobileScannerController(); + @override Widget build(BuildContext context) { return BaseView( - onModelReady: (model) => model.initialise(orgId), + onModelReady: (model) => model.initialise(widget.orgId), builder: (context, model, child) { return Scaffold( key: const Key('JoinOrgScreen'), @@ -117,64 +124,54 @@ class JoinOrganisationAfterAuth extends StatelessWidget { width: 250, child: MobileScanner( fit: BoxFit.contain, - onDetectError: (error, stackTrace) { - log('On detect Error: $error'); - }, - errorBuilder: (p0, error, p2) { - if (error.errorCode == - MobileScannerErrorCode.permissionDenied) { - log('Camera permission was denied.'); - navigationService.showTalawaErrorSnackBar( - 'The Camera is not working', - MessageType.error, - ); - } else if (error.errorCode == - MobileScannerErrorCode.unsupported) { - log('This device does not support scanning.'); - navigationService.showTalawaErrorSnackBar( - 'Scanning is unsupported on this device', - MessageType.error, - ); - } else { - log('An unknown error occurred: $error'); + controller: controller, + errorBuilder: (ctx, error, _) { + String errorMessage = ''; + switch (error.errorCode) { + case MobileScannerErrorCode.controllerUninitialized: + errorMessage = 'camera is not ready'; + break; + case MobileScannerErrorCode.permissionDenied: + errorMessage = + 'Please provide camera permission to scan QR code'; + break; + case MobileScannerErrorCode.unsupported: + errorMessage = + 'This device does not support scanning.'; + break; + default: + errorMessage = 'An unkonwn error occurred'; + } + + WidgetsBinding.instance.addPostFrameCallback((_) { navigationService.showTalawaErrorSnackBar( - 'An unknown error occurred', + errorMessage, MessageType.error, ); - } - return const Text("Something went wrong"); + }); + + return Center( + child: Text( + errorMessage, + ), + ); }, - onDetect: (barcode) { - if (barcode.raw != null && barcode.barcodes.isNotEmpty) { - final String code = - barcode.barcodes.first.displayValue!; - // Handle the scanned QR code here - print('QR Code found: $code'); - } else { - print('Failed to scan QR Code'); - } + onDetect: (scanData) => _onQRViewCreated(scanData, model), + overlayBuilder: (context, constraints) { + return Container( + width: 250, + height: 250, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + border: Border.all( + color: Theme.of(context).colorScheme.secondary, + width: 10, + ), + ), + ); }, ), ), - - - // SizedBox( - // height: 250, - // width: 250, - // child: QRView( - // key: model.qrKey, - // onQRViewCreated: (controller) => - // _onQRViewCreated(controller, model), - // overlay: QrScannerOverlayShape( - // overlayColor: Theme.of(context).colorScheme.secondary, - // borderRadius: 10, - // borderLength: 20, - // borderWidth: 10, - // cutOutSize: 250, - // ), - // /*overlayMargin: EdgeInsets.all(50)*/ - // ), - // ), SizedBox( height: SizeConfig.safeBlockVertical! * 4, ), @@ -201,35 +198,33 @@ class JoinOrganisationAfterAuth extends StatelessWidget { /// **returns**: /// None void _onQRViewCreated( - MobileScannerController controller, + BarcodeCapture scanData, SelectOrganizationViewModel model, ) { - controller.barcodes.listen((scanData) { - if (scanData.barcodes.isNotEmpty) { - final String code = scanData.barcodes.first.displayValue!; - print(code); - try { - final List data = code.split('?'); - final String url = data[0]; - Vibration.vibrate(duration: 100); - if (url == GraphqlConfig.orgURI) { - final List queries = data[1].split('&'); - model.orgId = queries[0].split('=')[1]; - controller.stop(); - controller.dispose(); - Navigator.pop(navigationService.navigatorKey.currentContext!); - model.initialise(model.orgId); - } else { - navigationService.showTalawaErrorSnackBar( - "Organisation on different server, logout and scan qr again", - MessageType.error, - ); - } - } on Exception catch (e) { - print(e); - print('invalid app qr'); + if (scanData.raw != null && scanData.barcodes.isNotEmpty) { + final String code = scanData.barcodes.first.displayValue!; + print(code); + try { + final List data = code.split('?'); + final String url = data[0]; + Vibration.vibrate(duration: 100); + if (url == GraphqlConfig.orgURI) { + final List queries = data[1].split('&'); + model.orgId = queries[0].split('=')[1]; + controller.stop(); + controller.dispose(); + Navigator.pop(navigationService.navigatorKey.currentContext!); + model.initialise(model.orgId); + } else { + navigationService.showTalawaErrorSnackBar( + "Organisation on different server, logout and scan qr again", + MessageType.error, + ); } + } on Exception catch (e) { + print(e); + print('invalid app qr'); } - }); + } } } diff --git a/pubspec.lock b/pubspec.lock index 2d33d00a8..a66738058 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -495,10 +495,50 @@ packages: dependency: "direct main" description: name: flutter_secure_storage - sha256: "9f3dd2ac3b6875b0fde5b04734789c3ef35ba3965c18e99dd564a7a2f8056df6" + sha256: "9cad52d75ebc511adfae3d447d5d13da15a55a92c9410e50f67335b6d21d16ea" url: "https://pub.dev" source: hosted - version: "4.2.1" + version: "9.2.4" + flutter_secure_storage_linux: + dependency: transitive + description: + name: flutter_secure_storage_linux + sha256: bf7404619d7ab5c0a1151d7c4e802edad8f33535abfbeff2f9e1fe1274e2d705 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + flutter_secure_storage_macos: + dependency: transitive + description: + name: flutter_secure_storage_macos + sha256: "6c0a2795a2d1de26ae202a0d78527d163f4acbb11cde4c75c670f3a0fc064247" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + flutter_secure_storage_platform_interface: + dependency: transitive + description: + name: flutter_secure_storage_platform_interface + sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8 + url: "https://pub.dev" + source: hosted + version: "1.1.2" + flutter_secure_storage_web: + dependency: transitive + description: + name: flutter_secure_storage_web + sha256: f4ebff989b4f07b2656fb16b47852c0aab9fed9b4ec1c70103368337bc1886a9 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + flutter_secure_storage_windows: + dependency: transitive + description: + name: flutter_secure_storage_windows + sha256: b20b07cb5ed4ed74fc567b78a72936203f587eba460af1df11281c9326cd3709 + url: "https://pub.dev" + source: hosted + version: "3.1.2" flutter_shaders: dependency: transitive description: @@ -713,26 +753,26 @@ packages: dependency: "direct main" description: name: image_cropper - sha256: db779a8b620cd509874cb0e2a8bdc8649177f8f5ca46c13273ceaffe071e3f4a + sha256: "41617c3b0ede2f398021b3b76d5e1a94cced0d52207cad1c718a9cf24a76c99d" url: "https://pub.dev" source: hosted - version: "6.0.0" + version: "8.0.0" image_cropper_for_web: dependency: transitive description: name: image_cropper_for_web - sha256: ba67de40a98b3294084eed0b025b557cb594356e1171c9a830b340527dbd5e5f + sha256: "34256c8fb7fcb233251787c876bb37271744459b593a948a2db73caa323034d0" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "6.0.2" image_cropper_platform_interface: dependency: transitive description: name: image_cropper_platform_interface - sha256: ee160d686422272aa306125f3b6fb1c1894d9b87a5e20ed33fa008e7285da11e + sha256: e8e9d2ca36360387aee39295ce49029362ae4df3071f23e8e71f2b81e40b7531 url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "7.0.0" image_picker: dependency: "direct main" description: @@ -817,10 +857,10 @@ packages: dependency: transitive description: name: js - sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.7.1" + version: "0.6.7" json_annotation: dependency: "direct main" description: @@ -913,10 +953,10 @@ packages: dependency: "direct main" description: name: mobile_scanner - sha256: "728828a798d1a2ee506beb652ca23d974c542c96ed03dcbd5eaf97bef96cdaad" + sha256: "57d6269d10912d5d583606b46d963d7c5d0299d2c37add8b7192dd769d40a319" url: "https://pub.dev" source: hosted - version: "6.0.2" + version: "6.0.3" mockito: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index ea8dfac4e..38618fba7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -43,7 +43,7 @@ dependencies: flutter_localizations: sdk: flutter flutter_reaction_button: ^3.0.0+3 - flutter_secure_storage: ^4.2.1 + flutter_secure_storage: ^9.2.2 flutter_speed_dial: ^7.0.0 flutter_svg: ^2.0.16 font_awesome_flutter: ^10.8.0 @@ -51,10 +51,11 @@ dependencies: graphql_flutter: ^5.1.2 hive: ^2.2.3 http: ^1.2.2 - image_cropper: ^6.0.0 + image_cropper: 8.0.0 image_picker: ^1.1.2 intl: ^0.19.0 json_annotation: ^4.7.0 + mobile_scanner: ^6.0.2 mockito: ^5.4.4 network_image_mock: ^2.1.1 path_provider: ^2.1.5 @@ -62,8 +63,6 @@ dependencies: plugin_platform_interface: ^2.1.7 pointycastle: ^3.9.1 provider: ^6.1.2 - # qr_code_scanner: - mobile_scanner: ^6.0.2 qr_flutter: 4.1.0 quick_actions: ^1.0.8 shared_preferences: ^2.3.3 diff --git a/test/helpers/test_helpers.dart b/test/helpers/test_helpers.dart index f8e453385..cd97c136b 100644 --- a/test/helpers/test_helpers.dart +++ b/test/helpers/test_helpers.dart @@ -1,12 +1,13 @@ import 'dart:async'; + import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:flutter/material.dart'; import 'package:graphql_flutter/graphql_flutter.dart'; import 'package:image_cropper/image_cropper.dart'; import 'package:image_picker/image_picker.dart'; +import 'package:mobile_scanner/mobile_scanner.dart'; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; -import 'package:qr_code_scanner/qr_code_scanner.dart'; import 'package:talawa/enums/enums.dart'; import 'package:talawa/locator.dart'; import 'package:talawa/models/chats/chat_list_tile_data_model.dart'; @@ -86,7 +87,9 @@ import 'test_helpers.mocks.dart'; onMissingStub: OnMissingStub.returnDefault, ), MockSpec(onMissingStub: OnMissingStub.returnDefault), - MockSpec(onMissingStub: OnMissingStub.returnDefault), + MockSpec( + onMissingStub: OnMissingStub.returnDefault, + ), MockSpec(onMissingStub: OnMissingStub.returnDefault), MockSpec(onMissingStub: OnMissingStub.returnDefault), MockSpec(onMissingStub: OnMissingStub.returnDefault), diff --git a/test/helpers/test_helpers.mocks.dart b/test/helpers/test_helpers.mocks.dart index 417efbb51..7e3eb492b 100644 --- a/test/helpers/test_helpers.mocks.dart +++ b/test/helpers/test_helpers.mocks.dart @@ -3,55 +3,58 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i5; -import 'dart:io' as _i20; +import 'dart:async' as _i6; +import 'dart:io' as _i21; import 'dart:ui' as _i10; import 'package:flutter/material.dart' as _i1; +import 'package:flutter_secure_storage/flutter_secure_storage.dart' as _i11; import 'package:graphql_flutter/graphql_flutter.dart' as _i3; -import 'package:image_cropper/src/cropper.dart' as _i41; +import 'package:image_cropper/src/cropper.dart' as _i44; import 'package:image_cropper_platform_interface/image_cropper_platform_interface.dart' - as _i42; -import 'package:image_picker/image_picker.dart' as _i13; + as _i45; +import 'package:image_picker/image_picker.dart' as _i14; +import 'package:mobile_scanner/src/enums/barcode_format.dart' as _i37; +import 'package:mobile_scanner/src/enums/camera_facing.dart' as _i36; +import 'package:mobile_scanner/src/enums/detection_speed.dart' as _i35; +import 'package:mobile_scanner/src/mobile_scanner_controller.dart' as _i34; +import 'package:mobile_scanner/src/objects/barcode_capture.dart' as _i38; +import 'package:mobile_scanner/src/objects/mobile_scanner_state.dart' as _i13; import 'package:mockito/mockito.dart' as _i2; -import 'package:mockito/src/dummies.dart' as _i18; -import 'package:qr_code_scanner/src/qr_code_scanner.dart' as _i33; -import 'package:qr_code_scanner/src/types/barcode.dart' as _i34; -import 'package:qr_code_scanner/src/types/camera.dart' as _i35; -import 'package:qr_code_scanner/src/types/features.dart' as _i12; -import 'package:talawa/enums/enums.dart' as _i14; -import 'package:talawa/models/chats/chat_list_tile_data_model.dart' as _i24; -import 'package:talawa/models/chats/chat_message.dart' as _i25; -import 'package:talawa/models/events/event_model.dart' as _i21; -import 'package:talawa/models/events/event_venue.dart' as _i39; -import 'package:talawa/models/events/event_volunteer_group.dart' as _i22; -import 'package:talawa/models/organization/org_info.dart' as _i6; -import 'package:talawa/models/post/post_model.dart' as _i17; +import 'package:mockito/src/dummies.dart' as _i19; +import 'package:talawa/enums/enums.dart' as _i15; +import 'package:talawa/models/chats/chat_list_tile_data_model.dart' as _i25; +import 'package:talawa/models/chats/chat_message.dart' as _i26; +import 'package:talawa/models/events/event_model.dart' as _i22; +import 'package:talawa/models/events/event_venue.dart' as _i42; +import 'package:talawa/models/events/event_volunteer_group.dart' as _i23; +import 'package:talawa/models/organization/org_info.dart' as _i5; +import 'package:talawa/models/post/post_model.dart' as _i18; import 'package:talawa/models/user/user_info.dart' as _i7; -import 'package:talawa/services/chat_service.dart' as _i23; -import 'package:talawa/services/comment_service.dart' as _i36; +import 'package:talawa/services/chat_service.dart' as _i24; +import 'package:talawa/services/comment_service.dart' as _i39; import 'package:talawa/services/database_mutation_functions.dart' as _i9; -import 'package:talawa/services/event_service.dart' as _i11; -import 'package:talawa/services/graphql_config.dart' as _i15; +import 'package:talawa/services/event_service.dart' as _i12; +import 'package:talawa/services/graphql_config.dart' as _i16; import 'package:talawa/services/navigation_service.dart' as _i8; -import 'package:talawa/services/org_service.dart' as _i29; -import 'package:talawa/services/post_service.dart' as _i16; +import 'package:talawa/services/org_service.dart' as _i30; +import 'package:talawa/services/post_service.dart' as _i17; import 'package:talawa/services/third_party_service/multi_media_pick_service.dart' - as _i19; -import 'package:talawa/services/user_config.dart' as _i26; -import 'package:talawa/utils/validators.dart' as _i32; + as _i20; +import 'package:talawa/services/user_config.dart' as _i27; +import 'package:talawa/utils/validators.dart' as _i33; import 'package:talawa/view_model/after_auth_view_models/chat_view_models/direct_chat_view_model.dart' - as _i40; + as _i43; import 'package:talawa/view_model/after_auth_view_models/event_view_models/create_event_view_model.dart' - as _i38; + as _i41; import 'package:talawa/view_model/after_auth_view_models/event_view_models/explore_events_view_model.dart' - as _i30; -import 'package:talawa/view_model/after_auth_view_models/feed_view_models/organization_feed_view_model.dart' as _i31; -import 'package:talawa/view_model/lang_view_model.dart' as _i27; +import 'package:talawa/view_model/after_auth_view_models/feed_view_models/organization_feed_view_model.dart' + as _i32; +import 'package:talawa/view_model/lang_view_model.dart' as _i28; import 'package:talawa/view_model/pre_auth_view_models/signup_details_view_model.dart' - as _i28; -import 'package:talawa/view_model/theme_view_model.dart' as _i37; + as _i29; +import 'package:talawa/view_model/theme_view_model.dart' as _i40; import 'package:talawa/widgets/custom_alert_dialog.dart' as _i4; // ignore_for_file: type=lint @@ -186,9 +189,8 @@ class _FakeCustomAlertDialog_10 extends _i2.SmartFake super.toString(); } -class _FakeStreamController_11 extends _i2.SmartFake - implements _i5.StreamController { - _FakeStreamController_11( +class _FakeOrgInfo_11 extends _i2.SmartFake implements _i5.OrgInfo { + _FakeOrgInfo_11( Object parent, Invocation parentInvocation, ) : super( @@ -197,8 +199,9 @@ class _FakeStreamController_11 extends _i2.SmartFake ); } -class _FakeOrgInfo_12 extends _i2.SmartFake implements _i6.OrgInfo { - _FakeOrgInfo_12( +class _FakeStreamController_12 extends _i2.SmartFake + implements _i6.StreamController { + _FakeStreamController_12( Object parent, Invocation parentInvocation, ) : super( @@ -249,9 +252,20 @@ class _FakeLocale_16 extends _i2.SmartFake implements _i10.Locale { ); } -class _FakeTextEditingController_17 extends _i2.SmartFake +class _FakeFlutterSecureStorage_17 extends _i2.SmartFake + implements _i11.FlutterSecureStorage { + _FakeFlutterSecureStorage_17( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTextEditingController_18 extends _i2.SmartFake implements _i1.TextEditingController { - _FakeTextEditingController_17( + _FakeTextEditingController_18( Object parent, Invocation parentInvocation, ) : super( @@ -260,8 +274,8 @@ class _FakeTextEditingController_17 extends _i2.SmartFake ); } -class _FakeFocusNode_18 extends _i2.SmartFake implements _i1.FocusNode { - _FakeFocusNode_18( +class _FakeFocusNode_19 extends _i2.SmartFake implements _i1.FocusNode { + _FakeFocusNode_19( Object parent, Invocation parentInvocation, ) : super( @@ -274,8 +288,8 @@ class _FakeFocusNode_18 extends _i2.SmartFake implements _i1.FocusNode { super.toString(); } -class _FakeEventService_19 extends _i2.SmartFake implements _i11.EventService { - _FakeEventService_19( +class _FakeEventService_20 extends _i2.SmartFake implements _i12.EventService { + _FakeEventService_20( Object parent, Invocation parentInvocation, ) : super( @@ -284,9 +298,9 @@ class _FakeEventService_19 extends _i2.SmartFake implements _i11.EventService { ); } -class _FakeSystemFeatures_20 extends _i2.SmartFake - implements _i12.SystemFeatures { - _FakeSystemFeatures_20( +class _FakeMobileScannerState_21 extends _i2.SmartFake + implements _i13.MobileScannerState { + _FakeMobileScannerState_21( Object parent, Invocation parentInvocation, ) : super( @@ -295,8 +309,8 @@ class _FakeSystemFeatures_20 extends _i2.SmartFake ); } -class _FakeThemeData_21 extends _i2.SmartFake implements _i1.ThemeData { - _FakeThemeData_21( +class _FakeWidget_22 extends _i2.SmartFake implements _i1.Widget { + _FakeWidget_22( Object parent, Invocation parentInvocation, ) : super( @@ -309,18 +323,22 @@ class _FakeThemeData_21 extends _i2.SmartFake implements _i1.ThemeData { super.toString(); } -class _FakeTimeOfDay_22 extends _i2.SmartFake implements _i1.TimeOfDay { - _FakeTimeOfDay_22( +class _FakeThemeData_23 extends _i2.SmartFake implements _i1.ThemeData { + _FakeThemeData_23( Object parent, Invocation parentInvocation, ) : super( parent, parentInvocation, ); + + @override + String toString({_i1.DiagnosticLevel? minLevel = _i1.DiagnosticLevel.info}) => + super.toString(); } -class _FakeDateTime_23 extends _i2.SmartFake implements DateTime { - _FakeDateTime_23( +class _FakeTimeOfDay_24 extends _i2.SmartFake implements _i1.TimeOfDay { + _FakeTimeOfDay_24( Object parent, Invocation parentInvocation, ) : super( @@ -329,9 +347,19 @@ class _FakeDateTime_23 extends _i2.SmartFake implements DateTime { ); } -class _FakeLostDataResponse_24 extends _i2.SmartFake - implements _i13.LostDataResponse { - _FakeLostDataResponse_24( +class _FakeDateTime_25 extends _i2.SmartFake implements DateTime { + _FakeDateTime_25( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeLostDataResponse_26 extends _i2.SmartFake + implements _i14.LostDataResponse { + _FakeLostDataResponse_26( Object parent, Invocation parentInvocation, ) : super( @@ -368,7 +396,7 @@ class MockNavigationService extends _i2.Mock implements _i8.NavigationService { ); @override - _i5.Future pushScreen( + _i6.Future pushScreen( String? routeName, { dynamic arguments, }) => @@ -378,12 +406,12 @@ class MockNavigationService extends _i2.Mock implements _i8.NavigationService { [routeName], {#arguments: arguments}, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future popAndPushScreen( + _i6.Future popAndPushScreen( String? routeName, { dynamic arguments, }) => @@ -393,12 +421,12 @@ class MockNavigationService extends _i2.Mock implements _i8.NavigationService { [routeName], {#arguments: arguments}, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future pushReplacementScreen( + _i6.Future pushReplacementScreen( String? routeName, { dynamic arguments, }) => @@ -408,12 +436,12 @@ class MockNavigationService extends _i2.Mock implements _i8.NavigationService { [routeName], {#arguments: arguments}, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future removeAllAndPush( + _i6.Future removeAllAndPush( String? routeName, String? tillRoute, { dynamic arguments, @@ -427,9 +455,9 @@ class MockNavigationService extends _i2.Mock implements _i8.NavigationService { ], {#arguments: arguments}, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override void pushDialog(_i1.Widget? dialog) => super.noSuchMethod( @@ -457,7 +485,7 @@ class MockNavigationService extends _i2.Mock implements _i8.NavigationService { @override void showTalawaErrorSnackBar( String? errorMessage, - _i14.MessageType? messageType, + _i15.MessageType? messageType, ) => super.noSuchMethod( Invocation.method( @@ -473,7 +501,7 @@ class MockNavigationService extends _i2.Mock implements _i8.NavigationService { @override void showTalawaErrorDialog( String? errorMessage, - _i14.MessageType? messageType, + _i15.MessageType? messageType, ) => super.noSuchMethod( Invocation.method( @@ -517,7 +545,7 @@ class MockNavigationService extends _i2.Mock implements _i8.NavigationService { /// A class which mocks [GraphqlConfig]. /// /// See the documentation for Mockito's code generation for more information. -class MockGraphqlConfig extends _i2.Mock implements _i15.GraphqlConfig { +class MockGraphqlConfig extends _i2.Mock implements _i16.GraphqlConfig { @override _i3.HttpLink get httpLink => (super.noSuchMethod( Invocation.getter(#httpLink), @@ -572,14 +600,14 @@ class MockGraphqlConfig extends _i2.Mock implements _i15.GraphqlConfig { ); @override - _i5.Future getToken() => (super.noSuchMethod( + _i6.Future getToken() => (super.noSuchMethod( Invocation.method( #getToken, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override void getOrgUrl() => super.noSuchMethod( @@ -814,14 +842,14 @@ class MockGraphQLClient extends _i2.Mock implements _i3.GraphQLClient { ) as _i3.ObservableQuery); @override - _i5.Future<_i3.QueryResult> query( + _i6.Future<_i3.QueryResult> query( _i3.QueryOptions? options) => (super.noSuchMethod( Invocation.method( #query, [options], ), - returnValue: _i5.Future<_i3.QueryResult>.value( + returnValue: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -829,7 +857,7 @@ class MockGraphQLClient extends _i2.Mock implements _i3.GraphQLClient { [options], ), )), - returnValueForMissingStub: _i5.Future<_i3.QueryResult>.value( + returnValueForMissingStub: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -837,17 +865,17 @@ class MockGraphQLClient extends _i2.Mock implements _i3.GraphQLClient { [options], ), )), - ) as _i5.Future<_i3.QueryResult>); + ) as _i6.Future<_i3.QueryResult>); @override - _i5.Future<_i3.QueryResult> mutate( + _i6.Future<_i3.QueryResult> mutate( _i3.MutationOptions? options) => (super.noSuchMethod( Invocation.method( #mutate, [options], ), - returnValue: _i5.Future<_i3.QueryResult>.value( + returnValue: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -855,7 +883,7 @@ class MockGraphQLClient extends _i2.Mock implements _i3.GraphQLClient { [options], ), )), - returnValueForMissingStub: _i5.Future<_i3.QueryResult>.value( + returnValueForMissingStub: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -863,22 +891,22 @@ class MockGraphQLClient extends _i2.Mock implements _i3.GraphQLClient { [options], ), )), - ) as _i5.Future<_i3.QueryResult>); + ) as _i6.Future<_i3.QueryResult>); @override - _i5.Stream<_i3.QueryResult> subscribe( + _i6.Stream<_i3.QueryResult> subscribe( _i3.SubscriptionOptions? options) => (super.noSuchMethod( Invocation.method( #subscribe, [options], ), - returnValue: _i5.Stream<_i3.QueryResult>.empty(), - returnValueForMissingStub: _i5.Stream<_i3.QueryResult>.empty(), - ) as _i5.Stream<_i3.QueryResult>); + returnValue: _i6.Stream<_i3.QueryResult>.empty(), + returnValueForMissingStub: _i6.Stream<_i3.QueryResult>.empty(), + ) as _i6.Stream<_i3.QueryResult>); @override - _i5.Future<_i3.QueryResult> fetchMore( + _i6.Future<_i3.QueryResult> fetchMore( _i3.FetchMoreOptions? fetchMoreOptions, { required _i3.QueryOptions? originalOptions, required _i3.QueryResult? previousResult, @@ -892,7 +920,7 @@ class MockGraphQLClient extends _i2.Mock implements _i3.GraphQLClient { #previousResult: previousResult, }, ), - returnValue: _i5.Future<_i3.QueryResult>.value( + returnValue: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -904,7 +932,7 @@ class MockGraphQLClient extends _i2.Mock implements _i3.GraphQLClient { }, ), )), - returnValueForMissingStub: _i5.Future<_i3.QueryResult>.value( + returnValueForMissingStub: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -916,7 +944,7 @@ class MockGraphQLClient extends _i2.Mock implements _i3.GraphQLClient { }, ), )), - ) as _i5.Future<_i3.QueryResult>); + ) as _i6.Future<_i3.QueryResult>); @override Map? readQuery( @@ -983,7 +1011,7 @@ class MockGraphQLClient extends _i2.Mock implements _i3.GraphQLClient { ); @override - _i5.Future?>>? resetStore( + _i6.Future?>>? resetStore( {bool? refetchQueries = true}) => (super.noSuchMethod( Invocation.method( @@ -992,13 +1020,13 @@ class MockGraphQLClient extends _i2.Mock implements _i3.GraphQLClient { {#refetchQueries: refetchQueries}, ), returnValueForMissingStub: null, - ) as _i5.Future?>>?); + ) as _i6.Future?>>?); } /// A class which mocks [PostService]. /// /// See the documentation for Mockito's code generation for more information. -class MockPostService extends _i2.Mock implements _i16.PostService { +class MockPostService extends _i2.Mock implements _i17.PostService { @override set postInfo(Map? _postInfo) => super.noSuchMethod( Invocation.setter( @@ -1045,42 +1073,42 @@ class MockPostService extends _i2.Mock implements _i16.PostService { ); @override - _i5.Stream> get postStream => (super.noSuchMethod( + _i6.Stream> get postStream => (super.noSuchMethod( Invocation.getter(#postStream), - returnValue: _i5.Stream>.empty(), - returnValueForMissingStub: _i5.Stream>.empty(), - ) as _i5.Stream>); + returnValue: _i6.Stream>.empty(), + returnValueForMissingStub: _i6.Stream>.empty(), + ) as _i6.Stream>); @override - _i5.Stream<_i17.Post> get updatedPostStream => (super.noSuchMethod( + _i6.Stream<_i18.Post> get updatedPostStream => (super.noSuchMethod( Invocation.getter(#updatedPostStream), - returnValue: _i5.Stream<_i17.Post>.empty(), - returnValueForMissingStub: _i5.Stream<_i17.Post>.empty(), - ) as _i5.Stream<_i17.Post>); + returnValue: _i6.Stream<_i18.Post>.empty(), + returnValueForMissingStub: _i6.Stream<_i18.Post>.empty(), + ) as _i6.Stream<_i18.Post>); @override String get cacheKey => (super.noSuchMethod( Invocation.getter(#cacheKey), - returnValue: _i18.dummyValue( + returnValue: _i19.dummyValue( this, Invocation.getter(#cacheKey), ), - returnValueForMissingStub: _i18.dummyValue( + returnValueForMissingStub: _i19.dummyValue( this, Invocation.getter(#cacheKey), ), ) as String); @override - _i5.Future> fetchDataFromApi() => (super.noSuchMethod( + _i6.Future> fetchDataFromApi() => (super.noSuchMethod( Invocation.method( #fetchDataFromApi, [], ), - returnValue: _i5.Future>.value(<_i17.Post>[]), + returnValue: _i6.Future>.value(<_i18.Post>[]), returnValueForMissingStub: - _i5.Future>.value(<_i17.Post>[]), - ) as _i5.Future>); + _i6.Future>.value(<_i18.Post>[]), + ) as _i6.Future>); @override void setOrgStreamSubscription() => super.noSuchMethod( @@ -1092,37 +1120,37 @@ class MockPostService extends _i2.Mock implements _i16.PostService { ); @override - _i5.Future fetchPostsInitial() => (super.noSuchMethod( + _i6.Future fetchPostsInitial() => (super.noSuchMethod( Invocation.method( #fetchPostsInitial, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future getPosts() => (super.noSuchMethod( + _i6.Future getPosts() => (super.noSuchMethod( Invocation.method( #getPosts, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future refreshFeed() => (super.noSuchMethod( + _i6.Future refreshFeed() => (super.noSuchMethod( Invocation.method( #refreshFeed, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - void addNewpost(_i17.Post? newPost) => super.noSuchMethod( + void addNewpost(_i18.Post? newPost) => super.noSuchMethod( Invocation.method( #addNewpost, [newPost], @@ -1131,13 +1159,13 @@ class MockPostService extends _i2.Mock implements _i16.PostService { ); @override - _i5.Future<_i3.QueryResult> deletePost(_i17.Post? post) => + _i6.Future<_i3.QueryResult> deletePost(_i18.Post? post) => (super.noSuchMethod( Invocation.method( #deletePost, [post], ), - returnValue: _i5.Future<_i3.QueryResult>.value( + returnValue: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -1145,7 +1173,7 @@ class MockPostService extends _i2.Mock implements _i16.PostService { [post], ), )), - returnValueForMissingStub: _i5.Future<_i3.QueryResult>.value( + returnValueForMissingStub: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -1153,27 +1181,27 @@ class MockPostService extends _i2.Mock implements _i16.PostService { [post], ), )), - ) as _i5.Future<_i3.QueryResult>); + ) as _i6.Future<_i3.QueryResult>); @override - _i5.Future addLike(String? postID) => (super.noSuchMethod( + _i6.Future addLike(String? postID) => (super.noSuchMethod( Invocation.method( #addLike, [postID], ), - returnValue: _i5.Future.value(false), - returnValueForMissingStub: _i5.Future.value(false), - ) as _i5.Future); + returnValue: _i6.Future.value(false), + returnValueForMissingStub: _i6.Future.value(false), + ) as _i6.Future); @override - _i5.Future removeLike(String? postID) => (super.noSuchMethod( + _i6.Future removeLike(String? postID) => (super.noSuchMethod( Invocation.method( #removeLike, [postID], ), - returnValue: _i5.Future.value(false), - returnValueForMissingStub: _i5.Future.value(false), - ) as _i5.Future); + returnValue: _i6.Future.value(false), + returnValueForMissingStub: _i6.Future.value(false), + ) as _i6.Future); @override void addCommentLocally(String? postID) => super.noSuchMethod( @@ -1185,83 +1213,83 @@ class MockPostService extends _i2.Mock implements _i16.PostService { ); @override - _i5.Future nextPage() => (super.noSuchMethod( + _i6.Future nextPage() => (super.noSuchMethod( Invocation.method( #nextPage, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future previousPage() => (super.noSuchMethod( + _i6.Future previousPage() => (super.noSuchMethod( Invocation.method( #previousPage, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future> loadCachedData() => (super.noSuchMethod( + _i6.Future> loadCachedData() => (super.noSuchMethod( Invocation.method( #loadCachedData, [], ), - returnValue: _i5.Future>.value(<_i17.Post>[]), + returnValue: _i6.Future>.value(<_i18.Post>[]), returnValueForMissingStub: - _i5.Future>.value(<_i17.Post>[]), - ) as _i5.Future>); + _i6.Future>.value(<_i18.Post>[]), + ) as _i6.Future>); @override - _i5.Future saveDataToCache(List<_i17.Post>? data) => + _i6.Future saveDataToCache(List<_i18.Post>? data) => (super.noSuchMethod( Invocation.method( #saveDataToCache, [data], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future> getNewFeedAndRefreshCache() => + _i6.Future> getNewFeedAndRefreshCache() => (super.noSuchMethod( Invocation.method( #getNewFeedAndRefreshCache, [], ), - returnValue: _i5.Future>.value(<_i17.Post>[]), + returnValue: _i6.Future>.value(<_i18.Post>[]), returnValueForMissingStub: - _i5.Future>.value(<_i17.Post>[]), - ) as _i5.Future>); + _i6.Future>.value(<_i18.Post>[]), + ) as _i6.Future>); } /// A class which mocks [MultiMediaPickerService]. /// /// See the documentation for Mockito's code generation for more information. class MockMultiMediaPickerService extends _i2.Mock - implements _i19.MultiMediaPickerService { + implements _i20.MultiMediaPickerService { @override - _i5.Stream get fileStream => (super.noSuchMethod( + _i6.Stream get fileStream => (super.noSuchMethod( Invocation.getter(#fileStream), - returnValue: _i5.Stream.empty(), - returnValueForMissingStub: _i5.Stream.empty(), - ) as _i5.Stream); + returnValue: _i6.Stream.empty(), + returnValueForMissingStub: _i6.Stream.empty(), + ) as _i6.Stream); @override - _i5.Future<_i20.File?> getPhotoFromGallery({bool? camera = false}) => + _i6.Future<_i21.File?> getPhotoFromGallery({bool? camera = false}) => (super.noSuchMethod( Invocation.method( #getPhotoFromGallery, [], {#camera: camera}, ), - returnValue: _i5.Future<_i20.File?>.value(), - returnValueForMissingStub: _i5.Future<_i20.File?>.value(), - ) as _i5.Future<_i20.File?>); + returnValue: _i6.Future<_i21.File?>.value(), + returnValueForMissingStub: _i6.Future<_i21.File?>.value(), + ) as _i6.Future<_i21.File?>); @override _i4.CustomAlertDialog permissionDeniedDialog() => (super.noSuchMethod( @@ -1289,57 +1317,70 @@ class MockMultiMediaPickerService extends _i2.Mock /// A class which mocks [EventService]. /// /// See the documentation for Mockito's code generation for more information. -class MockEventService extends _i2.Mock implements _i11.EventService { +class MockEventService extends _i2.Mock implements _i12.EventService { @override - _i5.Stream> get eventStream => (super.noSuchMethod( + _i6.Stream> get eventStream => (super.noSuchMethod( Invocation.getter(#eventStream), - returnValue: _i5.Stream>.empty(), - returnValueForMissingStub: _i5.Stream>.empty(), - ) as _i5.Stream>); + returnValue: _i6.Stream>.empty(), + returnValueForMissingStub: _i6.Stream>.empty(), + ) as _i6.Stream>); + + @override + _i5.OrgInfo get currentOrg => (super.noSuchMethod( + Invocation.getter(#currentOrg), + returnValue: _FakeOrgInfo_11( + this, + Invocation.getter(#currentOrg), + ), + returnValueForMissingStub: _FakeOrgInfo_11( + this, + Invocation.getter(#currentOrg), + ), + ) as _i5.OrgInfo); @override String get cacheKey => (super.noSuchMethod( Invocation.getter(#cacheKey), - returnValue: _i18.dummyValue( + returnValue: _i19.dummyValue( this, Invocation.getter(#cacheKey), ), - returnValueForMissingStub: _i18.dummyValue( + returnValueForMissingStub: _i19.dummyValue( this, Invocation.getter(#cacheKey), ), ) as String); @override - _i5.Future> fetchDataFromApi() => (super.noSuchMethod( + _i6.Future> fetchDataFromApi() => (super.noSuchMethod( Invocation.method( #fetchDataFromApi, [], ), - returnValue: _i5.Future>.value(<_i21.Event>[]), + returnValue: _i6.Future>.value(<_i22.Event>[]), returnValueForMissingStub: - _i5.Future>.value(<_i21.Event>[]), - ) as _i5.Future>); + _i6.Future>.value(<_i22.Event>[]), + ) as _i6.Future>); @override - _i5.Future fetchEventsInitial() => (super.noSuchMethod( + _i6.Future fetchEventsInitial() => (super.noSuchMethod( Invocation.method( #fetchEventsInitial, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future refreshFeed() => (super.noSuchMethod( + _i6.Future refreshFeed() => (super.noSuchMethod( Invocation.method( #refreshFeed, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override void setOrgStreamSubscription() => super.noSuchMethod( @@ -1351,7 +1392,7 @@ class MockEventService extends _i2.Mock implements _i11.EventService { ); @override - _i5.Future<_i3.QueryResult> createEvent( + _i6.Future<_i3.QueryResult> createEvent( {required Map? variables}) => (super.noSuchMethod( Invocation.method( @@ -1359,7 +1400,7 @@ class MockEventService extends _i2.Mock implements _i11.EventService { [], {#variables: variables}, ), - returnValue: _i5.Future<_i3.QueryResult>.value( + returnValue: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -1368,7 +1409,7 @@ class MockEventService extends _i2.Mock implements _i11.EventService { {#variables: variables}, ), )), - returnValueForMissingStub: _i5.Future<_i3.QueryResult>.value( + returnValueForMissingStub: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -1377,48 +1418,48 @@ class MockEventService extends _i2.Mock implements _i11.EventService { {#variables: variables}, ), )), - ) as _i5.Future<_i3.QueryResult>); + ) as _i6.Future<_i3.QueryResult>); @override - _i5.Future getEvents() => (super.noSuchMethod( + _i6.Future getEvents() => (super.noSuchMethod( Invocation.method( #getEvents, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future fetchAttendeesByEvent(String? eventId) => + _i6.Future fetchAttendeesByEvent(String? eventId) => (super.noSuchMethod( Invocation.method( #fetchAttendeesByEvent, [eventId], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future registerForAnEvent(String? eventId) => + _i6.Future registerForAnEvent(String? eventId) => (super.noSuchMethod( Invocation.method( #registerForAnEvent, [eventId], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future<_i3.QueryResult> deleteEvent(String? eventId) => + _i6.Future<_i3.QueryResult> deleteEvent(String? eventId) => (super.noSuchMethod( Invocation.method( #deleteEvent, [eventId], ), - returnValue: _i5.Future<_i3.QueryResult>.value( + returnValue: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -1426,7 +1467,7 @@ class MockEventService extends _i2.Mock implements _i11.EventService { [eventId], ), )), - returnValueForMissingStub: _i5.Future<_i3.QueryResult>.value( + returnValueForMissingStub: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -1434,10 +1475,10 @@ class MockEventService extends _i2.Mock implements _i11.EventService { [eventId], ), )), - ) as _i5.Future<_i3.QueryResult>); + ) as _i6.Future<_i3.QueryResult>); @override - _i5.Future<_i3.QueryResult> editEvent({ + _i6.Future<_i3.QueryResult> editEvent({ required String? eventId, required Map? variables, }) => @@ -1450,7 +1491,7 @@ class MockEventService extends _i2.Mock implements _i11.EventService { #variables: variables, }, ), - returnValue: _i5.Future<_i3.QueryResult>.value( + returnValue: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -1462,7 +1503,7 @@ class MockEventService extends _i2.Mock implements _i11.EventService { }, ), )), - returnValueForMissingStub: _i5.Future<_i3.QueryResult>.value( + returnValueForMissingStub: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -1474,114 +1515,114 @@ class MockEventService extends _i2.Mock implements _i11.EventService { }, ), )), - ) as _i5.Future<_i3.QueryResult>); + ) as _i6.Future<_i3.QueryResult>); @override - _i5.Future createVolunteerGroup(Map? variables) => + _i6.Future createVolunteerGroup(Map? variables) => (super.noSuchMethod( Invocation.method( #createVolunteerGroup, [variables], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future removeVolunteerGroup(Map? variables) => + _i6.Future removeVolunteerGroup(Map? variables) => (super.noSuchMethod( Invocation.method( #removeVolunteerGroup, [variables], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future addVolunteerToGroup(Map? variables) => + _i6.Future addVolunteerToGroup(Map? variables) => (super.noSuchMethod( Invocation.method( #addVolunteerToGroup, [variables], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future removeVolunteerFromGroup( + _i6.Future removeVolunteerFromGroup( Map? variables) => (super.noSuchMethod( Invocation.method( #removeVolunteerFromGroup, [variables], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future updateVolunteerGroup(Map? variables) => + _i6.Future updateVolunteerGroup(Map? variables) => (super.noSuchMethod( Invocation.method( #updateVolunteerGroup, [variables], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future> fetchVolunteerGroupsByEvent( + _i6.Future> fetchVolunteerGroupsByEvent( String? eventId) => (super.noSuchMethod( Invocation.method( #fetchVolunteerGroupsByEvent, [eventId], ), - returnValue: _i5.Future>.value( - <_i22.EventVolunteerGroup>[]), + returnValue: _i6.Future>.value( + <_i23.EventVolunteerGroup>[]), returnValueForMissingStub: - _i5.Future>.value( - <_i22.EventVolunteerGroup>[]), - ) as _i5.Future>); + _i6.Future>.value( + <_i23.EventVolunteerGroup>[]), + ) as _i6.Future>); @override - _i5.Future fetchAgendaCategories(String? orgId) => + _i6.Future fetchAgendaCategories(String? orgId) => (super.noSuchMethod( Invocation.method( #fetchAgendaCategories, [orgId], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future createAgendaItem(Map? variables) => + _i6.Future createAgendaItem(Map? variables) => (super.noSuchMethod( Invocation.method( #createAgendaItem, [variables], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future deleteAgendaItem(Map? variables) => + _i6.Future deleteAgendaItem(Map? variables) => (super.noSuchMethod( Invocation.method( #deleteAgendaItem, [variables], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future updateAgendaItem( + _i6.Future updateAgendaItem( String? itemId, Map? variables, ) => @@ -1593,19 +1634,19 @@ class MockEventService extends _i2.Mock implements _i11.EventService { variables, ], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future fetchAgendaItems(String? eventId) => (super.noSuchMethod( + _i6.Future fetchAgendaItems(String? eventId) => (super.noSuchMethod( Invocation.method( #fetchAgendaItems, [eventId], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override void dispose() => super.noSuchMethod( @@ -1617,53 +1658,53 @@ class MockEventService extends _i2.Mock implements _i11.EventService { ); @override - _i5.Future> loadCachedData() => (super.noSuchMethod( + _i6.Future> loadCachedData() => (super.noSuchMethod( Invocation.method( #loadCachedData, [], ), - returnValue: _i5.Future>.value(<_i21.Event>[]), + returnValue: _i6.Future>.value(<_i22.Event>[]), returnValueForMissingStub: - _i5.Future>.value(<_i21.Event>[]), - ) as _i5.Future>); + _i6.Future>.value(<_i22.Event>[]), + ) as _i6.Future>); @override - _i5.Future saveDataToCache(List<_i21.Event>? data) => + _i6.Future saveDataToCache(List<_i22.Event>? data) => (super.noSuchMethod( Invocation.method( #saveDataToCache, [data], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future> getNewFeedAndRefreshCache() => + _i6.Future> getNewFeedAndRefreshCache() => (super.noSuchMethod( Invocation.method( #getNewFeedAndRefreshCache, [], ), - returnValue: _i5.Future>.value(<_i21.Event>[]), + returnValue: _i6.Future>.value(<_i22.Event>[]), returnValueForMissingStub: - _i5.Future>.value(<_i21.Event>[]), - ) as _i5.Future>); + _i6.Future>.value(<_i22.Event>[]), + ) as _i6.Future>); } /// A class which mocks [ChatService]. /// /// See the documentation for Mockito's code generation for more information. -class MockChatService extends _i2.Mock implements _i23.ChatService { +class MockChatService extends _i2.Mock implements _i24.ChatService { @override - _i5.Stream<_i3.QueryResult> get chatStream => (super.noSuchMethod( + _i6.Stream<_i3.QueryResult> get chatStream => (super.noSuchMethod( Invocation.getter(#chatStream), - returnValue: _i5.Stream<_i3.QueryResult>.empty(), - returnValueForMissingStub: _i5.Stream<_i3.QueryResult>.empty(), - ) as _i5.Stream<_i3.QueryResult>); + returnValue: _i6.Stream<_i3.QueryResult>.empty(), + returnValueForMissingStub: _i6.Stream<_i3.QueryResult>.empty(), + ) as _i6.Stream<_i3.QueryResult>); @override - set chatStream(_i5.Stream<_i3.QueryResult>? _chatStream) => + set chatStream(_i6.Stream<_i3.QueryResult>? _chatStream) => super.noSuchMethod( Invocation.setter( #chatStream, @@ -1673,23 +1714,23 @@ class MockChatService extends _i2.Mock implements _i23.ChatService { ); @override - _i5.Stream<_i24.ChatListTileDataModel> get chatListStream => + _i6.Stream<_i25.ChatListTileDataModel> get chatListStream => (super.noSuchMethod( Invocation.getter(#chatListStream), - returnValue: _i5.Stream<_i24.ChatListTileDataModel>.empty(), + returnValue: _i6.Stream<_i25.ChatListTileDataModel>.empty(), returnValueForMissingStub: - _i5.Stream<_i24.ChatListTileDataModel>.empty(), - ) as _i5.Stream<_i24.ChatListTileDataModel>); + _i6.Stream<_i25.ChatListTileDataModel>.empty(), + ) as _i6.Stream<_i25.ChatListTileDataModel>); @override - _i5.Stream<_i25.ChatMessage> get chatMessagesStream => (super.noSuchMethod( + _i6.Stream<_i26.ChatMessage> get chatMessagesStream => (super.noSuchMethod( Invocation.getter(#chatMessagesStream), - returnValue: _i5.Stream<_i25.ChatMessage>.empty(), - returnValueForMissingStub: _i5.Stream<_i25.ChatMessage>.empty(), - ) as _i5.Stream<_i25.ChatMessage>); + returnValue: _i6.Stream<_i26.ChatMessage>.empty(), + returnValueForMissingStub: _i6.Stream<_i26.ChatMessage>.empty(), + ) as _i6.Stream<_i26.ChatMessage>); @override - _i5.Future sendMessageToDirectChat( + _i6.Future sendMessageToDirectChat( String? chatId, String? messageContent, ) => @@ -1701,78 +1742,78 @@ class MockChatService extends _i2.Mock implements _i23.ChatService { messageContent, ], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future getDirectChatsByUserId() => (super.noSuchMethod( + _i6.Future getDirectChatsByUserId() => (super.noSuchMethod( Invocation.method( #getDirectChatsByUserId, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future getDirectChatMessagesByChatId(dynamic chatId) => + _i6.Future getDirectChatMessagesByChatId(dynamic chatId) => (super.noSuchMethod( Invocation.method( #getDirectChatMessagesByChatId, [chatId], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); } /// A class which mocks [UserConfig]. /// /// See the documentation for Mockito's code generation for more information. -class MockUserConfig extends _i2.Mock implements _i26.UserConfig { +class MockUserConfig extends _i2.Mock implements _i27.UserConfig { @override - _i5.Stream<_i6.OrgInfo> get currentOrgInfoStream => (super.noSuchMethod( + _i6.Stream<_i5.OrgInfo> get currentOrgInfoStream => (super.noSuchMethod( Invocation.getter(#currentOrgInfoStream), - returnValue: _i5.Stream<_i6.OrgInfo>.empty(), - returnValueForMissingStub: _i5.Stream<_i6.OrgInfo>.empty(), - ) as _i5.Stream<_i6.OrgInfo>); + returnValue: _i6.Stream<_i5.OrgInfo>.empty(), + returnValueForMissingStub: _i6.Stream<_i5.OrgInfo>.empty(), + ) as _i6.Stream<_i5.OrgInfo>); @override - _i5.StreamController<_i6.OrgInfo> get currentOrgInfoController => + _i6.StreamController<_i5.OrgInfo> get currentOrgInfoController => (super.noSuchMethod( Invocation.getter(#currentOrgInfoController), - returnValue: _FakeStreamController_11<_i6.OrgInfo>( + returnValue: _FakeStreamController_12<_i5.OrgInfo>( this, Invocation.getter(#currentOrgInfoController), ), - returnValueForMissingStub: _FakeStreamController_11<_i6.OrgInfo>( + returnValueForMissingStub: _FakeStreamController_12<_i5.OrgInfo>( this, Invocation.getter(#currentOrgInfoController), ), - ) as _i5.StreamController<_i6.OrgInfo>); + ) as _i6.StreamController<_i5.OrgInfo>); @override - _i6.OrgInfo get currentOrg => (super.noSuchMethod( + _i5.OrgInfo get currentOrg => (super.noSuchMethod( Invocation.getter(#currentOrg), - returnValue: _FakeOrgInfo_12( + returnValue: _FakeOrgInfo_11( this, Invocation.getter(#currentOrg), ), - returnValueForMissingStub: _FakeOrgInfo_12( + returnValueForMissingStub: _FakeOrgInfo_11( this, Invocation.getter(#currentOrg), ), - ) as _i6.OrgInfo); + ) as _i5.OrgInfo); @override String get currentOrgName => (super.noSuchMethod( Invocation.getter(#currentOrgName), - returnValue: _i18.dummyValue( + returnValue: _i19.dummyValue( this, Invocation.getter(#currentOrgName), ), - returnValueForMissingStub: _i18.dummyValue( + returnValueForMissingStub: _i19.dummyValue( this, Invocation.getter(#currentOrgName), ), @@ -1786,7 +1827,7 @@ class MockUserConfig extends _i2.Mock implements _i26.UserConfig { ) as bool); @override - set currentOrg(_i6.OrgInfo? org) => super.noSuchMethod( + set currentOrg(_i5.OrgInfo? org) => super.noSuchMethod( Invocation.setter( #currentOrg, org, @@ -1826,71 +1867,71 @@ class MockUserConfig extends _i2.Mock implements _i26.UserConfig { ); @override - _i5.Future userLoggedIn() => (super.noSuchMethod( + _i6.Future userLoggedIn() => (super.noSuchMethod( Invocation.method( #userLoggedIn, [], ), - returnValue: _i5.Future.value(false), - returnValueForMissingStub: _i5.Future.value(false), - ) as _i5.Future); + returnValue: _i6.Future.value(false), + returnValueForMissingStub: _i6.Future.value(false), + ) as _i6.Future); @override - _i5.Future userLogOut() => (super.noSuchMethod( + _i6.Future userLogOut() => (super.noSuchMethod( Invocation.method( #userLogOut, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future updateUserJoinedOrg(List<_i6.OrgInfo>? orgDetails) => + _i6.Future updateUserJoinedOrg(List<_i5.OrgInfo>? orgDetails) => (super.noSuchMethod( Invocation.method( #updateUserJoinedOrg, [orgDetails], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future updateUserCreatedOrg(List<_i6.OrgInfo>? orgDetails) => + _i6.Future updateUserCreatedOrg(List<_i5.OrgInfo>? orgDetails) => (super.noSuchMethod( Invocation.method( #updateUserCreatedOrg, [orgDetails], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future updateUserMemberRequestOrg(List<_i6.OrgInfo>? orgDetails) => + _i6.Future updateUserMemberRequestOrg(List<_i5.OrgInfo>? orgDetails) => (super.noSuchMethod( Invocation.method( #updateUserMemberRequestOrg, [orgDetails], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future updateUserAdminOrg(List<_i6.OrgInfo>? orgDetails) => + _i6.Future updateUserAdminOrg(List<_i5.OrgInfo>? orgDetails) => (super.noSuchMethod( Invocation.method( #updateUserAdminOrg, [orgDetails], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future updateAccessToken({ + _i6.Future updateAccessToken({ required String? accessToken, required String? refreshToken, }) => @@ -1903,20 +1944,20 @@ class MockUserConfig extends _i2.Mock implements _i26.UserConfig { #refreshToken: refreshToken, }, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future updateUser(_i7.User? updatedUserDetails) => + _i6.Future updateUser(_i7.User? updatedUserDetails) => (super.noSuchMethod( Invocation.method( #updateUser, [updatedUserDetails], ), - returnValue: _i5.Future.value(false), - returnValueForMissingStub: _i5.Future.value(false), - ) as _i5.Future); + returnValue: _i6.Future.value(false), + returnValueForMissingStub: _i6.Future.value(false), + ) as _i6.Future); @override void saveUserInHive() => super.noSuchMethod( @@ -1928,7 +1969,7 @@ class MockUserConfig extends _i2.Mock implements _i26.UserConfig { ); @override - void saveCurrentOrgInHive(_i6.OrgInfo? saveOrgAsCurrent) => + void saveCurrentOrgInHive(_i5.OrgInfo? saveOrgAsCurrent) => super.noSuchMethod( Invocation.method( #saveCurrentOrgInHive, @@ -1941,7 +1982,7 @@ class MockUserConfig extends _i2.Mock implements _i26.UserConfig { /// A class which mocks [AppLanguage]. /// /// See the documentation for Mockito's code generation for more information. -class MockAppLanguage extends _i2.Mock implements _i27.AppLanguage { +class MockAppLanguage extends _i2.Mock implements _i28.AppLanguage { @override bool get isTest => (super.noSuchMethod( Invocation.getter(#isTest), @@ -1989,11 +2030,11 @@ class MockAppLanguage extends _i2.Mock implements _i27.AppLanguage { ) as _i10.Locale); @override - _i14.ViewState get state => (super.noSuchMethod( + _i15.ViewState get state => (super.noSuchMethod( Invocation.getter(#state), - returnValue: _i14.ViewState.idle, - returnValueForMissingStub: _i14.ViewState.idle, - ) as _i14.ViewState); + returnValue: _i15.ViewState.idle, + returnValueForMissingStub: _i15.ViewState.idle, + ) as _i15.ViewState); @override bool get isBusy => (super.noSuchMethod( @@ -2010,24 +2051,24 @@ class MockAppLanguage extends _i2.Mock implements _i27.AppLanguage { ) as bool); @override - _i5.Future initialize() => (super.noSuchMethod( + _i6.Future initialize() => (super.noSuchMethod( Invocation.method( #initialize, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future fetchLocale() => (super.noSuchMethod( + _i6.Future fetchLocale() => (super.noSuchMethod( Invocation.method( #fetchLocale, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override _i10.Locale localeResoultion( @@ -2065,57 +2106,57 @@ class MockAppLanguage extends _i2.Mock implements _i27.AppLanguage { ) as _i10.Locale); @override - _i5.Future changeLanguage(_i10.Locale? type) => (super.noSuchMethod( + _i6.Future changeLanguage(_i10.Locale? type) => (super.noSuchMethod( Invocation.method( #changeLanguage, [type], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future selectLanguagePress() => (super.noSuchMethod( + _i6.Future selectLanguagePress() => (super.noSuchMethod( Invocation.method( #selectLanguagePress, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future dbLanguageUpdate() => (super.noSuchMethod( + _i6.Future dbLanguageUpdate() => (super.noSuchMethod( Invocation.method( #dbLanguageUpdate, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future appLanguageQuery() => (super.noSuchMethod( + _i6.Future appLanguageQuery() => (super.noSuchMethod( Invocation.method( #appLanguageQuery, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future userLanguageQuery(String? userId) => (super.noSuchMethod( + _i6.Future userLanguageQuery(String? userId) => (super.noSuchMethod( Invocation.method( #userLanguageQuery, [userId], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - void setState(_i14.ViewState? viewState) => super.noSuchMethod( + void setState(_i15.ViewState? viewState) => super.noSuchMethod( Invocation.method( #setState, [viewState], @@ -2164,7 +2205,7 @@ class MockAppLanguage extends _i2.Mock implements _i27.AppLanguage { /// /// See the documentation for Mockito's code generation for more information. class MockSignupDetailsViewModel extends _i2.Mock - implements _i28.SignupDetailsViewModel { + implements _i29.SignupDetailsViewModel { @override _i1.GlobalKey<_i1.FormState> get formKey => (super.noSuchMethod( Invocation.getter(#formKey), @@ -2195,20 +2236,20 @@ class MockSignupDetailsViewModel extends _i2.Mock ); @override - _i6.OrgInfo get selectedOrganization => (super.noSuchMethod( + _i5.OrgInfo get selectedOrganization => (super.noSuchMethod( Invocation.getter(#selectedOrganization), - returnValue: _FakeOrgInfo_12( + returnValue: _FakeOrgInfo_11( this, Invocation.getter(#selectedOrganization), ), - returnValueForMissingStub: _FakeOrgInfo_12( + returnValueForMissingStub: _FakeOrgInfo_11( this, Invocation.getter(#selectedOrganization), ), - ) as _i6.OrgInfo); + ) as _i5.OrgInfo); @override - set selectedOrganization(_i6.OrgInfo? _selectedOrganization) => + set selectedOrganization(_i5.OrgInfo? _selectedOrganization) => super.noSuchMethod( Invocation.setter( #selectedOrganization, @@ -2217,14 +2258,37 @@ class MockSignupDetailsViewModel extends _i2.Mock returnValueForMissingStub: null, ); + @override + _i11.FlutterSecureStorage get secureStorage => (super.noSuchMethod( + Invocation.getter(#secureStorage), + returnValue: _FakeFlutterSecureStorage_17( + this, + Invocation.getter(#secureStorage), + ), + returnValueForMissingStub: _FakeFlutterSecureStorage_17( + this, + Invocation.getter(#secureStorage), + ), + ) as _i11.FlutterSecureStorage); + + @override + set secureStorage(_i11.FlutterSecureStorage? _secureStorage) => + super.noSuchMethod( + Invocation.setter( + #secureStorage, + _secureStorage, + ), + returnValueForMissingStub: null, + ); + @override _i1.TextEditingController get confirmPassword => (super.noSuchMethod( Invocation.getter(#confirmPassword), - returnValue: _FakeTextEditingController_17( + returnValue: _FakeTextEditingController_18( this, Invocation.getter(#confirmPassword), ), - returnValueForMissingStub: _FakeTextEditingController_17( + returnValueForMissingStub: _FakeTextEditingController_18( this, Invocation.getter(#confirmPassword), ), @@ -2243,11 +2307,11 @@ class MockSignupDetailsViewModel extends _i2.Mock @override _i1.TextEditingController get firstName => (super.noSuchMethod( Invocation.getter(#firstName), - returnValue: _FakeTextEditingController_17( + returnValue: _FakeTextEditingController_18( this, Invocation.getter(#firstName), ), - returnValueForMissingStub: _FakeTextEditingController_17( + returnValueForMissingStub: _FakeTextEditingController_18( this, Invocation.getter(#firstName), ), @@ -2265,11 +2329,11 @@ class MockSignupDetailsViewModel extends _i2.Mock @override _i1.TextEditingController get lastName => (super.noSuchMethod( Invocation.getter(#lastName), - returnValue: _FakeTextEditingController_17( + returnValue: _FakeTextEditingController_18( this, Invocation.getter(#lastName), ), - returnValueForMissingStub: _FakeTextEditingController_17( + returnValueForMissingStub: _FakeTextEditingController_18( this, Invocation.getter(#lastName), ), @@ -2287,11 +2351,11 @@ class MockSignupDetailsViewModel extends _i2.Mock @override _i1.TextEditingController get password => (super.noSuchMethod( Invocation.getter(#password), - returnValue: _FakeTextEditingController_17( + returnValue: _FakeTextEditingController_18( this, Invocation.getter(#password), ), - returnValueForMissingStub: _FakeTextEditingController_17( + returnValueForMissingStub: _FakeTextEditingController_18( this, Invocation.getter(#password), ), @@ -2309,11 +2373,11 @@ class MockSignupDetailsViewModel extends _i2.Mock @override _i1.TextEditingController get email => (super.noSuchMethod( Invocation.getter(#email), - returnValue: _FakeTextEditingController_17( + returnValue: _FakeTextEditingController_18( this, Invocation.getter(#email), ), - returnValueForMissingStub: _FakeTextEditingController_17( + returnValueForMissingStub: _FakeTextEditingController_18( this, Invocation.getter(#email), ), @@ -2347,11 +2411,11 @@ class MockSignupDetailsViewModel extends _i2.Mock @override _i1.FocusNode get confirmFocus => (super.noSuchMethod( Invocation.getter(#confirmFocus), - returnValue: _FakeFocusNode_18( + returnValue: _FakeFocusNode_19( this, Invocation.getter(#confirmFocus), ), - returnValueForMissingStub: _FakeFocusNode_18( + returnValueForMissingStub: _FakeFocusNode_19( this, Invocation.getter(#confirmFocus), ), @@ -2383,11 +2447,11 @@ class MockSignupDetailsViewModel extends _i2.Mock ); @override - _i14.ViewState get state => (super.noSuchMethod( + _i15.ViewState get state => (super.noSuchMethod( Invocation.getter(#state), - returnValue: _i14.ViewState.idle, - returnValueForMissingStub: _i14.ViewState.idle, - ) as _i14.ViewState); + returnValue: _i15.ViewState.idle, + returnValueForMissingStub: _i15.ViewState.idle, + ) as _i15.ViewState); @override bool get isBusy => (super.noSuchMethod( @@ -2404,7 +2468,7 @@ class MockSignupDetailsViewModel extends _i2.Mock ) as bool); @override - void initialise(_i6.OrgInfo? org) => super.noSuchMethod( + void initialise(_i5.OrgInfo? org) => super.noSuchMethod( Invocation.method( #initialise, [org], @@ -2413,17 +2477,27 @@ class MockSignupDetailsViewModel extends _i2.Mock ); @override - _i5.Future signUp() => (super.noSuchMethod( + _i6.Future signUp() => (super.noSuchMethod( Invocation.method( #signUp, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + + @override + _i6.Future storingCredentialsInSecureStorage() => (super.noSuchMethod( + Invocation.method( + #storingCredentialsInSecureStorage, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - void setState(_i14.ViewState? viewState) => super.noSuchMethod( + void setState(_i15.ViewState? viewState) => super.noSuchMethod( Invocation.method( #setState, [viewState], @@ -2471,15 +2545,15 @@ class MockSignupDetailsViewModel extends _i2.Mock /// A class which mocks [Post]. /// /// See the documentation for Mockito's code generation for more information. -class MockPost extends _i2.Mock implements _i17.Post { +class MockPost extends _i2.Mock implements _i18.Post { @override String get sId => (super.noSuchMethod( Invocation.getter(#sId), - returnValue: _i18.dummyValue( + returnValue: _i19.dummyValue( this, Invocation.getter(#sId), ), - returnValueForMissingStub: _i18.dummyValue( + returnValueForMissingStub: _i19.dummyValue( this, Invocation.getter(#sId), ), @@ -2549,7 +2623,7 @@ class MockPost extends _i2.Mock implements _i17.Post { ); @override - set organization(_i6.OrgInfo? _organization) => super.noSuchMethod( + set organization(_i5.OrgInfo? _organization) => super.noSuchMethod( Invocation.setter( #organization, _organization, @@ -2558,7 +2632,7 @@ class MockPost extends _i2.Mock implements _i17.Post { ); @override - set likedBy(List<_i17.LikedBy>? _likedBy) => super.noSuchMethod( + set likedBy(List<_i18.LikedBy>? _likedBy) => super.noSuchMethod( Invocation.setter( #likedBy, _likedBy, @@ -2567,7 +2641,7 @@ class MockPost extends _i2.Mock implements _i17.Post { ); @override - set comments(List<_i17.Comments>? _comments) => super.noSuchMethod( + set comments(List<_i18.Comments>? _comments) => super.noSuchMethod( Invocation.setter( #comments, _comments, @@ -2581,14 +2655,14 @@ class MockPost extends _i2.Mock implements _i17.Post { #getPostCreatedDuration, [], ), - returnValue: _i18.dummyValue( + returnValue: _i19.dummyValue( this, Invocation.method( #getPostCreatedDuration, [], ), ), - returnValueForMissingStub: _i18.dummyValue( + returnValueForMissingStub: _i19.dummyValue( this, Invocation.method( #getPostCreatedDuration, @@ -2688,7 +2762,7 @@ class MockDataBaseMutationFunctions extends _i2.Mock ); @override - _i5.Future<_i3.QueryResult> gqlAuthQuery( + _i6.Future<_i3.QueryResult> gqlAuthQuery( String? query, { Map? variables, }) => @@ -2698,7 +2772,7 @@ class MockDataBaseMutationFunctions extends _i2.Mock [query], {#variables: variables}, ), - returnValue: _i5.Future<_i3.QueryResult>.value( + returnValue: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -2707,7 +2781,7 @@ class MockDataBaseMutationFunctions extends _i2.Mock {#variables: variables}, ), )), - returnValueForMissingStub: _i5.Future<_i3.QueryResult>.value( + returnValueForMissingStub: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -2716,10 +2790,10 @@ class MockDataBaseMutationFunctions extends _i2.Mock {#variables: variables}, ), )), - ) as _i5.Future<_i3.QueryResult>); + ) as _i6.Future<_i3.QueryResult>); @override - _i5.Future<_i3.QueryResult> gqlAuthMutation( + _i6.Future<_i3.QueryResult> gqlAuthMutation( String? mutation, { Map? variables, }) => @@ -2729,7 +2803,7 @@ class MockDataBaseMutationFunctions extends _i2.Mock [mutation], {#variables: variables}, ), - returnValue: _i5.Future<_i3.QueryResult>.value( + returnValue: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -2738,7 +2812,7 @@ class MockDataBaseMutationFunctions extends _i2.Mock {#variables: variables}, ), )), - returnValueForMissingStub: _i5.Future<_i3.QueryResult>.value( + returnValueForMissingStub: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -2747,10 +2821,10 @@ class MockDataBaseMutationFunctions extends _i2.Mock {#variables: variables}, ), )), - ) as _i5.Future<_i3.QueryResult>); + ) as _i6.Future<_i3.QueryResult>); @override - _i5.Future<_i3.QueryResult> gqlNonAuthMutation( + _i6.Future<_i3.QueryResult> gqlNonAuthMutation( String? mutation, { Map? variables, bool? reCall = true, @@ -2764,7 +2838,7 @@ class MockDataBaseMutationFunctions extends _i2.Mock #reCall: reCall, }, ), - returnValue: _i5.Future<_i3.QueryResult>.value( + returnValue: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -2776,7 +2850,7 @@ class MockDataBaseMutationFunctions extends _i2.Mock }, ), )), - returnValueForMissingStub: _i5.Future<_i3.QueryResult>.value( + returnValueForMissingStub: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -2788,10 +2862,10 @@ class MockDataBaseMutationFunctions extends _i2.Mock }, ), )), - ) as _i5.Future<_i3.QueryResult>); + ) as _i6.Future<_i3.QueryResult>); @override - _i5.Future<_i3.QueryResult> gqlNonAuthQuery( + _i6.Future<_i3.QueryResult> gqlNonAuthQuery( String? query, { Map? variables, }) => @@ -2801,7 +2875,7 @@ class MockDataBaseMutationFunctions extends _i2.Mock [query], {#variables: variables}, ), - returnValue: _i5.Future<_i3.QueryResult>.value( + returnValue: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -2810,7 +2884,7 @@ class MockDataBaseMutationFunctions extends _i2.Mock {#variables: variables}, ), )), - returnValueForMissingStub: _i5.Future<_i3.QueryResult>.value( + returnValueForMissingStub: _i6.Future<_i3.QueryResult>.value( _FakeQueryResult_9( this, Invocation.method( @@ -2819,53 +2893,53 @@ class MockDataBaseMutationFunctions extends _i2.Mock {#variables: variables}, ), )), - ) as _i5.Future<_i3.QueryResult>); + ) as _i6.Future<_i3.QueryResult>); @override - _i5.Future refreshAccessToken(String? refreshToken) => + _i6.Future refreshAccessToken(String? refreshToken) => (super.noSuchMethod( Invocation.method( #refreshAccessToken, [refreshToken], ), - returnValue: _i5.Future.value(false), - returnValueForMissingStub: _i5.Future.value(false), - ) as _i5.Future); + returnValue: _i6.Future.value(false), + returnValueForMissingStub: _i6.Future.value(false), + ) as _i6.Future); @override - _i5.Future fetchOrgById(String? id) => (super.noSuchMethod( + _i6.Future fetchOrgById(String? id) => (super.noSuchMethod( Invocation.method( #fetchOrgById, [id], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); } /// A class which mocks [OrganizationService]. /// /// See the documentation for Mockito's code generation for more information. class MockOrganizationService extends _i2.Mock - implements _i29.OrganizationService { + implements _i30.OrganizationService { @override - _i5.Future> getOrgMembersList(String? orgId) => + _i6.Future> getOrgMembersList(String? orgId) => (super.noSuchMethod( Invocation.method( #getOrgMembersList, [orgId], ), - returnValue: _i5.Future>.value(<_i7.User>[]), + returnValue: _i6.Future>.value(<_i7.User>[]), returnValueForMissingStub: - _i5.Future>.value(<_i7.User>[]), - ) as _i5.Future>); + _i6.Future>.value(<_i7.User>[]), + ) as _i6.Future>); } /// A class which mocks [ExploreEventsViewModel]. /// /// See the documentation for Mockito's code generation for more information. class MockExploreEventsViewModel extends _i2.Mock - implements _i30.ExploreEventsViewModel { + implements _i31.ExploreEventsViewModel { @override bool get demoMode => (super.noSuchMethod( Invocation.getter(#demoMode), @@ -2883,40 +2957,40 @@ class MockExploreEventsViewModel extends _i2.Mock ); @override - List<_i21.Event> get events => (super.noSuchMethod( + List<_i22.Event> get events => (super.noSuchMethod( Invocation.getter(#events), - returnValue: <_i21.Event>[], - returnValueForMissingStub: <_i21.Event>[], - ) as List<_i21.Event>); + returnValue: <_i22.Event>[], + returnValueForMissingStub: <_i22.Event>[], + ) as List<_i22.Event>); @override - List<_i21.Event> get userEvents => (super.noSuchMethod( + List<_i22.Event> get userEvents => (super.noSuchMethod( Invocation.getter(#userEvents), - returnValue: <_i21.Event>[], - returnValueForMissingStub: <_i21.Event>[], - ) as List<_i21.Event>); + returnValue: <_i22.Event>[], + returnValueForMissingStub: <_i22.Event>[], + ) as List<_i22.Event>); @override - _i11.EventService get eventService => (super.noSuchMethod( + _i12.EventService get eventService => (super.noSuchMethod( Invocation.getter(#eventService), - returnValue: _FakeEventService_19( + returnValue: _FakeEventService_20( this, Invocation.getter(#eventService), ), - returnValueForMissingStub: _FakeEventService_19( + returnValueForMissingStub: _FakeEventService_20( this, Invocation.getter(#eventService), ), - ) as _i11.EventService); + ) as _i12.EventService); @override String get emptyListMessage => (super.noSuchMethod( Invocation.getter(#emptyListMessage), - returnValue: _i18.dummyValue( + returnValue: _i19.dummyValue( this, Invocation.getter(#emptyListMessage), ), - returnValueForMissingStub: _i18.dummyValue( + returnValueForMissingStub: _i19.dummyValue( this, Invocation.getter(#emptyListMessage), ), @@ -2925,22 +2999,22 @@ class MockExploreEventsViewModel extends _i2.Mock @override String get chosenValue => (super.noSuchMethod( Invocation.getter(#chosenValue), - returnValue: _i18.dummyValue( + returnValue: _i19.dummyValue( this, Invocation.getter(#chosenValue), ), - returnValueForMissingStub: _i18.dummyValue( + returnValueForMissingStub: _i19.dummyValue( this, Invocation.getter(#chosenValue), ), ) as String); @override - _i14.ViewState get state => (super.noSuchMethod( + _i15.ViewState get state => (super.noSuchMethod( Invocation.getter(#state), - returnValue: _i14.ViewState.idle, - returnValueForMissingStub: _i14.ViewState.idle, - ) as _i14.ViewState); + returnValue: _i15.ViewState.idle, + returnValueForMissingStub: _i15.ViewState.idle, + ) as _i15.ViewState); @override bool get isBusy => (super.noSuchMethod( @@ -2957,67 +3031,67 @@ class MockExploreEventsViewModel extends _i2.Mock ) as bool); @override - _i5.Future fetchNewEvents() => (super.noSuchMethod( + _i6.Future fetchNewEvents() => (super.noSuchMethod( Invocation.method( #fetchNewEvents, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future refreshEvents() => (super.noSuchMethod( + _i6.Future refreshEvents() => (super.noSuchMethod( Invocation.method( #refreshEvents, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future initialise() => (super.noSuchMethod( + _i6.Future initialise() => (super.noSuchMethod( Invocation.method( #initialise, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future checkIfExistsAndAddNewEvents(List<_i21.Event>? newEvents) => + _i6.Future checkIfExistsAndAddNewEvents(List<_i22.Event>? newEvents) => (super.noSuchMethod( Invocation.method( #checkIfExistsAndAddNewEvents, [newEvents], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future deleteEvent({required String? eventId}) => + _i6.Future deleteEvent({required String? eventId}) => (super.noSuchMethod( Invocation.method( #deleteEvent, [], {#eventId: eventId}, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future choseValueFromDropdown(String? value) => (super.noSuchMethod( + _i6.Future choseValueFromDropdown(String? value) => (super.noSuchMethod( Invocation.method( #choseValueFromDropdown, [value], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override void dispose() => super.noSuchMethod( @@ -3029,7 +3103,7 @@ class MockExploreEventsViewModel extends _i2.Mock ); @override - void setState(_i14.ViewState? viewState) => super.noSuchMethod( + void setState(_i15.ViewState? viewState) => super.noSuchMethod( Invocation.method( #setState, [viewState], @@ -3069,7 +3143,7 @@ class MockExploreEventsViewModel extends _i2.Mock /// /// See the documentation for Mockito's code generation for more information. class MockOrganizationFeedViewModel extends _i2.Mock - implements _i31.OrganizationFeedViewModel { + implements _i32.OrganizationFeedViewModel { @override bool get istest => (super.noSuchMethod( Invocation.getter(#istest), @@ -3087,34 +3161,34 @@ class MockOrganizationFeedViewModel extends _i2.Mock ); @override - List<_i17.Post> get posts => (super.noSuchMethod( + List<_i18.Post> get posts => (super.noSuchMethod( Invocation.getter(#posts), - returnValue: <_i17.Post>[], - returnValueForMissingStub: <_i17.Post>[], - ) as List<_i17.Post>); + returnValue: <_i18.Post>[], + returnValueForMissingStub: <_i18.Post>[], + ) as List<_i18.Post>); @override - List<_i17.Post> get userPosts => (super.noSuchMethod( + List<_i18.Post> get userPosts => (super.noSuchMethod( Invocation.getter(#userPosts), - returnValue: <_i17.Post>[], - returnValueForMissingStub: <_i17.Post>[], - ) as List<_i17.Post>); + returnValue: <_i18.Post>[], + returnValueForMissingStub: <_i18.Post>[], + ) as List<_i18.Post>); @override - List<_i17.Post> get pinnedPosts => (super.noSuchMethod( + List<_i18.Post> get pinnedPosts => (super.noSuchMethod( Invocation.getter(#pinnedPosts), - returnValue: <_i17.Post>[], - returnValueForMissingStub: <_i17.Post>[], - ) as List<_i17.Post>); + returnValue: <_i18.Post>[], + returnValueForMissingStub: <_i18.Post>[], + ) as List<_i18.Post>); @override String get currentOrgName => (super.noSuchMethod( Invocation.getter(#currentOrgName), - returnValue: _i18.dummyValue( + returnValue: _i19.dummyValue( this, Invocation.getter(#currentOrgName), ), - returnValueForMissingStub: _i18.dummyValue( + returnValueForMissingStub: _i19.dummyValue( this, Invocation.getter(#currentOrgName), ), @@ -3128,11 +3202,11 @@ class MockOrganizationFeedViewModel extends _i2.Mock ) as bool); @override - _i14.ViewState get state => (super.noSuchMethod( + _i15.ViewState get state => (super.noSuchMethod( Invocation.getter(#state), - returnValue: _i14.ViewState.idle, - returnValueForMissingStub: _i14.ViewState.idle, - ) as _i14.ViewState); + returnValue: _i15.ViewState.idle, + returnValueForMissingStub: _i15.ViewState.idle, + ) as _i15.ViewState); @override bool get isBusy => (super.noSuchMethod( @@ -3178,7 +3252,7 @@ class MockOrganizationFeedViewModel extends _i2.Mock ); @override - void buildNewPosts(List<_i17.Post>? newPosts) => super.noSuchMethod( + void buildNewPosts(List<_i18.Post>? newPosts) => super.noSuchMethod( Invocation.method( #buildNewPosts, [newPosts], @@ -3187,7 +3261,7 @@ class MockOrganizationFeedViewModel extends _i2.Mock ); @override - void navigateToIndividualPage(_i17.Post? post) => super.noSuchMethod( + void navigateToIndividualPage(_i18.Post? post) => super.noSuchMethod( Invocation.method( #navigateToIndividualPage, [post], @@ -3214,7 +3288,7 @@ class MockOrganizationFeedViewModel extends _i2.Mock ); @override - void addNewPost(_i17.Post? newPost) => super.noSuchMethod( + void addNewPost(_i18.Post? newPost) => super.noSuchMethod( Invocation.method( #addNewPost, [newPost], @@ -3223,7 +3297,7 @@ class MockOrganizationFeedViewModel extends _i2.Mock ); @override - void updatedPost(_i17.Post? post) => super.noSuchMethod( + void updatedPost(_i18.Post? post) => super.noSuchMethod( Invocation.method( #updatedPost, [post], @@ -3232,14 +3306,14 @@ class MockOrganizationFeedViewModel extends _i2.Mock ); @override - _i5.Future removePost(_i17.Post? post) => (super.noSuchMethod( + _i6.Future removePost(_i18.Post? post) => (super.noSuchMethod( Invocation.method( #removePost, [post], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override void nextPage() => super.noSuchMethod( @@ -3260,7 +3334,7 @@ class MockOrganizationFeedViewModel extends _i2.Mock ); @override - void setState(_i14.ViewState? viewState) => super.noSuchMethod( + void setState(_i15.ViewState? viewState) => super.noSuchMethod( Invocation.method( #setState, [viewState], @@ -3299,160 +3373,278 @@ class MockOrganizationFeedViewModel extends _i2.Mock /// A class which mocks [Validator]. /// /// See the documentation for Mockito's code generation for more information. -class MockValidator extends _i2.Mock implements _i32.Validator { +class MockValidator extends _i2.Mock implements _i33.Validator { @override - _i5.Future validateUrlExistence(String? url) => (super.noSuchMethod( + _i6.Future validateUrlExistence(String? url) => (super.noSuchMethod( Invocation.method( #validateUrlExistence, [url], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); } -/// A class which mocks [QRViewController]. +/// A class which mocks [MobileScannerController]. /// /// See the documentation for Mockito's code generation for more information. -class MockQRViewController extends _i2.Mock implements _i33.QRViewController { +class MockMobileScannerController extends _i2.Mock + implements _i34.MobileScannerController { + @override + bool get autoStart => (super.noSuchMethod( + Invocation.getter(#autoStart), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + _i35.DetectionSpeed get detectionSpeed => (super.noSuchMethod( + Invocation.getter(#detectionSpeed), + returnValue: _i35.DetectionSpeed.noDuplicates, + returnValueForMissingStub: _i35.DetectionSpeed.noDuplicates, + ) as _i35.DetectionSpeed); + + @override + int get detectionTimeoutMs => (super.noSuchMethod( + Invocation.getter(#detectionTimeoutMs), + returnValue: 0, + returnValueForMissingStub: 0, + ) as int); + + @override + _i36.CameraFacing get facing => (super.noSuchMethod( + Invocation.getter(#facing), + returnValue: _i36.CameraFacing.front, + returnValueForMissingStub: _i36.CameraFacing.front, + ) as _i36.CameraFacing); + + @override + List<_i37.BarcodeFormat> get formats => (super.noSuchMethod( + Invocation.getter(#formats), + returnValue: <_i37.BarcodeFormat>[], + returnValueForMissingStub: <_i37.BarcodeFormat>[], + ) as List<_i37.BarcodeFormat>); + + @override + bool get returnImage => (super.noSuchMethod( + Invocation.getter(#returnImage), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + bool get torchEnabled => (super.noSuchMethod( + Invocation.getter(#torchEnabled), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + bool get useNewCameraSelector => (super.noSuchMethod( + Invocation.getter(#useNewCameraSelector), + returnValue: false, + returnValueForMissingStub: false, + ) as bool); + + @override + _i6.Stream<_i38.BarcodeCapture> get barcodes => (super.noSuchMethod( + Invocation.getter(#barcodes), + returnValue: _i6.Stream<_i38.BarcodeCapture>.empty(), + returnValueForMissingStub: _i6.Stream<_i38.BarcodeCapture>.empty(), + ) as _i6.Stream<_i38.BarcodeCapture>); + + @override + _i13.MobileScannerState get value => (super.noSuchMethod( + Invocation.getter(#value), + returnValue: _FakeMobileScannerState_21( + this, + Invocation.getter(#value), + ), + returnValueForMissingStub: _FakeMobileScannerState_21( + this, + Invocation.getter(#value), + ), + ) as _i13.MobileScannerState); + @override - _i5.Stream<_i34.Barcode> get scannedDataStream => (super.noSuchMethod( - Invocation.getter(#scannedDataStream), - returnValue: _i5.Stream<_i34.Barcode>.empty(), - returnValueForMissingStub: _i5.Stream<_i34.Barcode>.empty(), - ) as _i5.Stream<_i34.Barcode>); + set value(_i13.MobileScannerState? newValue) => super.noSuchMethod( + Invocation.setter( + #value, + newValue, + ), + returnValueForMissingStub: null, + ); @override - bool get hasPermissions => (super.noSuchMethod( - Invocation.getter(#hasPermissions), + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), returnValue: false, returnValueForMissingStub: false, ) as bool); @override - _i5.Future<_i35.CameraFacing> getCameraInfo() => (super.noSuchMethod( + _i6.Future<_i38.BarcodeCapture?> analyzeImage( + String? path, { + List<_i37.BarcodeFormat>? formats = const [], + }) => + (super.noSuchMethod( Invocation.method( - #getCameraInfo, - [], + #analyzeImage, + [path], + {#formats: formats}, ), - returnValue: - _i5.Future<_i35.CameraFacing>.value(_i35.CameraFacing.back), - returnValueForMissingStub: - _i5.Future<_i35.CameraFacing>.value(_i35.CameraFacing.back), - ) as _i5.Future<_i35.CameraFacing>); + returnValue: _i6.Future<_i38.BarcodeCapture?>.value(), + returnValueForMissingStub: _i6.Future<_i38.BarcodeCapture?>.value(), + ) as _i6.Future<_i38.BarcodeCapture?>); @override - _i5.Future<_i35.CameraFacing> flipCamera() => (super.noSuchMethod( + _i1.Widget buildCameraView() => (super.noSuchMethod( Invocation.method( - #flipCamera, + #buildCameraView, [], ), - returnValue: - _i5.Future<_i35.CameraFacing>.value(_i35.CameraFacing.back), - returnValueForMissingStub: - _i5.Future<_i35.CameraFacing>.value(_i35.CameraFacing.back), - ) as _i5.Future<_i35.CameraFacing>); + returnValue: _FakeWidget_22( + this, + Invocation.method( + #buildCameraView, + [], + ), + ), + returnValueForMissingStub: _FakeWidget_22( + this, + Invocation.method( + #buildCameraView, + [], + ), + ), + ) as _i1.Widget); @override - _i5.Future getFlashStatus() => (super.noSuchMethod( + _i6.Future resetZoomScale() => (super.noSuchMethod( Invocation.method( - #getFlashStatus, + #resetZoomScale, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future toggleFlash() => (super.noSuchMethod( + _i6.Future setZoomScale(double? zoomScale) => (super.noSuchMethod( + Invocation.method( + #setZoomScale, + [zoomScale], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + + @override + _i6.Future start({_i36.CameraFacing? cameraDirection}) => + (super.noSuchMethod( Invocation.method( - #toggleFlash, + #start, [], + {#cameraDirection: cameraDirection}, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future pauseCamera() => (super.noSuchMethod( + _i6.Future stop() => (super.noSuchMethod( Invocation.method( - #pauseCamera, + #stop, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future stopCamera() => (super.noSuchMethod( + _i6.Future pause() => (super.noSuchMethod( Invocation.method( - #stopCamera, + #pause, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future resumeCamera() => (super.noSuchMethod( + _i6.Future switchCamera() => (super.noSuchMethod( Invocation.method( - #resumeCamera, + #switchCamera, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future<_i12.SystemFeatures> getSystemFeatures() => (super.noSuchMethod( + _i6.Future toggleTorch() => (super.noSuchMethod( Invocation.method( - #getSystemFeatures, + #toggleTorch, [], ), - returnValue: - _i5.Future<_i12.SystemFeatures>.value(_FakeSystemFeatures_20( - this, - Invocation.method( - #getSystemFeatures, - [], - ), - )), - returnValueForMissingStub: - _i5.Future<_i12.SystemFeatures>.value(_FakeSystemFeatures_20( - this, - Invocation.method( - #getSystemFeatures, - [], - ), - )), - ) as _i5.Future<_i12.SystemFeatures>); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - void dispose() => super.noSuchMethod( + _i6.Future updateScanWindow(_i10.Rect? window) => (super.noSuchMethod( + Invocation.method( + #updateScanWindow, + [window], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + + @override + _i6.Future dispose() => (super.noSuchMethod( Invocation.method( #dispose, [], ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + + @override + void addListener(_i10.VoidCallback? listener) => super.noSuchMethod( + Invocation.method( + #addListener, + [listener], + ), returnValueForMissingStub: null, ); @override - _i5.Future scanInvert(bool? isScanInvert) => (super.noSuchMethod( + void removeListener(_i10.VoidCallback? listener) => super.noSuchMethod( Invocation.method( - #scanInvert, - [isScanInvert], + #removeListener, + [listener], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValueForMissingStub: null, + ); + + @override + void notifyListeners() => super.noSuchMethod( + Invocation.method( + #notifyListeners, + [], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [CommentService]. /// /// See the documentation for Mockito's code generation for more information. -class MockCommentService extends _i2.Mock implements _i36.CommentService { +class MockCommentService extends _i2.Mock implements _i39.CommentService { @override - _i5.Future createComments( + _i6.Future createComments( String? postId, String? text, ) => @@ -3464,34 +3656,34 @@ class MockCommentService extends _i2.Mock implements _i36.CommentService { text, ], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future> getCommentsForPost(String? postId) => + _i6.Future> getCommentsForPost(String? postId) => (super.noSuchMethod( Invocation.method( #getCommentsForPost, [postId], ), - returnValue: _i5.Future>.value([]), - returnValueForMissingStub: _i5.Future>.value([]), - ) as _i5.Future>); + returnValue: _i6.Future>.value([]), + returnValueForMissingStub: _i6.Future>.value([]), + ) as _i6.Future>); } /// A class which mocks [AppTheme]. /// /// See the documentation for Mockito's code generation for more information. -class MockAppTheme extends _i2.Mock implements _i37.AppTheme { +class MockAppTheme extends _i2.Mock implements _i40.AppTheme { @override String get key => (super.noSuchMethod( Invocation.getter(#key), - returnValue: _i18.dummyValue( + returnValue: _i19.dummyValue( this, Invocation.getter(#key), ), - returnValueForMissingStub: _i18.dummyValue( + returnValueForMissingStub: _i19.dummyValue( this, Invocation.getter(#key), ), @@ -3507,22 +3699,22 @@ class MockAppTheme extends _i2.Mock implements _i37.AppTheme { @override _i1.ThemeData get theme => (super.noSuchMethod( Invocation.getter(#theme), - returnValue: _FakeThemeData_21( + returnValue: _FakeThemeData_23( this, Invocation.getter(#theme), ), - returnValueForMissingStub: _FakeThemeData_21( + returnValueForMissingStub: _FakeThemeData_23( this, Invocation.getter(#theme), ), ) as _i1.ThemeData); @override - _i14.ViewState get state => (super.noSuchMethod( + _i15.ViewState get state => (super.noSuchMethod( Invocation.getter(#state), - returnValue: _i14.ViewState.idle, - returnValueForMissingStub: _i14.ViewState.idle, - ) as _i14.ViewState); + returnValue: _i15.ViewState.idle, + returnValueForMissingStub: _i15.ViewState.idle, + ) as _i15.ViewState); @override bool get isBusy => (super.noSuchMethod( @@ -3558,7 +3750,7 @@ class MockAppTheme extends _i2.Mock implements _i37.AppTheme { ); @override - void setState(_i14.ViewState? viewState) => super.noSuchMethod( + void setState(_i15.ViewState? viewState) => super.noSuchMethod( Invocation.method( #setState, [viewState], @@ -3607,15 +3799,15 @@ class MockAppTheme extends _i2.Mock implements _i37.AppTheme { /// /// See the documentation for Mockito's code generation for more information. class MockCreateEventViewModel extends _i2.Mock - implements _i38.CreateEventViewModel { + implements _i41.CreateEventViewModel { @override _i1.TextEditingController get eventTitleTextController => (super.noSuchMethod( Invocation.getter(#eventTitleTextController), - returnValue: _FakeTextEditingController_17( + returnValue: _FakeTextEditingController_18( this, Invocation.getter(#eventTitleTextController), ), - returnValueForMissingStub: _FakeTextEditingController_17( + returnValueForMissingStub: _FakeTextEditingController_18( this, Invocation.getter(#eventTitleTextController), ), @@ -3636,11 +3828,11 @@ class MockCreateEventViewModel extends _i2.Mock _i1.TextEditingController get eventLocationTextController => (super.noSuchMethod( Invocation.getter(#eventLocationTextController), - returnValue: _FakeTextEditingController_17( + returnValue: _FakeTextEditingController_18( this, Invocation.getter(#eventLocationTextController), ), - returnValueForMissingStub: _FakeTextEditingController_17( + returnValueForMissingStub: _FakeTextEditingController_18( this, Invocation.getter(#eventLocationTextController), ), @@ -3661,11 +3853,11 @@ class MockCreateEventViewModel extends _i2.Mock _i1.TextEditingController get eventDescriptionTextController => (super.noSuchMethod( Invocation.getter(#eventDescriptionTextController), - returnValue: _FakeTextEditingController_17( + returnValue: _FakeTextEditingController_18( this, Invocation.getter(#eventDescriptionTextController), ), - returnValueForMissingStub: _FakeTextEditingController_17( + returnValueForMissingStub: _FakeTextEditingController_18( this, Invocation.getter(#eventDescriptionTextController), ), @@ -3686,11 +3878,11 @@ class MockCreateEventViewModel extends _i2.Mock _i1.TextEditingController get repeatsEveryCountController => (super.noSuchMethod( Invocation.getter(#repeatsEveryCountController), - returnValue: _FakeTextEditingController_17( + returnValue: _FakeTextEditingController_18( this, Invocation.getter(#repeatsEveryCountController), ), - returnValueForMissingStub: _FakeTextEditingController_17( + returnValueForMissingStub: _FakeTextEditingController_18( this, Invocation.getter(#repeatsEveryCountController), ), @@ -3710,11 +3902,11 @@ class MockCreateEventViewModel extends _i2.Mock @override _i1.TextEditingController get endOccurenceController => (super.noSuchMethod( Invocation.getter(#endOccurenceController), - returnValue: _FakeTextEditingController_17( + returnValue: _FakeTextEditingController_18( this, Invocation.getter(#endOccurenceController), ), - returnValueForMissingStub: _FakeTextEditingController_17( + returnValueForMissingStub: _FakeTextEditingController_18( this, Invocation.getter(#endOccurenceController), ), @@ -3734,11 +3926,11 @@ class MockCreateEventViewModel extends _i2.Mock @override _i1.TimeOfDay get eventStartTime => (super.noSuchMethod( Invocation.getter(#eventStartTime), - returnValue: _FakeTimeOfDay_22( + returnValue: _FakeTimeOfDay_24( this, Invocation.getter(#eventStartTime), ), - returnValueForMissingStub: _FakeTimeOfDay_22( + returnValueForMissingStub: _FakeTimeOfDay_24( this, Invocation.getter(#eventStartTime), ), @@ -3756,11 +3948,11 @@ class MockCreateEventViewModel extends _i2.Mock @override _i1.TimeOfDay get eventEndTime => (super.noSuchMethod( Invocation.getter(#eventEndTime), - returnValue: _FakeTimeOfDay_22( + returnValue: _FakeTimeOfDay_24( this, Invocation.getter(#eventEndTime), ), - returnValueForMissingStub: _FakeTimeOfDay_22( + returnValueForMissingStub: _FakeTimeOfDay_24( this, Invocation.getter(#eventEndTime), ), @@ -3778,11 +3970,11 @@ class MockCreateEventViewModel extends _i2.Mock @override DateTime get eventStartDate => (super.noSuchMethod( Invocation.getter(#eventStartDate), - returnValue: _FakeDateTime_23( + returnValue: _FakeDateTime_25( this, Invocation.getter(#eventStartDate), ), - returnValueForMissingStub: _FakeDateTime_23( + returnValueForMissingStub: _FakeDateTime_25( this, Invocation.getter(#eventStartDate), ), @@ -3800,11 +3992,11 @@ class MockCreateEventViewModel extends _i2.Mock @override DateTime get eventEndDate => (super.noSuchMethod( Invocation.getter(#eventEndDate), - returnValue: _FakeDateTime_23( + returnValue: _FakeDateTime_25( this, Invocation.getter(#eventEndDate), ), - returnValueForMissingStub: _FakeDateTime_23( + returnValueForMissingStub: _FakeDateTime_25( this, Invocation.getter(#eventEndDate), ), @@ -3822,11 +4014,11 @@ class MockCreateEventViewModel extends _i2.Mock @override DateTime get recurrenceStartDate => (super.noSuchMethod( Invocation.getter(#recurrenceStartDate), - returnValue: _FakeDateTime_23( + returnValue: _FakeDateTime_25( this, Invocation.getter(#recurrenceStartDate), ), - returnValueForMissingStub: _FakeDateTime_23( + returnValueForMissingStub: _FakeDateTime_25( this, Invocation.getter(#recurrenceStartDate), ), @@ -3885,11 +4077,11 @@ class MockCreateEventViewModel extends _i2.Mock @override _i1.FocusNode get titleFocus => (super.noSuchMethod( Invocation.getter(#titleFocus), - returnValue: _FakeFocusNode_18( + returnValue: _FakeFocusNode_19( this, Invocation.getter(#titleFocus), ), - returnValueForMissingStub: _FakeFocusNode_18( + returnValueForMissingStub: _FakeFocusNode_19( this, Invocation.getter(#titleFocus), ), @@ -3907,11 +4099,11 @@ class MockCreateEventViewModel extends _i2.Mock @override _i1.FocusNode get locationFocus => (super.noSuchMethod( Invocation.getter(#locationFocus), - returnValue: _FakeFocusNode_18( + returnValue: _FakeFocusNode_19( this, Invocation.getter(#locationFocus), ), - returnValueForMissingStub: _FakeFocusNode_18( + returnValueForMissingStub: _FakeFocusNode_19( this, Invocation.getter(#locationFocus), ), @@ -3929,11 +4121,11 @@ class MockCreateEventViewModel extends _i2.Mock @override _i1.FocusNode get descriptionFocus => (super.noSuchMethod( Invocation.getter(#descriptionFocus), - returnValue: _FakeFocusNode_18( + returnValue: _FakeFocusNode_19( this, Invocation.getter(#descriptionFocus), ), - returnValueForMissingStub: _FakeFocusNode_18( + returnValueForMissingStub: _FakeFocusNode_19( this, Invocation.getter(#descriptionFocus), ), @@ -3983,11 +4175,11 @@ class MockCreateEventViewModel extends _i2.Mock @override String get recurrenceInterval => (super.noSuchMethod( Invocation.getter(#recurrenceInterval), - returnValue: _i18.dummyValue( + returnValue: _i19.dummyValue( this, Invocation.getter(#recurrenceInterval), ), - returnValueForMissingStub: _i18.dummyValue( + returnValueForMissingStub: _i19.dummyValue( this, Invocation.getter(#recurrenceInterval), ), @@ -4005,11 +4197,11 @@ class MockCreateEventViewModel extends _i2.Mock @override String get eventEndType => (super.noSuchMethod( Invocation.getter(#eventEndType), - returnValue: _i18.dummyValue( + returnValue: _i19.dummyValue( this, Invocation.getter(#eventEndType), ), - returnValueForMissingStub: _i18.dummyValue( + returnValueForMissingStub: _i19.dummyValue( this, Invocation.getter(#eventEndType), ), @@ -4027,11 +4219,11 @@ class MockCreateEventViewModel extends _i2.Mock @override String get frequency => (super.noSuchMethod( Invocation.getter(#frequency), - returnValue: _i18.dummyValue( + returnValue: _i19.dummyValue( this, Invocation.getter(#frequency), ), - returnValueForMissingStub: _i18.dummyValue( + returnValueForMissingStub: _i19.dummyValue( this, Invocation.getter(#frequency), ), @@ -4100,11 +4292,11 @@ class MockCreateEventViewModel extends _i2.Mock @override String get recurrenceLabel => (super.noSuchMethod( Invocation.getter(#recurrenceLabel), - returnValue: _i18.dummyValue( + returnValue: _i19.dummyValue( this, Invocation.getter(#recurrenceLabel), ), - returnValueForMissingStub: _i18.dummyValue( + returnValueForMissingStub: _i19.dummyValue( this, Invocation.getter(#recurrenceLabel), ), @@ -4179,11 +4371,11 @@ class MockCreateEventViewModel extends _i2.Mock ) as Map); @override - _i14.ViewState get state => (super.noSuchMethod( + _i15.ViewState get state => (super.noSuchMethod( Invocation.getter(#state), - returnValue: _i14.ViewState.idle, - returnValueForMissingStub: _i14.ViewState.idle, - ) as _i14.ViewState); + returnValue: _i15.ViewState.idle, + returnValueForMissingStub: _i15.ViewState.idle, + ) as _i15.ViewState); @override bool get isBusy => (super.noSuchMethod( @@ -4209,26 +4401,26 @@ class MockCreateEventViewModel extends _i2.Mock ); @override - _i5.Future createEvent() => (super.noSuchMethod( + _i6.Future createEvent() => (super.noSuchMethod( Invocation.method( #createEvent, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future getImageFromGallery({bool? camera = false}) => + _i6.Future getImageFromGallery({bool? camera = false}) => (super.noSuchMethod( Invocation.method( #getImageFromGallery, [], {#camera: camera}, ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override void removeImage() => super.noSuchMethod( @@ -4240,15 +4432,15 @@ class MockCreateEventViewModel extends _i2.Mock ); @override - _i5.Future> getCurrentOrgUsersList() => (super.noSuchMethod( + _i6.Future> getCurrentOrgUsersList() => (super.noSuchMethod( Invocation.method( #getCurrentOrgUsersList, [], ), - returnValue: _i5.Future>.value(<_i7.User>[]), + returnValue: _i6.Future>.value(<_i7.User>[]), returnValueForMissingStub: - _i5.Future>.value(<_i7.User>[]), - ) as _i5.Future>); + _i6.Future>.value(<_i7.User>[]), + ) as _i6.Future>); @override void buildUserList() => super.noSuchMethod( @@ -4279,18 +4471,18 @@ class MockCreateEventViewModel extends _i2.Mock ); @override - _i5.Future> fetchVenues() => (super.noSuchMethod( + _i6.Future> fetchVenues() => (super.noSuchMethod( Invocation.method( #fetchVenues, [], ), - returnValue: _i5.Future>.value(<_i39.Venue>[]), + returnValue: _i6.Future>.value(<_i42.Venue>[]), returnValueForMissingStub: - _i5.Future>.value(<_i39.Venue>[]), - ) as _i5.Future>); + _i6.Future>.value(<_i42.Venue>[]), + ) as _i6.Future>); @override - void setState(_i14.ViewState? viewState) => super.noSuchMethod( + void setState(_i15.ViewState? viewState) => super.noSuchMethod( Invocation.method( #setState, [viewState], @@ -4339,7 +4531,7 @@ class MockCreateEventViewModel extends _i2.Mock /// /// See the documentation for Mockito's code generation for more information. class MockDirectChatViewModel extends _i2.Mock - implements _i40.DirectChatViewModel { + implements _i43.DirectChatViewModel { @override _i1.GlobalKey<_i1.AnimatedListState> get listKey => (super.noSuchMethod( Invocation.getter(#listKey), @@ -4354,14 +4546,14 @@ class MockDirectChatViewModel extends _i2.Mock ) as _i1.GlobalKey<_i1.AnimatedListState>); @override - _i14.ChatState get chatState => (super.noSuchMethod( + _i15.ChatState get chatState => (super.noSuchMethod( Invocation.getter(#chatState), - returnValue: _i14.ChatState.initial, - returnValueForMissingStub: _i14.ChatState.initial, - ) as _i14.ChatState); + returnValue: _i15.ChatState.initial, + returnValueForMissingStub: _i15.ChatState.initial, + ) as _i15.ChatState); @override - set chatState(_i14.ChatState? _chatState) => super.noSuchMethod( + set chatState(_i15.ChatState? _chatState) => super.noSuchMethod( Invocation.setter( #chatState, _chatState, @@ -4379,26 +4571,26 @@ class MockDirectChatViewModel extends _i2.Mock ); @override - List<_i24.ChatListTileDataModel> get chats => (super.noSuchMethod( + List<_i25.ChatListTileDataModel> get chats => (super.noSuchMethod( Invocation.getter(#chats), - returnValue: <_i24.ChatListTileDataModel>[], - returnValueForMissingStub: <_i24.ChatListTileDataModel>[], - ) as List<_i24.ChatListTileDataModel>); + returnValue: <_i25.ChatListTileDataModel>[], + returnValueForMissingStub: <_i25.ChatListTileDataModel>[], + ) as List<_i25.ChatListTileDataModel>); @override - Map> get chatMessagesByUser => + Map> get chatMessagesByUser => (super.noSuchMethod( Invocation.getter(#chatMessagesByUser), - returnValue: >{}, - returnValueForMissingStub: >{}, - ) as Map>); + returnValue: >{}, + returnValueForMissingStub: >{}, + ) as Map>); @override - _i14.ViewState get state => (super.noSuchMethod( + _i15.ViewState get state => (super.noSuchMethod( Invocation.getter(#state), - returnValue: _i14.ViewState.idle, - returnValueForMissingStub: _i14.ViewState.idle, - ) as _i14.ViewState); + returnValue: _i15.ViewState.idle, + returnValueForMissingStub: _i15.ViewState.idle, + ) as _i15.ViewState); @override bool get isBusy => (super.noSuchMethod( @@ -4424,27 +4616,27 @@ class MockDirectChatViewModel extends _i2.Mock ); @override - _i5.Future initialise() => (super.noSuchMethod( + _i6.Future initialise() => (super.noSuchMethod( Invocation.method( #initialise, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future getChatMessages(String? chatId) => (super.noSuchMethod( + _i6.Future getChatMessages(String? chatId) => (super.noSuchMethod( Invocation.method( #getChatMessages, [chatId], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override - _i5.Future sendMessageToDirectChat( + _i6.Future sendMessageToDirectChat( String? chatId, String? messageContent, ) => @@ -4456,9 +4648,9 @@ class MockDirectChatViewModel extends _i2.Mock messageContent, ], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); @override void dispose() => super.noSuchMethod( @@ -4479,7 +4671,7 @@ class MockDirectChatViewModel extends _i2.Mock ); @override - void setState(_i14.ViewState? viewState) => super.noSuchMethod( + void setState(_i15.ViewState? viewState) => super.noSuchMethod( Invocation.method( #setState, [viewState], @@ -4518,24 +4710,16 @@ class MockDirectChatViewModel extends _i2.Mock /// A class which mocks [ImageCropper]. /// /// See the documentation for Mockito's code generation for more information. -class MockImageCropper extends _i2.Mock implements _i41.ImageCropper { +class MockImageCropper extends _i2.Mock implements _i44.ImageCropper { @override - _i5.Future<_i42.CroppedFile?> cropImage({ + _i6.Future<_i45.CroppedFile?> cropImage({ required String? sourcePath, int? maxWidth, int? maxHeight, - _i42.CropAspectRatio? aspectRatio, - List<_i42.CropAspectRatioPreset>? aspectRatioPresets = const [ - _i42.CropAspectRatioPreset.original, - _i42.CropAspectRatioPreset.square, - _i42.CropAspectRatioPreset.ratio3x2, - _i42.CropAspectRatioPreset.ratio4x3, - _i42.CropAspectRatioPreset.ratio16x9, - ], - _i42.CropStyle? cropStyle = _i42.CropStyle.rectangle, - _i42.ImageCompressFormat? compressFormat = _i42.ImageCompressFormat.jpg, + _i45.CropAspectRatio? aspectRatio, + _i45.ImageCompressFormat? compressFormat = _i45.ImageCompressFormat.jpg, int? compressQuality = 90, - List<_i42.PlatformUiSettings>? uiSettings, + List<_i45.PlatformUiSettings>? uiSettings, }) => (super.noSuchMethod( Invocation.method( @@ -4546,39 +4730,37 @@ class MockImageCropper extends _i2.Mock implements _i41.ImageCropper { #maxWidth: maxWidth, #maxHeight: maxHeight, #aspectRatio: aspectRatio, - #aspectRatioPresets: aspectRatioPresets, - #cropStyle: cropStyle, #compressFormat: compressFormat, #compressQuality: compressQuality, #uiSettings: uiSettings, }, ), - returnValue: _i5.Future<_i42.CroppedFile?>.value(), - returnValueForMissingStub: _i5.Future<_i42.CroppedFile?>.value(), - ) as _i5.Future<_i42.CroppedFile?>); + returnValue: _i6.Future<_i45.CroppedFile?>.value(), + returnValueForMissingStub: _i6.Future<_i45.CroppedFile?>.value(), + ) as _i6.Future<_i45.CroppedFile?>); @override - _i5.Future<_i42.CroppedFile?> recoverImage() => (super.noSuchMethod( + _i6.Future<_i45.CroppedFile?> recoverImage() => (super.noSuchMethod( Invocation.method( #recoverImage, [], ), - returnValue: _i5.Future<_i42.CroppedFile?>.value(), - returnValueForMissingStub: _i5.Future<_i42.CroppedFile?>.value(), - ) as _i5.Future<_i42.CroppedFile?>); + returnValue: _i6.Future<_i45.CroppedFile?>.value(), + returnValueForMissingStub: _i6.Future<_i45.CroppedFile?>.value(), + ) as _i6.Future<_i45.CroppedFile?>); } /// A class which mocks [ImagePicker]. /// /// See the documentation for Mockito's code generation for more information. -class MockImagePicker extends _i2.Mock implements _i13.ImagePicker { +class MockImagePicker extends _i2.Mock implements _i14.ImagePicker { @override - _i5.Future<_i13.XFile?> pickImage({ - required _i13.ImageSource? source, + _i6.Future<_i14.XFile?> pickImage({ + required _i14.ImageSource? source, double? maxWidth, double? maxHeight, int? imageQuality, - _i13.CameraDevice? preferredCameraDevice = _i13.CameraDevice.rear, + _i14.CameraDevice? preferredCameraDevice = _i14.CameraDevice.rear, bool? requestFullMetadata = true, }) => (super.noSuchMethod( @@ -4594,12 +4776,12 @@ class MockImagePicker extends _i2.Mock implements _i13.ImagePicker { #requestFullMetadata: requestFullMetadata, }, ), - returnValue: _i5.Future<_i13.XFile?>.value(), - returnValueForMissingStub: _i5.Future<_i13.XFile?>.value(), - ) as _i5.Future<_i13.XFile?>); + returnValue: _i6.Future<_i14.XFile?>.value(), + returnValueForMissingStub: _i6.Future<_i14.XFile?>.value(), + ) as _i6.Future<_i14.XFile?>); @override - _i5.Future> pickMultiImage({ + _i6.Future> pickMultiImage({ double? maxWidth, double? maxHeight, int? imageQuality, @@ -4618,13 +4800,13 @@ class MockImagePicker extends _i2.Mock implements _i13.ImagePicker { #requestFullMetadata: requestFullMetadata, }, ), - returnValue: _i5.Future>.value(<_i13.XFile>[]), + returnValue: _i6.Future>.value(<_i14.XFile>[]), returnValueForMissingStub: - _i5.Future>.value(<_i13.XFile>[]), - ) as _i5.Future>); + _i6.Future>.value(<_i14.XFile>[]), + ) as _i6.Future>); @override - _i5.Future<_i13.XFile?> pickMedia({ + _i6.Future<_i14.XFile?> pickMedia({ double? maxWidth, double? maxHeight, int? imageQuality, @@ -4641,12 +4823,12 @@ class MockImagePicker extends _i2.Mock implements _i13.ImagePicker { #requestFullMetadata: requestFullMetadata, }, ), - returnValue: _i5.Future<_i13.XFile?>.value(), - returnValueForMissingStub: _i5.Future<_i13.XFile?>.value(), - ) as _i5.Future<_i13.XFile?>); + returnValue: _i6.Future<_i14.XFile?>.value(), + returnValueForMissingStub: _i6.Future<_i14.XFile?>.value(), + ) as _i6.Future<_i14.XFile?>); @override - _i5.Future> pickMultipleMedia({ + _i6.Future> pickMultipleMedia({ double? maxWidth, double? maxHeight, int? imageQuality, @@ -4665,15 +4847,15 @@ class MockImagePicker extends _i2.Mock implements _i13.ImagePicker { #requestFullMetadata: requestFullMetadata, }, ), - returnValue: _i5.Future>.value(<_i13.XFile>[]), + returnValue: _i6.Future>.value(<_i14.XFile>[]), returnValueForMissingStub: - _i5.Future>.value(<_i13.XFile>[]), - ) as _i5.Future>); + _i6.Future>.value(<_i14.XFile>[]), + ) as _i6.Future>); @override - _i5.Future<_i13.XFile?> pickVideo({ - required _i13.ImageSource? source, - _i13.CameraDevice? preferredCameraDevice = _i13.CameraDevice.rear, + _i6.Future<_i14.XFile?> pickVideo({ + required _i14.ImageSource? source, + _i14.CameraDevice? preferredCameraDevice = _i14.CameraDevice.rear, Duration? maxDuration, }) => (super.noSuchMethod( @@ -4686,18 +4868,18 @@ class MockImagePicker extends _i2.Mock implements _i13.ImagePicker { #maxDuration: maxDuration, }, ), - returnValue: _i5.Future<_i13.XFile?>.value(), - returnValueForMissingStub: _i5.Future<_i13.XFile?>.value(), - ) as _i5.Future<_i13.XFile?>); + returnValue: _i6.Future<_i14.XFile?>.value(), + returnValueForMissingStub: _i6.Future<_i14.XFile?>.value(), + ) as _i6.Future<_i14.XFile?>); @override - _i5.Future<_i13.LostDataResponse> retrieveLostData() => (super.noSuchMethod( + _i6.Future<_i14.LostDataResponse> retrieveLostData() => (super.noSuchMethod( Invocation.method( #retrieveLostData, [], ), returnValue: - _i5.Future<_i13.LostDataResponse>.value(_FakeLostDataResponse_24( + _i6.Future<_i14.LostDataResponse>.value(_FakeLostDataResponse_26( this, Invocation.method( #retrieveLostData, @@ -4705,17 +4887,17 @@ class MockImagePicker extends _i2.Mock implements _i13.ImagePicker { ), )), returnValueForMissingStub: - _i5.Future<_i13.LostDataResponse>.value(_FakeLostDataResponse_24( + _i6.Future<_i14.LostDataResponse>.value(_FakeLostDataResponse_26( this, Invocation.method( #retrieveLostData, [], ), )), - ) as _i5.Future<_i13.LostDataResponse>); + ) as _i6.Future<_i14.LostDataResponse>); @override - bool supportsImageSource(_i13.ImageSource? source) => (super.noSuchMethod( + bool supportsImageSource(_i14.ImageSource? source) => (super.noSuchMethod( Invocation.method( #supportsImageSource, [source], diff --git a/test/service_tests/image_service_test.dart b/test/service_tests/image_service_test.dart index 399fbda7b..2abc6365a 100644 --- a/test/service_tests/image_service_test.dart +++ b/test/service_tests/image_service_test.dart @@ -45,10 +45,6 @@ void main() { when( mockImageCropper.cropImage( sourcePath: "test", - aspectRatioPresets: [ - CropAspectRatioPreset.square, - CropAspectRatioPreset.original, - ], uiSettings: anyNamed('uiSettings'), ), ).thenAnswer((realInvocation) async => croppedFile); @@ -65,10 +61,6 @@ void main() { when( mockImageCropper.cropImage( sourcePath: "test", - aspectRatioPresets: [ - CropAspectRatioPreset.square, - CropAspectRatioPreset.original, - ], uiSettings: anyNamed('uiSettings'), ), ).thenThrow(Exception()); diff --git a/test/service_tests/multi_media_pick_service_test.dart b/test/service_tests/multi_media_pick_service_test.dart index 10e93b76e..f7258456a 100644 --- a/test/service_tests/multi_media_pick_service_test.dart +++ b/test/service_tests/multi_media_pick_service_test.dart @@ -41,10 +41,6 @@ void main() { when( mockImageCropper.cropImage( sourcePath: "test", - aspectRatioPresets: [ - CropAspectRatioPreset.square, - CropAspectRatioPreset.original, - ], uiSettings: anyNamed('uiSettings'), ), ).thenAnswer((realInvocation) async => CroppedFile(path)); @@ -65,10 +61,6 @@ void main() { when( mockImageCropper.cropImage( sourcePath: "test", - aspectRatioPresets: [ - CropAspectRatioPreset.square, - CropAspectRatioPreset.original, - ], uiSettings: anyNamed('uiSettings'), ), ).thenAnswer((realInvocation) async => CroppedFile(path)); diff --git a/test/view_model_tests/pre_auth_view_models/set_url_view_model_test.dart b/test/view_model_tests/pre_auth_view_models/set_url_view_model_test.dart index c7640a9fe..14aa84958 100644 --- a/test/view_model_tests/pre_auth_view_models/set_url_view_model_test.dart +++ b/test/view_model_tests/pre_auth_view_models/set_url_view_model_test.dart @@ -3,8 +3,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:hive/hive.dart'; +import 'package:mobile_scanner/mobile_scanner.dart'; import 'package:mockito/mockito.dart'; -import 'package:qr_code_scanner/qr_code_scanner.dart'; import 'package:qr_flutter/qr_flutter.dart'; import 'package:talawa/constants/custom_theme.dart'; import 'package:talawa/enums/enums.dart'; @@ -207,9 +207,9 @@ Future main() async { testWidgets( 'Check if checkURLandShowPopUp() is working fine when urlPresent is false', (tester) async { - //await locator.unregister(); + // await locator.unregister(); final service = MockValidator(); - //locator.registerSingleton(service); + // locator.registerSingleton(service); await tester.pumpWidget(Form(key: model.formKey, child: Container())); @@ -233,7 +233,7 @@ Future main() async { await tester.pump(); expect(find.byType(ClipRRect), findsOneWidget); - expect(find.byType(QRView), findsOneWidget); + expect(find.byType(MobileScanner), findsOneWidget); }); testWidgets('Check if _onQRViewCreated() is working fine', (tester) async { @@ -244,20 +244,31 @@ Future main() async { ), ); - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode('qr?orgId=1&scan', BarcodeFormat.qrcode, null); - }); + final controller = MockMobileScannerController(); + + when(controller.barcodes).thenAnswer( + (_) => Stream.fromIterable([ + const BarcodeCapture( + barcodes: [ + Barcode( + displayValue: 'qr?orgId=1&scan', + format: BarcodeFormat.qrCode, + ), + ], + ), + ]), + ); await tester.tap(find.byType(FloatingActionButton)); await tester.pump(); - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); + (tester.widget(find.byType(MobileScanner)) as MobileScanner) + .controller! + .start(); }); testWidgets( - 'Check if _onQRViewCreated() is working fine when throws CameraException', + 'Check if _onQRViewCreated() is working fine when throws MobileScannerException', (tester) async { await tester.pumpWidget( MaterialApp( @@ -266,20 +277,31 @@ Future main() async { ), ); - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode('qr?orgId=1&scan', BarcodeFormat.qrcode, null); - }); - // when(controller.stopCamera()) - // .thenThrow(Exception({"errorType": "error"})); + final controller = MockMobileScannerController(); + when(controller.barcodes).thenAnswer( + (_) => Stream.fromIterable([ + const BarcodeCapture( + barcodes: [ + Barcode( + displayValue: 'qr?orgId=1&scan', + format: BarcodeFormat.qrCode, + ), + ], + ), + ]), + ); - when(controller.stopCamera()) - .thenThrow(CameraException("200", "cameraException")); + when(controller.stop()).thenThrow( + const MobileScannerException( + errorCode: MobileScannerErrorCode.controllerUninitialized, + ), + ); await tester.tap(find.byType(FloatingActionButton)); await tester.pump(); - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); + (tester.widget(find.byType(MobileScanner)) as MobileScanner) + .controller! + .start(); }); testWidgets( 'Check if _onQRViewCreated() is working fine when throws QrEmbeddedImageException', @@ -291,20 +313,28 @@ Future main() async { ), ); - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode('qr?orgId=1&scan', BarcodeFormat.qrcode, null); - }); - // when(controller.stopCamera()) - // .thenThrow(Exception({"errorType": "error"})); + final controller = MockMobileScannerController(); + when(controller.barcodes).thenAnswer( + (_) => Stream.fromIterable([ + const BarcodeCapture( + barcodes: [ + Barcode( + displayValue: 'qr?orgId=1&scan', + format: BarcodeFormat.qrCode, + ), + ], + ), + ]), + ); + + when(controller.stop()).thenThrow(QrEmbeddedImageException("error")); - when(controller.stopCamera()) - .thenThrow(QrEmbeddedImageException("error")); await tester.tap(find.byType(FloatingActionButton)); await tester.pump(); - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); + (tester.widget(find.byType(MobileScanner)) as MobileScanner) + .controller! + .start(); }); testWidgets( 'Check if _onQRViewCreated() is working fine when throws QrUnsupportedVersionException', @@ -316,19 +346,28 @@ Future main() async { ), ); - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode('qr?orgId=1&scan', BarcodeFormat.qrcode, null); - }); - // when(controller.stopCamera()) - // .thenThrow(Exception({"errorType": "error"})); + final controller = MockMobileScannerController(); + when(controller.barcodes).thenAnswer( + (_) => Stream.fromIterable([ + const BarcodeCapture( + barcodes: [ + Barcode( + displayValue: 'qr?orgId=1&scan', + format: BarcodeFormat.qrCode, + ), + ], + ), + ]), + ); + + when(controller.stop()).thenThrow(QrUnsupportedVersionException(0)); - when(controller.stopCamera()).thenThrow(QrUnsupportedVersionException(0)); await tester.tap(find.byType(FloatingActionButton)); await tester.pump(); - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); + (tester.widget(find.byType(MobileScanner)) as MobileScanner) + .controller! + .start(); }); testWidgets( 'Check if _onQRViewCreated() is working fine when throws Exception', @@ -340,19 +379,27 @@ Future main() async { ), ); - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode('qr?orgId=1&scan', BarcodeFormat.qrcode, null); - }); - // when(controller.stopCamera()) - // .thenThrow(Exception({"errorType": "error"})); + final controller = MockMobileScannerController(); + when(controller.barcodes).thenAnswer( + (_) => Stream.fromIterable([ + const BarcodeCapture( + barcodes: [ + Barcode( + displayValue: 'qr?orgId=1&scan', + format: BarcodeFormat.qrCode, + ), + ], + ), + ]), + ); - when(controller.stopCamera()).thenThrow(Exception(0)); + when(controller.stop()).thenThrow(Exception(0)); await tester.tap(find.byType(FloatingActionButton)); await tester.pump(); - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); + (tester.widget(find.byType(MobileScanner)) as MobileScanner) + .controller! + .start(); }); }); } diff --git a/test/views/after_auth_screens/join_org_after_auth_test/join_organisation_after_auth_test.dart b/test/views/after_auth_screens/join_org_after_auth_test/join_organisation_after_auth_test.dart index c2ac42036..2a224b79d 100644 --- a/test/views/after_auth_screens/join_org_after_auth_test/join_organisation_after_auth_test.dart +++ b/test/views/after_auth_screens/join_org_after_auth_test/join_organisation_after_auth_test.dart @@ -4,8 +4,9 @@ import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_test/flutter_test.dart'; +// import 'package:qr_code_scanner/qr_code_scanner.dart'; +import 'package:mobile_scanner/mobile_scanner.dart'; import 'package:mockito/mockito.dart'; -import 'package:qr_code_scanner/qr_code_scanner.dart'; import 'package:talawa/enums/enums.dart'; import 'package:talawa/models/organization/org_info.dart'; import 'package:talawa/models/user/user_info.dart'; @@ -59,16 +60,22 @@ void main() { group("Tests for JoinOrganizationAfterAuth - widgets", () { testWidgets('QR Scan Test', (WidgetTester tester) async { - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode( - ' ' + '?orgid=6737904485008f171cf29924', - BarcodeFormat.qrcode, - null, - ); - }); - when(controller.stopCamera()) - .thenAnswer((realInvocation) => Future.value()); + final controller = MockMobileScannerController(); + + when(controller.barcodes).thenAnswer( + (_) => Stream.fromIterable([ + const BarcodeCapture( + barcodes: [ + Barcode( + displayValue: ' ' + '?orgid=6737904485008f171cf29924', + format: BarcodeFormat.qrCode, + ), + ], + ), + ]), + ); + + when(controller.stop()).thenAnswer((realInvocation) => Future.value()); await tester.pumpWidget( createJoinOrgAfterAuth(), @@ -88,21 +95,27 @@ void main() { ), findsOneWidget, ); - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); + (tester.widget(find.byType(MobileScanner)) as MobileScanner) + .controller! + .start(); }); testWidgets('QR Scan Test when url != GraphqlConfig.orgURI', (WidgetTester tester) async { - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode( - '1' + '?orgid=6737904485008f171cf29924', - BarcodeFormat.qrcode, - null, - ); - }); - when(controller.stopCamera()) - .thenAnswer((realInvocation) => Future.value()); + final controller = MockMobileScannerController(); + when(controller.barcodes).thenAnswer( + (_) => Stream.fromIterable([ + const BarcodeCapture( + barcodes: [ + Barcode( + displayValue: '1' + '?orgid=6737904485008f171cf29924', + format: BarcodeFormat.qrCode, + ), + ], + ), + ]), + ); + + when(controller.stop()).thenAnswer((realInvocation) => Future.value()); await tester.pumpWidget( createJoinOrgAfterAuth(), @@ -122,34 +135,41 @@ void main() { ), findsOneWidget, ); - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); + (tester.widget(find.byType(MobileScanner)) as MobileScanner) + .controller! + .start(); }); testWidgets('Test _onQRViewCreated when throwing exception', (WidgetTester tester) async { - final controller = MockQRViewController(); - when(controller.scannedDataStream).thenAnswer((_) async* { - yield Barcode( - ' ' + '?orgid=6737904485008f171cf29924', - BarcodeFormat.qrcode, - null, - ); - }); - when(controller.stopCamera()) - .thenAnswer((realInvocation) => Future.value()); + final controller = MockMobileScannerController(); + when(controller.barcodes).thenAnswer( + (_) => Stream.fromIterable([ + const BarcodeCapture( + barcodes: [ + Barcode( + displayValue: ' ' + '?orgid=6737904485008f171cf29924', + format: BarcodeFormat.qrCode, + ), + ], + ), + ]), + ); + + when(controller.stop()).thenAnswer((realInvocation) => Future.value()); await tester.pumpWidget( createJoinOrgAfterAuth(), ); - when(controller.stopCamera()).thenThrow(Exception("exception")); + when(controller.stop()).thenThrow(Exception("exception")); await tester.pumpAndSettle(const Duration(seconds: 6)); await tester.tap(find.byIcon(Icons.qr_code_scanner)); await tester.pumpAndSettle(); - (tester.widget(find.byType(QRView)) as QRView) - .onQRViewCreated(controller); + (tester.widget(find.byType(MobileScanner)) as MobileScanner) + .controller! + .start(); }); testWidgets( "Check if JoinOrganizationsAfterAuth shows up", diff --git a/test/widget_tests/pre_auth_screens/set_url_page_test.dart b/test/widget_tests/pre_auth_screens/set_url_page_test.dart index 8633a7dd2..5f9d4a9db 100644 --- a/test/widget_tests/pre_auth_screens/set_url_page_test.dart +++ b/test/widget_tests/pre_auth_screens/set_url_page_test.dart @@ -3,7 +3,8 @@ import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; import 'package:provider/provider.dart'; -import 'package:qr_code_scanner/qr_code_scanner.dart'; +// import 'package:qr_code_scanner/qr_code_scanner.dart'; +import 'package:mobile_scanner/mobile_scanner.dart'; import 'package:talawa/constants/custom_theme.dart'; import 'package:talawa/locator.dart'; import 'package:talawa/router.dart' as router; @@ -522,7 +523,7 @@ Future main() async { await tester.pumpAndSettle(); expect(find.byType(ClipRRect), findsOneWidget); - expect(find.byType(QRView), findsOneWidget); + expect(find.byType(MobileScanner), findsOneWidget); }); testWidgets("Testing if app logo shows up", (tester) async { //pushing setUrlScreen