Skip to content

Commit

Permalink
Merge pull request #19 from bedirhantong/notifications_tab
Browse files Browse the repository at this point in the history
Notifications tab
  • Loading branch information
bedirhantong authored Feb 2, 2024
2 parents b2c4c7a + 984165e commit 8586995
Show file tree
Hide file tree
Showing 55 changed files with 2,507 additions and 1,057 deletions.
34 changes: 17 additions & 17 deletions .metadata
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
# This file should be version controlled and should not be manually edited.

version:
revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
channel: stable
revision: "ead455963c12b453cdb2358cad34969c76daf180"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180
- platform: android
create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180
- platform: ios
create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180
- platform: linux
create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180
- platform: macos
create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180
- platform: web
create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180
- platform: windows
create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180

# User provided section

Expand Down
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ android {
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}

buildTypes {
Expand Down
Binary file added assets/images/nonuser.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/threads_animation.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/videos/threads_animation_2.mp4
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Launch Screen Assets

You can customize the launch screen with your own desired assets by replacing the image files in this directory.

You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
12 changes: 12 additions & 0 deletions ios/RunnerTests/RunnerTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Flutter
import UIKit
import XCTest

class RunnerTests: XCTestCase {

func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}

}
34 changes: 26 additions & 8 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,41 @@ import 'package:flutter/material.dart';
import 'package:splash_view/source/presentation/pages/splash_view.dart';
import 'package:splash_view/source/presentation/widgets/background_decoration.dart';
import 'package:splash_view/source/presentation/widgets/done.dart';
import 'package:threads_clone/src/features/authentication/screens/login_screen/unofficial/login_screen.dart';
import 'package:threads_clone/src/utils/theme/theme.dart';
import 'src/features/authentication/screens/on_boarding/app_home.dart';

void main() {
runApp(
// MaterialApp(
// debugShowCheckedModeBanner: false,
// home: SplashView(
// showStatusBar: true,
// backgroundImageDecoration: const BackgroundImageDecoration(
// image: AssetImage('assets/images/welcome_images/login.png'),
// fit: BoxFit.cover,
// ),
// logo: const Image(
// image: AssetImage('assets/images/threads.png'),
// height: 150,
// width: 150,
// ),
// loadingIndicator: const CupertinoActivityIndicator(),
// done: Done(
// const MyApp(),
// ),
// ),
// ),
MaterialApp(
debugShowCheckedModeBanner: false,
home: SplashView(
duration: const Duration(milliseconds: 6000),
backgroundColor: Colors.white,
showStatusBar: true,
backgroundImageDecoration: const BackgroundImageDecoration(
image: AssetImage('assets/images/welcome_images/login.png'),
image: AssetImage('assets/images/threads_animation.gif'),
fit: BoxFit.cover,
),
logo: const Image(
image: AssetImage('assets/images/threads.png'),
height: 150,
width: 150,
),
loadingIndicator: const CupertinoActivityIndicator(),
done: Done(
const MyApp(),
),
Expand All @@ -40,7 +56,9 @@ class MyApp extends StatelessWidget {
theme: ThreadsAppTheme.darkTheme,
darkTheme: ThreadsAppTheme.darkTheme,
themeMode: ThemeMode.system,
home: const AppHome(),
// home: const OnboardingFirst(),

home: const LoginScreen(),
);
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'package:flutter/material.dart';

import '../../../constants/sizes.dart';
import '../../../constants/text_strings.dart';
import '../screens/forget_password/forget_password_mail/forgot_password_mail.dart';
import '../screens/forget_password/forget_password_phone/forgot_password_phone.dart';
import '../screens/forget_password/forget_password_options/forgot_password_btn_widget.dart';
import '../../constants/sizes.dart';
import '../../constants/text_strings.dart';
import '../../features/authentication/screens/forget_password/forget_password_mail/forgot_password_mail.dart';
import '../../features/authentication/screens/forget_password/forget_password_options/forgot_password_btn_widget.dart';
import '../../features/authentication/screens/forget_password/forget_password_phone/forgot_password_phone.dart';

class ForgotPasswordScreen {
static Future<dynamic> buildShowModalBottomSheet(BuildContext context) {
Expand Down Expand Up @@ -34,10 +34,11 @@ class ForgotPasswordScreen {
onTap: () {
Navigator.pop(context); //bottom sheetten öncekine döneriz
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const ForgotPasswordMailScreen()));
context,
MaterialPageRoute(
builder: (context) => const ForgotPasswordMailScreen(),
),
);
},
),
const SizedBox(
Expand All @@ -50,10 +51,11 @@ class ForgotPasswordScreen {
onTap: () {
Navigator.pop(context); //bottom sheetten öncekine döneriz
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const ForgotPasswordPhoneScreen()));
context,
MaterialPageRoute(
builder: (context) => const ForgotPasswordPhoneScreen(),
),
);
},
),
],
Expand Down
122 changes: 122 additions & 0 deletions lib/src/constants/app_starter.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
import '../features/authentication/objects/thread.dart';
import '../features/authentication/objects/user.dart';

