diff --git a/lib/Common_widgets/Custom_Box.dart b/lib/Common_widgets/Custom_Box.dart index 5407728..132e3c9 100644 --- a/lib/Common_widgets/Custom_Box.dart +++ b/lib/Common_widgets/Custom_Box.dart @@ -16,8 +16,8 @@ class Custom_Box extends StatefulWidget { final double left; final double right; final double bottom; - - Custom_Box({super.key, required this.controller,required this.prefixicon, this.prefixIconColor=Colors.blueAccent, required this.hintText,this.top=2.0, this.left=7, this.right=10,this.bottom=11}); + final TextStyle style; + Custom_Box({super.key, required this.controller,required this.prefixicon, this.prefixIconColor=Colors.blueAccent, required this.hintText,this.top=2.0, this.left=7, this.right=10,this.bottom=11,this.style = const TextStyle()}); @override State createState() => _Custom_BoxState(); diff --git a/lib/Screens/Login.dart b/lib/Screens/Login.dart index 7e302d2..38eb09f 100644 --- a/lib/Screens/Login.dart +++ b/lib/Screens/Login.dart @@ -50,14 +50,18 @@ class _LoginState extends State { prefixIconColor: Colors.blueAccent.shade700, controller:Usernamecontroller, prefixicon:Icon(Icons.person,size:35), - hintText:'Username'), + hintText:'Username', + style: TextStyle(color:Colors.red) + ), Custom_Box( top: 20, prefixIconColor: Colors.blueAccent.shade700, controller:passwordcontroller, prefixicon:Icon(Icons.password,size:35), - hintText:'Password '), + hintText:'Password ', + style: TextStyle(color:Colors.red) + ), SizedBox( height: 40, ), diff --git a/lib/Screens/SignUp.dart b/lib/Screens/SignUp.dart index 891a73c..e9ebbd5 100644 --- a/lib/Screens/SignUp.dart +++ b/lib/Screens/SignUp.dart @@ -58,28 +58,38 @@ class _SignUpState extends State { prefixIconColor: Colors.blueAccent.shade700, controller:nameController, prefixicon:Icon(Icons.person,size:35), - hintText:'Name'), + hintText:'Name', + style: TextStyle(color:Colors.red) + ), Custom_Box( prefixIconColor: Colors.blueAccent.shade700, controller:usernameController, prefixicon:Icon(Icons.account_box_outlined,size:35), - hintText:'Username'), + hintText:'Username', + style: TextStyle(color:Colors.red) + ), Custom_Box( prefixIconColor: Colors.blueAccent.shade700, controller:emailController, prefixicon:Icon(Icons.email_sharp,size:35), - hintText:'Email'), + hintText:'Email', + style: TextStyle(color:Colors.red) + ), Custom_Box( prefixIconColor: Colors.blueAccent.shade700, controller:passwordController, prefixicon:Icon(Icons.password,size:35), - hintText:'Password'), + hintText:'Password', + style: TextStyle(color:Colors.red) + ), Custom_Box( prefixIconColor: Colors.blueAccent.shade700, controller:confirmPasswordController, prefixicon:Icon(Icons.password,size:35), - hintText:'Confirm Password'), + hintText:'Confirm Password', + style: TextStyle(color:Colors.red) + ), SizedBox( height:9, ), diff --git a/lib/Screens/chat_screen.dart b/lib/Screens/chat_screen.dart index 19737f9..8e07172 100644 --- a/lib/Screens/chat_screen.dart +++ b/lib/Screens/chat_screen.dart @@ -54,10 +54,11 @@ class _chat_screenState extends State { Widget build(BuildContext context) { return Scaffold( + backgroundColor: Colors.blueGrey, appBar: AppBar( + backgroundColor: Colors.blueGrey, automaticallyImplyLeading: false, title: Text('Chat Screen'), - backgroundColor: Colors.blueGrey, ), body: ListView.builder( itemCount: chats.length, diff --git a/lib/Screens/individual_chat.dart b/lib/Screens/individual_chat.dart index 5f27a68..5ef71e0 100644 --- a/lib/Screens/individual_chat.dart +++ b/lib/Screens/individual_chat.dart @@ -104,7 +104,8 @@ class _Individual_chatState extends State { suffixIcon: Row( mainAxisSize: MainAxisSize.min,//kya jadu children: [ - IconButton(onPressed: (){}, icon: Icon(Icons.attach_file)) + IconButton(onPressed: (){}, icon: Icon(Icons.attach_file)), + IconButton(onPressed: (){}, icon: Icon(Icons.send)), ], ), hintText: 'Type a message', diff --git a/lib/Screens/splash_screen.dart b/lib/Screens/splash_screen.dart new file mode 100644 index 0000000..acda52c --- /dev/null +++ b/lib/Screens/splash_screen.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; + +class SplashScreen extends StatefulWidget { + const SplashScreen({super.key}); + + @override + _SplashScreenState createState() => _SplashScreenState(); +} + +class _SplashScreenState extends State { + @override + void initState() { + super.initState(); + _navigateToLogin(); + } + + _navigateToLogin() async { + // You can replace this with a future that fetches data from Firebase or API + await Future.delayed(Duration(seconds: 2), () {}); + Navigator.of(context).pushReplacementNamed('/'); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Text('Loading...'), + ), + ); + } +} diff --git a/lib/main.dart b/lib/main.dart index c79741a..5696782 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,6 +1,7 @@ import 'package:connectify/Screens/Login.dart'; import 'package:connectify/Screens/MainPage.dart'; import 'package:connectify/Screens/SignUp.dart'; +import 'package:connectify/Screens/splash_screen.dart'; import 'package:flutter/material.dart'; void main() { @@ -15,9 +16,11 @@ class MyApp extends StatelessWidget { Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, + initialRoute: '/splash', routes: { + '/splash': (context) => SplashScreen(), "/" :(context) => Login(), "/SignUp":(context)=>SignUp(),