This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main() { | |
| group('StorageProvider', () { | |
| FirebaseStorageMock firebaseStorage = FirebaseStorageMock(); //Create the mock objects required | |
| StorageReferenceMock storageReference = StorageReferenceMock(); | |
| StorageReferenceMock rootReference = | |
| StorageReferenceMock(childReference: storageReference); | |
| StorageReferenceMock fileReference = StorageReferenceMock(); | |
| StorageUploadTaskMock storageUploadTask = StorageUploadTaskMock(); | |
| StorageTaskSnapshotMock storageTaskSnapshot = StorageTaskSnapshotMock(); | |
| MockFile mockFile = MockFile(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main() { | |
| group('StorageProvider', () { | |
| FirebaseStorageMock firebaseStorage = FirebaseStorageMock(); //Create the mock objects required | |
| StorageReferenceMock storageReference = StorageReferenceMock(); | |
| StorageReferenceMock rootReference = | |
| StorageReferenceMock(childReference: storageReference); | |
| StorageReferenceMock fileReference = StorageReferenceMock(); | |
| StorageUploadTaskMock storageUploadTask = StorageUploadTaskMock(); | |
| StorageTaskSnapshotMock storageTaskSnapshot = StorageTaskSnapshotMock(); | |
| MockFile mockFile = MockFile(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main() { | |
| group('UserDataProvider', () { | |
| FireStoreMock fireStore = FireStoreMock(); | |
| UserDataProvider userDataProvider = | |
| UserDataProvider(fireStoreDb: fireStore); | |
| SharedPreferencesMock sharedPreferencesMock = SharedPreferencesMock(); | |
| SharedObjects.prefs = sharedPreferencesMock; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main() { | |
| group('AuthenticationProvider', () { | |
| //Mock and inject the basic dependencies in the AuthenticationProvider | |
| FirebaseAuthMock firebaseAuth = FirebaseAuthMock(); | |
| GoogleSignInMock googleSignIn = GoogleSignInMock(); | |
| AuthenticationProvider authenticationProvider = AuthenticationProvider( | |
| firebaseAuth: firebaseAuth, googleSignIn: googleSignIn); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main() { | |
| //Mock the provider and sharedpreferences | |
| FireStoreMock fireStore = FireStoreMock(); | |
| ChatProvider chatProvider = ChatProvider(fireStoreDb: fireStore); | |
| SharedPreferencesMock sharedPreferencesMock = SharedPreferencesMock(); | |
| SharedObjects.prefs = sharedPreferencesMock; | |
| test('Verify that mapQueryToConversation works properly', () async { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:cloud_firestore/cloud_firestore.dart'; | |
| import 'package:messio/models/Conversation.dart'; | |
| class Contact { | |
| String username; | |
| String name; | |
| String photoUrl; | |
| String documentId; | |
| String chatId; | |
| Contact(this.documentId, this.username, this.name,this.photoUrl, this.chatId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| import 'package:flutter_bloc/flutter_bloc.dart'; | |
| import 'package:messio/blocs/chats/Bloc.dart'; | |
| import 'package:messio/blocs/config/Bloc.dart'; | |
| import 'package:messio/config/Constants.dart'; | |
| import 'package:messio/models/Contact.dart'; | |
| import 'package:messio/utils/SharedObjects.dart'; | |
| import 'package:messio/widgets/BottomSheetFixed.dart'; | |
| import 'package:messio/widgets/InputWidget.dart'; | |
| import '../widgets/ConversationBottomSheet.dart'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| import 'package:flutter_bloc/flutter_bloc.dart'; | |
| import 'package:messio/blocs/config/Bloc.dart'; | |
| import 'package:messio/config/Constants.dart'; | |
| import 'package:messio/config/Transitions.dart'; | |
| import 'package:messio/models/Contact.dart'; | |
| import 'package:messio/pages/ConversationPageSlide.dart'; | |
| import 'package:messio/pages/SingleConversationPage.dart'; | |
| import 'package:messio/utils/SharedObjects.dart'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:cached_network_image/cached_network_image.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter_bloc/flutter_bloc.dart'; | |
| import 'package:intl/intl.dart'; | |
| import 'package:messio/blocs/config/Bloc.dart'; | |
| import 'package:messio/config/Constants.dart'; | |
| import 'package:messio/config/Palette.dart'; | |
| import 'package:messio/config/Transitions.dart'; | |
| import 'package:messio/models/Contact.dart'; | |
| import 'package:messio/models/Conversation.dart'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BlocBuilder<ConfigBloc,ConfigState>( | |
| builder: (context, state) { | |
| if(state is UnConfigState) | |
| configMessagePeek = SharedObjects.prefs.getBool(Constants.configMessagePeek); | |
| if(state is ConfigChangeState) | |
| if(state.key == Constants.configMessagePeek) configMessagePeek = state.value; | |
| return GestureDetector( | |
| child: InputWidget(), | |
| onPanUpdate: (details) { | |
| if(!configMessagePeek) |