class AppStarter {
static List<Thread> allThreads = [
Thread(
whoPosted: 'me',
whatTextIsPosted: 'Recent Illustration of mine',
whatImageIsPosted: 'assets/images/temp_user_images/bdo_post.png',
whenPosted: '6 hours',
likeNum: 23,
height: calculateHeight(
'How you doin\'?',
230,
),
username: 'bdotng'),
Thread(
whoPosted: 'serhan',
whatTextIsPosted: 'All of my dream is to be a pilot.',
whatImageIsPosted: 'assets/images/temp_user_images/f35.png',
whenPosted: '2 days',
likeNum: 23,
height: calculateHeight(
'They don\'t know that we know they know we know.',
250,
),
username: 'srhnbymz'),
Thread(
whoPosted: 'musa',
whatTextIsPosted:
'Bir şeyler denedim yine because I am Musa, I do such things.',
whatImageIsPosted: 'assets/images/temp_user_images/musa_post.png',
whenPosted: '2 hours',
likeNum: 23,
height: calculateHeight(
'PIVOT!',
450,
),
username: 'alatasms'),
Thread(
whoPosted: 'sinan',
whatTextIsPosted: 'Smelly Cat, Smelly Cat, what are they feeding you?',
whenPosted: 'last year',
likeNum: 23,
height: calculateHeight(
'Smelly Cat, Smelly Cat, what are they feeding you?',
50,
),
username: 'demir_exe'),
Thread(
whoPosted: 'yusuf',
whatTextIsPosted: 'Sen de benim gibi bir şeyler denedin mi?',
whatImageIsPosted: 'assets/images/temp_user_images/yusuf_post.png',
whenPosted: '3 min',
likeNum: 23,
height: calculateHeight(
'Could I be wearing any more clothes?',
200,
),
username: 'yuciferr'),
Thread(
whoPosted: 'onur',
whatTextIsPosted:
'Mükemmel şarkı her sabah dinliyorum. Bunsuz güne başlayamıyorum',
whatImageIsPosted: 'assets/images/temp_user_images/onur_post.png',
whenPosted: '13 hours',
likeNum: 23,
height: calculateHeight(
'Welcome to the real world. It sucks! You\'re gonna love it.',
190,
),
username: '10urcetin'),
];

static double calculateHeight(String postContent, double imageHeight) {
// Verilen metni satır sayısına bölmek için gerekli işlemler
List<String> lines = postContent.split('\n');
int totalLines = lines.length;

// Satır sayısı 0 ise varsayılan bir değer döndür
if (totalLines == 0) {
return 0.0;
}

return (totalLines * 12) + imageHeight;
}

static List<User> allUsers = [
User(
name: "ucak_adam",
email: "[email protected]",
password: "123",
phoneNumber: "012321321",
bio: "",
profilePictureLink: 'assets/images/temp_user_images/serhan.jpg',
),
User(
name: "si_sharp",
email: "[email protected]",
password: "123",
phoneNumber: "012321321",
bio: "",
profilePictureLink: 'assets/images/temp_user_images/musa.jpg',
),
User(
name: "10nur",
email: "[email protected]",
password: "123",
phoneNumber: "012321321",
bio: "",
profilePictureLink: 'assets/images/temp_user_images/onur.jpg',
),
User(
name: "yucifer",
email: "[email protected]",
password: "123",
phoneNumber: "012321321",
bio: "",
profilePictureLink: 'assets/images/temp_user_images/yusuf.jpg',
),
];
}
31 changes: 31 additions & 0 deletions lib/src/features/authentication/objects/thread.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import 'package:flutter/material.dart';
import 'package:like_button/like_button.dart';

import '../screens/comments_of_post_screen/build_post_include_all.dart';
import '../screens/comments_of_post_screen/comments_of_post_screen.dart';

class Thread {
String whoPosted;
String username;
String? whatTextIsPosted;
String? whatImageIsPosted;
String whenPosted;
double height;
List<Widget>? commentsListWidget;
String? id;
int likeNum;

// String token = "";

Thread({
required this.whoPosted,
this.whatTextIsPosted,
this.whatImageIsPosted,
required this.whenPosted,
required this.likeNum,
this.commentsListWidget,
required this.height,
required this.username,
this.id,
});
}
47 changes: 47 additions & 0 deletions lib/src/features/authentication/objects/user.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import 'package:threads_clone/src/features/authentication/objects/thread.dart';

class User {
String? id;
String name = "edit here";
String? username = "edit here";
String email = "edit here";
String password = "edit here";
String phoneNumber = "edit here";
String profilePictureLink = "";
String bio = "edit here";
bool isPrivate = false;
List<User> friends = [];
List<Thread> threadsPosted = [];
List<Thread> threadsLiked = [];

// String token = "";

User({
this.username,
required this.profilePictureLink,
required this.name,
required this.email,
required this.password,
required this.phoneNumber,
required this.bio,
// required this.token
});
//
// User.fromJson(Map<String, dynamic> json) {
// id = json['id'];
// name = json['name'];
// email = json['email'];
// password = json['password'];
// token = json['token'];
// }
//
// Map<String, dynamic> toJson() {
// final Map<String, dynamic> data = <String, dynamic>{};
// data['id'] = id;
// data['name'] = name;
// data['email'] = email;
// data['password'] = password;
// data['token'] = token;
// return data;
// });
}
Loading

0 comments on commit 8586995

Please sign in to comment.