Skip to content

Commit

Permalink
home is redesigned for each user updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bedirhantong committed Feb 2, 2024
1 parent 8acb251 commit 984165e
Show file tree
Hide file tree
Showing 83 changed files with 624 additions and 4,203 deletions.
5 changes: 4 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ 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';

Expand Down Expand Up @@ -55,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',
),
];
}
Loading

0 comments on commit 984165e

Please sign in to comment.