Commit e3726a5e authored by Budi Prasetyo's avatar Budi Prasetyo

responsive , drawer , appbar

parent b356fc07
...@@ -42,10 +42,10 @@ AppBar AppbarHomeLarge(Size screenSize, BuildContext context, Color home, ...@@ -42,10 +42,10 @@ AppBar AppbarHomeLarge(Size screenSize, BuildContext context, Color home,
const Spacer( const Spacer(
flex: 1, flex: 1,
), ),
ButtonAppbar_baru(arah: '/career', menu: 'Career', warna: career), // ButtonAppbar_baru(arah: '/career', menu: 'Career', warna: career),
const Spacer( // const Spacer(
flex: 1, // flex: 1,
), // ),
ButtonAppbar_baru( ButtonAppbar_baru(
arah: '/contact', menu: 'Contact Us', warna: contactUs), arah: '/contact', menu: 'Contact Us', warna: contactUs),
const Spacer( const Spacer(
......
...@@ -5,6 +5,7 @@ import 'package:medapp_eksad/screen/footer.dart'; ...@@ -5,6 +5,7 @@ import 'package:medapp_eksad/screen/footer.dart';
import 'package:medapp_eksad/screen/home/home1.dart'; import 'package:medapp_eksad/screen/home/home1.dart';
import 'package:medapp_eksad/screen/home/home2.dart'; import 'package:medapp_eksad/screen/home/home2.dart';
import 'package:medapp_eksad/screen/home/home3.dart'; import 'package:medapp_eksad/screen/home/home3.dart';
import 'package:medapp_eksad/widget/drawer.dart';
import 'package:medapp_eksad/widget/responsive.dart'; import 'package:medapp_eksad/widget/responsive.dart';
import 'package:medapp_eksad/widget/whatsapp.dart'; import 'package:medapp_eksad/widget/whatsapp.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
...@@ -36,6 +37,7 @@ class _HomePageState extends State<HomePage> { ...@@ -36,6 +37,7 @@ class _HomePageState extends State<HomePage> {
? AppBarKecil() ? AppBarKecil()
: AppbarHomeLarge(screenSize, context, Colors.blue, Colors.blue, : AppbarHomeLarge(screenSize, context, Colors.blue, Colors.blue,
Colors.black, Colors.black, Colors.black), Colors.black, Colors.black, Colors.black),
drawer: DrawerMeddApp(),
body: ListView( body: ListView(
children: [ children: [
Home1(), Home1(),
......
...@@ -18,6 +18,7 @@ class MyApp extends StatelessWidget { ...@@ -18,6 +18,7 @@ class MyApp extends StatelessWidget {
initialRoute: '/', initialRoute: '/',
routes: { routes: {
'/': (context) => const HomePage(), '/': (context) => const HomePage(),
'/about': (context) => const HomePage(),
'/solutions': (context) => const Solutions(), '/solutions': (context) => const Solutions(),
'/contact': (context) => const ContactUs(), '/contact': (context) => const ContactUs(),
}, },
......
...@@ -6,6 +6,7 @@ import 'package:medapp_eksad/screen_small/small_footer.dart'; ...@@ -6,6 +6,7 @@ import 'package:medapp_eksad/screen_small/small_footer.dart';
import 'package:medapp_eksad/screen/contact_us/contact_us1.dart'; import 'package:medapp_eksad/screen/contact_us/contact_us1.dart';
import 'package:medapp_eksad/screen/contact_us/contact_us2.dart'; import 'package:medapp_eksad/screen/contact_us/contact_us2.dart';
import 'package:medapp_eksad/screen/footer.dart'; import 'package:medapp_eksad/screen/footer.dart';
import 'package:medapp_eksad/widget/drawer.dart';
import 'package:medapp_eksad/widget/responsive.dart'; import 'package:medapp_eksad/widget/responsive.dart';
import 'package:medapp_eksad/widget/whatsapp.dart'; import 'package:medapp_eksad/widget/whatsapp.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
...@@ -36,6 +37,7 @@ class _ContactUsState extends State<ContactUs> { ...@@ -36,6 +37,7 @@ class _ContactUsState extends State<ContactUs> {
? AppBarKecil() ? AppBarKecil()
: AppbarHomeLarge(screenSize, context, Colors.black, Colors.black, : AppbarHomeLarge(screenSize, context, Colors.black, Colors.black,
Colors.black, Colors.black, Colors.blue), Colors.black, Colors.black, Colors.blue),
drawer: DrawerMeddApp(),
body: ResponsiveWidget.isSmallScreen(context) body: ResponsiveWidget.isSmallScreen(context)
? ListView( ? ListView(
children: [ children: [
......
...@@ -71,14 +71,16 @@ class Home1 extends StatelessWidget { ...@@ -71,14 +71,16 @@ class Home1 extends StatelessWidget {
// color: Colors.green, // color: Colors.green,
// padding: EdgeInsets.only(top: 1), // padding: EdgeInsets.only(top: 1),
width: screenSize.width * 0.3, width: screenSize.width * 0.3,
// height: screenSize.height * 0.19, height: screenSize.height * 0.17,
child: ShowUpAnimation( child: ShowUpAnimation(
delayStart: const Duration(seconds: 1), delayStart: const Duration(seconds: 1),
curve: Curves.bounceIn, curve: Curves.bounceIn,
direction: Direction.horizontal, direction: Direction.horizontal,
// offset: -0.2, // offset: -0.2,
child: Text( child: Text(
'Welcome to healthcare’s most powerful collaboration suite. Enhance clinical workflows, speed decisions, and improve patient outcomes, safely and securely.', 'Welcome to healthcare’s most powerful collaboration suite. '
'Enhance clinical workflows, speed decisions, and improve'
' patient outcomes, safely and securely.',
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 20, fontSize: 20,
...@@ -109,6 +111,7 @@ class Home1 extends StatelessWidget { ...@@ -109,6 +111,7 @@ class Home1 extends StatelessWidget {
letterSpacing: 2, letterSpacing: 2,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w500), fontWeight: FontWeight.w500),
textAlign: TextAlign.center,
), ),
), ),
), ),
......
...@@ -11,7 +11,7 @@ class Home2 extends StatelessWidget { ...@@ -11,7 +11,7 @@ class Home2 extends StatelessWidget {
return Container( return Container(
width: screenSize.width * 0.5, width: screenSize.width * 0.5,
color: const Color.fromARGB(255, 227, 235, 253), color: const Color.fromARGB(255, 227, 235, 253),
height: 600, height: screenSize.height,
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: screenSize.width * 0.10, left: screenSize.width * 0.10,
right: screenSize.width * 0.10, right: screenSize.width * 0.10,
...@@ -35,6 +35,7 @@ class Home2 extends StatelessWidget { ...@@ -35,6 +35,7 @@ class Home2 extends StatelessWidget {
), ),
Container( Container(
width: screenSize.width, width: screenSize.width,
height: 100,
child: Text( child: Text(
'We understand that the global healthcare industry is experiencing several challenges, thus requiring a company`s ability to respond to these challenges quickly and innovatively, ' 'We understand that the global healthcare industry is experiencing several challenges, thus requiring a company`s ability to respond to these challenges quickly and innovatively, '
'and seize opportunities that arise will be critical to ensuring the company`s sustainability in the future.', 'and seize opportunities that arise will be critical to ensuring the company`s sustainability in the future.',
...@@ -77,6 +78,7 @@ class Home2 extends StatelessWidget { ...@@ -77,6 +78,7 @@ class Home2 extends StatelessWidget {
), ),
Container( Container(
width: screenSize.width, width: screenSize.width,
height: 100,
child: Text( child: Text(
'Too much admin. Longer work hours. Less time spent with patients.' 'Too much admin. Longer work hours. Less time spent with patients.'
'You’re not alone in the stress and frustration these cause. At MedApps, ' 'You’re not alone in the stress and frustration these cause. At MedApps, '
...@@ -94,6 +96,7 @@ class Home2 extends StatelessWidget { ...@@ -94,6 +96,7 @@ class Home2 extends StatelessWidget {
), ),
Container( Container(
width: screenSize.width, width: screenSize.width,
height: 100,
child: Text( child: Text(
'MedApps combines practice management and clinical workflows into one seamless, modern interface. ' 'MedApps combines practice management and clinical workflows into one seamless, modern interface. '
'Manage all patient interactions securely on the go, or in your practice.' 'Manage all patient interactions securely on the go, or in your practice.'
......
import 'package:flutter/material.dart';
class DrawerMeddApp extends StatelessWidget {
const DrawerMeddApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Drawer(
backgroundColor: Color.fromARGB(255, 76, 154, 231),
width: 200,
child: Column(
children: [
SizedBox(height: 50,),
ListTile(
leading: Icon(Icons.home),
title: Text('Home',style: TextStyle(fontWeight: FontWeight.w500),),
onTap: () => Navigator.pushNamed(context, '/') ,
),
ListTile(
leading: Icon(Icons.people),
title: Text('About Us',style: TextStyle(fontWeight: FontWeight.w500),),
onTap: () =>Navigator.pushNamed(context, '/about') ,
),
ListTile(
leading: Icon(Icons.settings_applications),
title: Text('Our Solution',style: TextStyle(fontWeight: FontWeight.w500),),
onTap: () =>Navigator.pushNamed(context, '/solutions') ,
),
// ListTile(
// leading: Icon(Icons.event_note),
// title: Text('Career'),
// onTap: () => Navigator.pushNamed(context, '/career') ,
// ),
ListTile(
leading: Icon(Icons.contact_phone),
title: Text('Contact Us',style: TextStyle(fontWeight: FontWeight.w500),),
onTap: () => Navigator.pushNamed(context, '/contact') ,
),
],
),
);
}
}
...@@ -12,18 +12,18 @@ class ResponsiveWidget extends StatelessWidget { ...@@ -12,18 +12,18 @@ class ResponsiveWidget extends StatelessWidget {
}) : super(key: key); }) : super(key: key);
static bool isSmallScreen(BuildContext context) { static bool isSmallScreen(BuildContext context) {
return MediaQuery.of(context).size.width <= 1200; return MediaQuery.of(context).size.width <= 1050;
} }
static bool isLargeScreen(BuildContext context) { static bool isLargeScreen(BuildContext context) {
return MediaQuery.of(context).size.width > 1200; return MediaQuery.of(context).size.width > 1050;
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return LayoutBuilder( return LayoutBuilder(
builder: (context, constraints) { builder: (context, constraints) {
if (constraints.maxWidth > 1200) { if (constraints.maxWidth > 1050) {
return largeScreen; return largeScreen;
} else { } else {
return smallScreen; return smallScreen;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment