Skip to content

Commit

Permalink
fix001
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahira100 committed Jan 27, 2024
1 parent b00e46f commit 0780a75
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 68 deletions.
119 changes: 52 additions & 67 deletions code/smartchessboard/lib/screens/home.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import 'package:flutter/material.dart';
import 'package:smartchessboard/screens/login.dart';
// import 'package:smartchessboard/screens/mainmenu.dart';
import 'package:smartchessboard/screens/signup.dart';
import 'package:smartchessboard/screens/user_guide.dart';

class HomePage extends StatelessWidget {
static String routeName = '/home';
Expand All @@ -15,14 +13,11 @@ class HomePage extends StatelessWidget {
Navigator.pushNamed(context, SignupPage.routeName);
}

void GoMainMenu(BuildContext context) {
//Navigator.pushNamed(context, SignupPage.routeName);
// Navigator.pushNamed(context, MainMenu.routeName);
}

@override
Widget build(BuildContext context) {
return Scaffold(

body: SafeArea(
child: Container(
// we will give media query height
Expand All @@ -44,99 +39,89 @@ class HomePage extends StatelessWidget {
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 30,

),

),
SizedBox(
height: 20,
),
Text(
"Experience live chess moves on a real board\nConnect, play, and enjoy the game",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.grey[700],
fontSize: 15,
),
)
Text("Experience live chess moves on a real board\nConnect, play, and enjoy the game",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.grey[700],
fontSize: 15,

),)
],
),
Container(
height: MediaQuery.of(context).size.height / 2,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/welcome.png"))),
image: DecorationImage(
image: AssetImage("assets/welcome.png")
)
),
),

Column(
children: <Widget>[
// the login button
// MaterialButton(
// minWidth:250,
// height: 60,
// onPressed: () {
// //LogIn(context);
// GoMainMenu(context);

// },
// // defining the shape
// shape: RoundedRectangleBorder(
// side: BorderSide(
// color: Colors.black
// ),
// borderRadius: BorderRadius.circular(50)
// ),
// child: Text(
// "Login",
// style: TextStyle(
// fontWeight: FontWeight.w300,
// fontSize: 15
// ),
// ),
// ),
MaterialButton(
minWidth:250,
height: 60,
onPressed: () {
LogIn(context);

},
// defining the shape
shape: RoundedRectangleBorder(
side: BorderSide(
color: Colors.black
),
borderRadius: BorderRadius.circular(50)
),
child: Text(
"Login",
style: TextStyle(
fontWeight: FontWeight.w300,
fontSize: 15
),
),
),
// creating the signup button
SizedBox(height: 10),
SizedBox(height:20),
MaterialButton(
minWidth: 250,
height: 60,
onPressed: () {
//SingUp(context);
GoMainMenu(context);
onPressed: (){
SingUp(context);

},
color: Color(0xff0095FF),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50),

),
child: Text(
"Continue",
"Sign up",
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w300,
fontSize: 15),
color: Colors.white,
fontWeight: FontWeight.w300,
fontSize: 15
),
),
),
)

Container(height: 10),
// Add User Guide button
// TextButton(
// onPressed: () {
// Navigator.of(context)
// .push(MaterialPageRoute(builder: (_) {
// return UserGuide();
// }));
// },
// child: Text(
// "User Guide",
// style: TextStyle(
// color: Colors.blue,
// fontWeight: FontWeight.w300,
// fontSize: 15,
// ),
// ),
// ),
],
)



],
),
),
),
);
}
}
}
1 change: 0 additions & 1 deletion code/smartchessboard/lib/screens/main_menu.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:smartchessboard/provider/profile_data_provider.dart';
Expand Down

0 comments on commit 0780a75

Please sign in to comment.