Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions android/key.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
storePassword=<password>
keyPassword=<password>
storePassword=19march1999
keyPassword=19march1999
keyAlias=upload
storeFile= /home/prometheus/Projects/Personal-Projects/SimpleThread/keys/upload-keystore.jks
# storeFile= /home/prometheus/Projects/Personal-Projects/SimpleThread/keys/upload-keystore.jks
storeFile=/keys/upload-keystore.jks


63 changes: 63 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body
style="
background-color: #f0f0f0;
text-align: justify;
padding: 20px;
font-family: Arial, sans-serif;
"
>
<p>Dear %DISPLAY_NAME%,</p>

<p>Welcome to %APP_NAME%!</p>
<p>We're excited to have you on board.</p>
<p>
To ensure the security of your account and help provide a better
experience, we need to verify your email address. Please click the link
below to complete the verification process:
</p>

<div style="text-align: center">
<a
href="%LINK%"
style="
background-color: #4caf50;
color: white;
padding: 14px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
"
>Verify Email Address</a
>
</div>

<p>Thank you using our Application</p>
<p>Best Regards,</p>
<p>Your %APP_NAME% Team</p>
</body>
</html>

{{/* Orginal Code for Firebase Template Verfication Email */}} {{/*
<p>Hello %DISPLAY_NAME%,</p>
<p>Follow this link to verify your email address.</p>
<p><a href="%LINK%">%LINK%</a></p>
<p>If you didn’t ask to verify this address, you can ignore this email.</p>
<p>Thanks,</p>
<p>Your %APP_NAME% team</p>
*/}} {{/* Orgina Firebae Template for Changing Password */}} {{/*
<p>Hello,</p>
<p>
Follow this link to reset your %APP_NAME% password for your %EMAIL% account.
</p>
<p><a href="%LINK%">%LINK%</a></p>
<p>If you didn’t ask to reset your password, you can ignore this email.</p>
<p>Thanks,</p>
<p>Your %APP_NAME% team</p>
*/}}
Binary file removed keys/upload-keystore.jks
Binary file not shown.
30 changes: 30 additions & 0 deletions lib/src/backend/services/auth/auth_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,26 @@ class AuthService {
//----------------------------------
// Sign in with Email and Password
//----------------------------------

//orginal Code

// Future<UserCredential> signInWithEmailPassword(
// String email, String password) async {
// try {
// UserCredential userCredential = await _auth.signInWithEmailAndPassword(
// email: email, password: password);
// return userCredential;
// } on FirebaseAuthException catch (e) {
// throw Exception(e.code);
// }
// }

Future<UserCredential> signInWithEmailPassword(
String email, String password) async {
bool userExists = await doesUserExist(email);
if (!userExists) {
throw Exception('User does not exist');
}
try {
UserCredential userCredential = await _auth.signInWithEmailAndPassword(
email: email, password: password);
Expand All @@ -33,6 +51,18 @@ class AuthService {
throw Exception(e.code);
}
}
//-----------------------------
// Check the account existing
//-----------------------------

Future<bool> doesUserExist(String email) async {
final QuerySnapshot result = await _firestore
.collection('Users')
.where('email', isEqualTo: email)
.get();
final List<DocumentSnapshot> documents = result.docs;
return documents.length > 0;
}

//-------------------------------------------------------------
// Register with Email and Password, name and phone number
Expand Down
2 changes: 2 additions & 0 deletions lib/src/constants/animation/lottie_animation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ class LottieAnimation {
String checkInternet = "assets/animation/no_internet3.json";
//Feedback
String feedback = "assets/animation/login_message.json";
//empty chat
String emptyChat = "assets/images/empty_chat.svg";
}
70 changes: 4 additions & 66 deletions lib/src/frontend/screens/chat/chat_page.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:emoji_picker_flutter/emoji_picker_flutter.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:simplethread/src/backend/services/auth/auth_service.dart';
import 'package:simplethread/src/backend/services/chat/chat_service.dart';
import 'package:simplethread/src/constants/animation/lottie_animation.dart';
import 'package:simplethread/src/constants/errorAndLoading/error.dart';
import 'package:simplethread/src/constants/errorAndLoading/loading.dart';

Expand All @@ -14,9 +14,6 @@ class ChatPage extends StatefulWidget {
final String receiverID;
final String profileImage;

static const String _emptyChat = "assets/images/empty_chat.svg";

// getting functions
const ChatPage({
super.key,
required this.receiverID,
Expand All @@ -29,6 +26,7 @@ class ChatPage extends StatefulWidget {
}

class _ChatPageState extends State<ChatPage> {
final LottieAnimation animation = LottieAnimation();
//text Controller
final TextEditingController _messageController = TextEditingController();
bool _showEmojiPicker = false;
Expand Down Expand Up @@ -162,14 +160,14 @@ class _ChatPageState extends State<ChatPage> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
ChatPage._emptyChat,
animation.emptyChat,
width: 300,
height: 300,
),
const SizedBox(height: 20),
Text(
"Begin Chat by saying Hi!",
style: GoogleFonts.playfairDisplay(
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).colorScheme.primary,
fontSize: 22,
Expand Down Expand Up @@ -278,64 +276,4 @@ class _ChatPageState extends State<ChatPage> {
],
);
}

// Version 04: Chaging the value into the database

// Widget _buildMessageItem(DocumentSnapshot doc) {
// Map<String, dynamic> data = doc.data() as Map<String, dynamic>;
// String message = data["message"];
// String senderID = data["senderID"];
// bool isRead = data["read"] ?? false;
// bool isSender = senderID == _authService.getcurrentUser()!.uid;

// return VisibilityDetector(
// key: Key(doc.id),
// onVisibilityChanged: (visibilityInfo) {
// var visiblePercentage = visibilityInfo.visibleFraction * 100;
// if (visiblePercentage == 100 && !isRead && isSender) {
// // Update the 'read' field in Firestore
// FirebaseFirestore.instance
// .collection("chat_rooms")
// .doc(
// ChatService.ch,
// ) // Assuming ChatService has a static property chatRoomId
// .collection("messages")
// .doc(doc.id)
// .update({'read': true});
// }
// },
// child: Column(
// crossAxisAlignment:
// isSender ? CrossAxisAlignment.end : CrossAxisAlignment.start,
// children: [
// Align(
// alignment: isSender ? Alignment.centerRight : Alignment.centerLeft,
// child: Container(
// margin: const EdgeInsets.all(8.0),
// padding: const EdgeInsets.all(12.0),
// decoration: BoxDecoration(
// color: isSender ? Colors.blueAccent : Colors.green,
// borderRadius: BorderRadius.circular(8.0),
// ),
// child: Text(
// message,
// style: const TextStyle(color: Colors.white),
// ),
// ),
// ),
// if (isSender)
// Container(
// margin: const EdgeInsets.only(right: 8.0),
// child: Icon(
// Icons.check_rounded,
// color: isRead
// ? Theme.of(context).colorScheme.secondary
// : Theme.of(context).colorScheme.primary,
// size: 12.0,
// ),
// ),
// ],
// ),
// );
// }
}
1 change: 0 additions & 1 deletion linux/.gitignore

This file was deleted.

145 changes: 0 additions & 145 deletions linux/CMakeLists.txt

This file was deleted.

Loading