Skip to content

Commit

Permalink
Add home page content
Browse files Browse the repository at this point in the history
  • Loading branch information
rusiruavb committed Aug 4, 2021
1 parent 7efe305 commit 41ffba5
Show file tree
Hide file tree
Showing 9 changed files with 345 additions and 33 deletions.
Binary file added assets/images/search_doctor.png
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/service_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 6 additions & 10 deletions lib/components/rounded_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,17 @@ class _RoundedButtonState extends State<RoundedButton> {
child: Row(
children: <Widget>[
Padding(
padding: EdgeInsets.only(right: 13),
padding: EdgeInsets.only(right: 0),
child: Text(
text,
style: TextStyle(
color: textColor,
fontFamily: 'Larsseit',
fontSize: 20,
fontWeight: FontWeight.bold),
color: textColor,
fontFamily: 'Larsseit',
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
),
Icon(
icon,
color: Colors.white,
size: 25,
),
],
),
),
Expand Down
28 changes: 25 additions & 3 deletions lib/screens/home/home_navigation_menu.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import 'package:dialog_doc990_mobile/screen_keys.dart';
import 'package:dialog_doc990_mobile/screens/home/home_screen.dart';
import 'package:dialog_doc990_mobile/screens/login/login_screen.dart';
import 'package:dialog_doc990_mobile/screens/signup/signup_screen_1.dart';
import 'package:flutter/material.dart';
import 'package:page_transition/page_transition.dart';

class HomeNavigationMenu extends StatelessWidget {
@override
Expand Down Expand Up @@ -55,13 +59,31 @@ class HomeNavigationMenu extends StatelessWidget {
Navigator.of(context).pop();
switch (route) {
case '/':
Navigator.of(context).pushNamed('/');
Navigator.push(
context,
PageTransition(
child: HomeScreen(),
type: PageTransitionType.fade,
),
);
break;
case '/signup':
Navigator.of(context).pushNamed('/signup');
Navigator.push(
context,
PageTransition(
child: SignUpScreen1(),
type: PageTransitionType.fade,
),
);
break;
case '/login':
Navigator.of(context).pushNamed('/login');
Navigator.push(
context,
PageTransition(
child: LoginScreen(),
type: PageTransitionType.fade,
),
);
break;
}
}
Expand Down
16 changes: 11 additions & 5 deletions lib/screens/home/home_screen.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:dialog_doc990_mobile/screens/home/home_body_background.dart';
import 'package:dialog_doc990_mobile/screens/home/home_navigation_menu.dart';
import 'package:dialog_doc990_mobile/screens/home/home_screen_content.dart';
import 'package:flutter/material.dart';

class HomeScreen extends StatelessWidget {
Expand All @@ -11,14 +12,19 @@ class HomeScreen extends StatelessWidget {

return Scaffold(
key: _scaffoldKey,
drawer: Drawer(
elevation: 0.0,
child: HomeNavigationMenu(),
drawer: Container(
width: size.width * 0.6,
child: Drawer(
elevation: 0.0,
child: HomeNavigationMenu(),
),
),
body: Stack(
children: <Widget>[
HomeBodyBackground(
child: Text('This is test'),
SingleChildScrollView(
child: HomeBodyBackground(
child: HomeScreenContent(),
),
),
Padding(
padding: EdgeInsets.only(top: 30, left: 0),
Expand Down
260 changes: 260 additions & 0 deletions lib/screens/home/home_screen_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,266 @@ class _HomeScreenContentState extends State<HomeScreenContent> {

return Container(
key: WidgetKeys.homeScreenContentKey,
child: Container(
height: 200,
child: ListView(
scrollDirection: Axis.horizontal,
children: <Widget>[
Padding(
padding: EdgeInsets.all(10),
child: Card(
shape: RoundedRectangleBorder(
side: BorderSide(color: Colors.white70, width: 1),
borderRadius: BorderRadius.circular(15),
),
elevation: 0,
child: Container(
child: Stack(
children: <Widget>[
Align(
child: Image.asset(
'assets/images/service_background.png',
scale: 0.7,
),
alignment: Alignment.center,
),
Align(
child: Container(
width: 120.0,
height: 120.0,
alignment: Alignment.center,
decoration: new BoxDecoration(
image: DecorationImage(
image: AssetImage(
'assets/images/search_doctor.png'),
fit: BoxFit.fill),
),
),
alignment: Alignment.topCenter,
),
Align(
child: Padding(
child: Text(
'Search Doctor',
style: TextStyle(
fontFamily: 'Larsseit',
fontSize: 15,
),
),
padding: EdgeInsets.only(bottom: 8),
),
alignment: Alignment.bottomCenter,
),
],
),
width: 150,
height: 150,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(15)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.45),
spreadRadius: 0,
blurRadius: 10,
),
],
),
),
),
),
Padding(
padding: EdgeInsets.all(10),
child: Card(
shape: RoundedRectangleBorder(
side: BorderSide(color: Colors.white70, width: 1),
borderRadius: BorderRadius.circular(15),
),
elevation: 0,
child: Container(
child: Stack(
children: <Widget>[
Align(
child: Image.asset(
'assets/images/service_background.png',
scale: 0.7,
),
alignment: Alignment.center,
),
Align(
child: Container(
width: 120.0,
height: 120.0,
alignment: Alignment.center,
decoration: new BoxDecoration(
image: DecorationImage(
image: AssetImage(
'assets/images/search_doctor.png'),
fit: BoxFit.fill),
),
),
alignment: Alignment.topCenter,
),
Align(
child: Padding(
child: Text(
'Search Doctor',
style: TextStyle(
fontFamily: 'Larsseit',
fontSize: 15,
),
),
padding: EdgeInsets.only(bottom: 8),
),
alignment: Alignment.bottomCenter,
),
],
),
width: 150,
height: 150,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(15)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.45),
spreadRadius: 0,
blurRadius: 10,
),
],
),
),
),
),
Padding(
padding: EdgeInsets.all(10),
child: Card(
shape: RoundedRectangleBorder(
side: BorderSide(color: Colors.white70, width: 1),
borderRadius: BorderRadius.circular(15),
),
elevation: 0,
child: Container(
child: Stack(
children: <Widget>[
Align(
child: Image.asset(
'assets/images/service_background.png',
scale: 0.7,
),
alignment: Alignment.center,
),
Align(
child: Container(
width: 120.0,
height: 120.0,
alignment: Alignment.center,
decoration: new BoxDecoration(
image: DecorationImage(
image: AssetImage(
'assets/images/search_doctor.png'),
fit: BoxFit.fill),
),
),
alignment: Alignment.topCenter,
),
Align(
child: Padding(
child: Text(
'Search Doctor',
style: TextStyle(
fontFamily: 'Larsseit',
fontSize: 15,
),
),
padding: EdgeInsets.only(bottom: 8),
),
alignment: Alignment.bottomCenter,
),
],
),
width: 150,
height: 150,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(15)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.45),
spreadRadius: 0,
blurRadius: 10,
),
],
),
),
),
),
Padding(
padding: EdgeInsets.all(10),
child: Card(
shape: RoundedRectangleBorder(
side: BorderSide(color: Colors.white70, width: 1),
borderRadius: BorderRadius.circular(15),
),
elevation: 0,
child: Container(
child: Stack(
children: <Widget>[
Align(
child: Image.asset(
'assets/images/service_background.png',
scale: 0.7,
),
alignment: Alignment.center,
),
Align(
child: Container(
width: 120.0,
height: 120.0,
alignment: Alignment.center,
decoration: new BoxDecoration(
image: DecorationImage(
image: AssetImage(
'assets/images/search_doctor.png'),
fit: BoxFit.fill),
),
),
alignment: Alignment.topCenter,
),
Align(
child: Padding(
child: Text(
'Search Doctor',
style: TextStyle(
fontFamily: 'Larsseit',
fontSize: 15,
),
),
padding: EdgeInsets.only(bottom: 8),
),
alignment: Alignment.bottomCenter,
),
],
),
width: 150,
height: 150,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(15)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.45),
spreadRadius: 0,
blurRadius: 10,
),
],
),
),
),
),
],
),
),
);
}
}
Loading

0 comments on commit 41ffba5

Please sign in to comment.