Skip to content

Commit

Permalink
Home page design
Browse files Browse the repository at this point in the history
  • Loading branch information
Prasad-k-Github committed Nov 7, 2024
1 parent 5161fa0 commit d8640f5
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 19 deletions.
45 changes: 45 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "eseason",
"request": "launch",
"type": "dart"
},
{
"name": "eseason (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile"
},
{
"name": "eseason (release mode)",
"request": "launch",
"type": "dart",
"flutterMode": "release"
},
{
"name": "ESeason-online-train-season-purchesing-system",
"cwd": "ESeason-online-train-season-purchesing-system",
"request": "launch",
"type": "dart"
},
{
"name": "ESeason-online-train-season-purchesing-system (profile mode)",
"cwd": "ESeason-online-train-season-purchesing-system",
"request": "launch",
"type": "dart",
"flutterMode": "profile"
},
{
"name": "ESeason-online-train-season-purchesing-system (release mode)",
"cwd": "ESeason-online-train-season-purchesing-system",
"request": "launch",
"type": "dart",
"flutterMode": "release"
}
]
}
Binary file added assets/train_background.jpeg
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/train_btn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// lib/main.dart

import 'package:flutter/material.dart';
import 'screens/login_page.dart';
import 'screens/home_page.dart'; // Import HomePage

void main() {
runApp(MyApp());
Expand All @@ -16,7 +18,7 @@ class MyApp extends StatelessWidget {
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: LoginPage(),
home: HomePage(), // Set HomePage as the initial screen
);
}
}
73 changes: 73 additions & 0 deletions lib/screens/home_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import 'package:flutter/material.dart';
import 'main_app_page.dart';

class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xFF3A3A58),
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Background image of the train
ClipRRect(
borderRadius: BorderRadius.vertical(bottom: Radius.circular(50)),
child: Image.asset(
'assets/train_background.jpeg',
height: MediaQuery.of(context).size.height * 0.45,
width: double.infinity,
fit: BoxFit.cover,
),
),
SizedBox(height: 30),
// Title Text
Text(
'E - Season',
style: TextStyle(
fontSize: 36,
fontWeight: FontWeight.bold,
color: Colors.white,
letterSpacing: 1.5,
),
),
SizedBox(height: 10),
// Subtitle Text
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20.0),
child: Text(
'Ride Smarter, Book Faster – Your Season Ticket, Just a Click Away!',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
color: Colors.white70,
),
),
),
SizedBox(height: 30),
// Train Icon as a Button
GestureDetector(
onTap: () {
// Navigate to the main app page
Navigator.push(
context,
MaterialPageRoute(builder: (context) => MainAppPage()),
);
},
child: Container(
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(color: Colors.redAccent, width: 2),
),
child: Image.asset(
'assets/train_btn.png', // Make sure the filename matches
height: 80,
width: 80,
),
),
),
],
),
);
}
}
13 changes: 13 additions & 0 deletions lib/screens/main_app_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// lib/screens/main_app_page.dart

import 'package:flutter/material.dart';

class MainAppPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Main App')),
body: Center(child: Text('Welcome to the Main App!')),
);
}
}
28 changes: 14 additions & 14 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ packages:
dependency: transitive
description:
name: async
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
url: "https://pub.dev"
source: hosted
version: "2.11.0"
version: "2.12.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
characters:
dependency: transitive
description:
Expand All @@ -29,10 +29,10 @@ packages:
dependency: transitive
description:
name: clock
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.dev"
source: hosted
version: "1.1.1"
version: "1.1.2"
collection:
dependency: transitive
description:
Expand All @@ -53,10 +53,10 @@ packages:
dependency: transitive
description:
name: fake_async
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
url: "https://pub.dev"
source: hosted
version: "1.3.1"
version: "1.3.2"
flutter:
dependency: "direct main"
description: flutter
Expand Down Expand Up @@ -196,10 +196,10 @@ packages:
dependency: transitive
description:
name: path
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
source: hosted
version: "1.9.0"
version: "1.9.1"
plugin_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -241,10 +241,10 @@ packages:
dependency: transitive
description:
name: string_scanner
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
sha256: "0bd04f5bb74fcd6ff0606a888a30e917af9bd52820b178eaa464beb11dca84b6"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.4.0"
term_glyph:
dependency: transitive
description:
Expand Down Expand Up @@ -273,10 +273,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
url: "https://pub.dev"
source: hosted
version: "14.3.0"
version: "14.3.1"
web:
dependency: transitive
description:
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ dev_dependencies:
flutter:
uses-material-design: true

assets:
# - assets/train_background.jpg
- assets/train_logo.png
assets:
- assets/train_background.jpeg
- assets/train_btn.png

0 comments on commit d8640f5

Please sign in to comment.