Commit 231510c5 authored by Arham Aulia Nugraha's avatar Arham Aulia Nugraha
parents 2829d4a6 0f61d53f
...@@ -38,14 +38,14 @@ AppBar AppbarHomeLarge(Size screenSize, BuildContext context, Color home, ...@@ -38,14 +38,14 @@ AppBar AppbarHomeLarge(Size screenSize, BuildContext context, Color home,
flex: 1, flex: 1,
), ),
ButtonAppbar_baru( ButtonAppbar_baru(
arah: '/service', menu: 'Our Solution', warna: ourServices), arah: '/solutions', menu: 'Our Solution', warna: ourServices),
const Spacer(
flex: 1,
),
ButtonAppbar_baru(arah: '/career', menu: 'Career', warna: career),
const Spacer( const Spacer(
flex: 1, flex: 1,
), ),
// ButtonAppbar_baru(arah: '/career', menu: 'Career', warna: career),
// const Spacer(
// flex: 1,
// ),
ButtonAppbar_baru( ButtonAppbar_baru(
arah: '/contact', menu: 'Contact Us', warna: contactUs), arah: '/contact', menu: 'Contact Us', warna: contactUs),
const Spacer( const Spacer(
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:medapp_eksad/appbar/appbar_home.dart'; import 'package:medapp_eksad/appbar/appbar_home.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/screen/home/home1.dart';
import 'package:medapp_eksad/screen/home/home2.dart';
import 'package:medapp_eksad/screen/home/home3.dart';
import 'package:medapp_eksad/screen_small/small_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:flutter/services.dart'; import 'package:flutter/services.dart';
void setPageTitle(String title, BuildContext context) { void setPageTitle(String title, BuildContext context) {
SystemChrome.setApplicationSwitcherDescription(ApplicationSwitcherDescription( SystemChrome.setApplicationSwitcherDescription(ApplicationSwitcherDescription(
label: title, label: title,
...@@ -27,38 +33,53 @@ class _HomePageState extends State<HomePage> { ...@@ -27,38 +33,53 @@ class _HomePageState extends State<HomePage> {
var screenSize = MediaQuery.of(context).size; var screenSize = MediaQuery.of(context).size;
return Scaffold( return Scaffold(
key: _scaffoldKey, key: _scaffoldKey,
floatingActionButton: WAChat(),
appBar: ResponsiveWidget.isSmallScreen(context) appBar: ResponsiveWidget.isSmallScreen(context)
? 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),
body: ListView( drawer: const DrawerMeddApp(),
body: ResponsiveWidget.isSmallScreen(context)
? ListView(
children: [
const Home1(),
const Home2(),
const Home3(),
ContactUs2(),
const FooterSmall(),
],
)
: ListView(
children: [ children: [
Footer() const Home1(),
const Home2(),
const Home3(),
ContactUs2(),
const Footer(),
], ],
), ),
); );
} }
AppBar AppBarKecil() { AppBar AppBarKecil() {
return AppBar( return AppBar(
leading: IconButton( leading: IconButton(
onPressed: () => _scaffoldKey.currentState!.openDrawer(), onPressed: () => _scaffoldKey.currentState!.openDrawer(),
icon: Icon(Icons.list_outlined,size: 30,color: Colors.black,),), icon: const Icon(
Icons.list_outlined,
size: 30,
color: Colors.black,
),
),
backgroundColor: Colors.white, backgroundColor: Colors.white,
centerTitle: true, centerTitle: true,
title: Container( title: SizedBox(
child: SizedBox(
height: 50, height: 50,
width: 150, width: 150,
child: Image.asset("assets/logo/medapp-logo.png"), child: Image.asset("assets/logo/medapp-logo.png"),
), ),
),
// ), // ),
); );
} }
} }
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:medapp_eksad/homepage.dart'; import 'package:medapp_eksad/homepage.dart';
import 'package:medapp_eksad/screen/contact_us/contact_us.dart';
import 'package:medapp_eksad/screen/solution.dart';
void main() { void main() {
runApp(const MyApp()); runApp(const MyApp());
...@@ -16,6 +18,9 @@ class MyApp extends StatelessWidget { ...@@ -16,6 +18,9 @@ class MyApp extends StatelessWidget {
initialRoute: '/', initialRoute: '/',
routes: { routes: {
'/': (context) => const HomePage(), '/': (context) => const HomePage(),
'/about': (context) => const HomePage(),
'/solutions': (context) => const Solutions(),
'/contact': (context) => const ContactUs(),
}, },
); );
} }
......
import 'package:flutter/material.dart';
import 'package:medapp_eksad/appbar/appbar_home.dart';
import 'package:medapp_eksad/screen_small/small_contact/small_contact_us1.dart';
import 'package:medapp_eksad/screen_small/small_contact/small_contact_us2.dart';
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_us2.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/whatsapp.dart';
import 'package:flutter/services.dart';
void setPageTitle(String title, BuildContext context) {
SystemChrome.setApplicationSwitcherDescription(ApplicationSwitcherDescription(
label: title,
primaryColor: Theme.of(context).primaryColor.value, // This line is required
));
}
class ContactUs extends StatefulWidget {
const ContactUs({Key? key}) : super(key: key);
@override
State<ContactUs> createState() => _ContactUsState();
}
class _ContactUsState extends State<ContactUs> {
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
@override
Widget build(BuildContext context) {
setPageTitle('Contact Us', context);
var screenSize = MediaQuery.of(context).size;
return Scaffold(
key: _scaffoldKey,
appBar: ResponsiveWidget.isSmallScreen(context)
? AppBarKecil()
: AppbarHomeLarge(screenSize, context, Colors.black, Colors.black,
Colors.black, Colors.black, Colors.blue),
drawer: DrawerMeddApp(),
body: ResponsiveWidget.isSmallScreen(context)
? ListView(
children: [
const ContactUs1_small(),
ContactUs2_small(),
const FooterSmall(),
],
)
: ListView(
children: [
ContactUs1(),
ContactUs2(),
Footer(),
],
),
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
floatingActionButton: WAChat()
);
}
AppBar AppBarKecil() {
return AppBar(
leading: IconButton(
onPressed: () => _scaffoldKey.currentState!.openDrawer(),
icon: const Icon(
Icons.list_outlined,
size: 30,
color: Colors.black,
),
),
backgroundColor: Colors.white,
centerTitle: true,
title: SizedBox(
height: 50,
width: 150,
child: Image.asset("assets/logo/medapp-logo.png"),
),
// ),
);
}
}
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class ContactUs1 extends StatefulWidget {
const ContactUs1({Key? key}) : super(key: key);
@override
State<ContactUs1> createState() => _ContactUsState();
}
class _ContactUsState extends State<ContactUs1> {
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
return Stack(
children: [
Container(
width: screenSize.width,
height: screenSize.height * 0.42,
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage(
"assets/images/contactus1.jpg",
),
alignment: Alignment.center,
fit: BoxFit.cover)),
),
Container(
width: screenSize.width * 0.5,
height: screenSize.height * 0.34,
padding: EdgeInsets.only(
right: screenSize.width * 0.30, left: screenSize.height * 0.06),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
'Contact Us',
style: GoogleFonts.poppins(
fontSize: 37,
fontWeight: FontWeight.bold,
color: Colors.white),
overflow: TextOverflow.ellipsis,
),
],
),
),
],
);
}
}
This diff is collapsed.
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:medapp_eksad/widget/button_color.dart';
import 'package:show_up_animation/show_up_animation.dart';
class Home1 extends StatelessWidget {
const Home1({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
return Stack(
children: [
Container(
width: screenSize.width,
height: screenSize.height * 0.7,
decoration: const BoxDecoration(
color: Colors.transparent,
image: DecorationImage(
image: AssetImage(
"assets/logo/homepage.png",
),
fit: BoxFit.cover),
),
),
Container(
width: screenSize.width,
height: screenSize.height * 0.7,
decoration: BoxDecoration(
color: Colors.blue,
gradient: LinearGradient(
colors: [
Colors.blue.withOpacity(0.0),
Colors.blue,
],
stops: const [0.0, 1.0],
),
),
),
Container(
// color: Colors.red,
width: screenSize.width,
height: screenSize.height * 0.6,
padding: EdgeInsets.only(
left: screenSize.width * 0.4, top: screenSize.height * 0.12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Container(
// color: Colors.blue,
width: screenSize.width * 0.25,
height: screenSize.height * 0.1,
child: ShowUpAnimation(
delayStart: const Duration(seconds: 1),
direction: Direction.horizontal,
child: Text(
'Engage With Your Patients More Efficiently',
textAlign: TextAlign.center,
style: GoogleFonts.poppins(
fontSize: 26,
fontWeight: FontWeight.bold,
color: Colors.white),
// overflow: TextOverflow.ellipsis,
),
),
),
Container(
// color: Colors.green,
// padding: EdgeInsets.only(top: 1),
width: screenSize.width * 0.3,
height: screenSize.height * 0.17,
child: ShowUpAnimation(
delayStart: const Duration(seconds: 1),
curve: Curves.bounceIn,
direction: Direction.horizontal,
// offset: -0.2,
child: Text(
'Welcome to healthcare’s most powerful collaboration suite. '
'Enhance clinical workflows, speed decisions, and improve'
' patient outcomes, safely and securely.',
textAlign: TextAlign.center,
style: GoogleFonts.poppins(
fontSize: 20,
// letterSpacing: 1.3,
// height: 1.5,
fontWeight: FontWeight.bold,
color: Colors.white),
),
),
),
Container(
width: screenSize.width * 0.15,
height: screenSize.height * 0.07,
child: ShowUpAnimation(
delayStart: const Duration(seconds: 1),
curve: Curves.bounceIn,
direction: Direction.horizontal,
offset: -0.2,
child: ElevatedButton(
onPressed: () {
Navigator.pushNamed(context, '/contact');
},
style: DefaultColors(),
child: const Text(
'TALK WITH EXPERT',
style: TextStyle(
fontSize: 17,
letterSpacing: 2,
color: Colors.white,
fontWeight: FontWeight.w500),
textAlign: TextAlign.center,
),
),
),
)
],
),
),
],
);
}
}
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class Home2 extends StatelessWidget {
const Home2({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
return Container(
width: screenSize.width * 0.5,
color: const Color.fromARGB(255, 227, 235, 253),
height: screenSize.height,
padding: EdgeInsets.only(
left: screenSize.width * 0.10,
right: screenSize.width * 0.10,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Spacer(
flex: 2,
),
Container(
width: screenSize.width,
child: Text('How do we help ?',
style: GoogleFonts.poppins(
fontSize: 30,
color: const Color.fromARGB(255, 12, 66, 101),
fontWeight: FontWeight.bold)),
),
Spacer(
flex: 2,
),
Container(
width: screenSize.width,
height: 100,
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, '
'and seize opportunities that arise will be critical to ensuring the company`s sustainability in the future.',
textAlign: TextAlign.justify,
style: GoogleFonts.poppins(
fontSize: 18,
letterSpacing: 1.1,
height: 1.8,
fontWeight: FontWeight.w500)),
),
Spacer(
flex: 2,
),
Column(
// mainAxisAlignment: MainAxisAlignment.start,
children: [
list_help(
screenSize: screenSize,
titel: 'Costs are getting more expensive'),
list_help(
screenSize: screenSize,
titel: "Demographic Change",
),
list_help(
screenSize: screenSize,
titel: "Rare talents",
),
list_help(
screenSize: screenSize,
titel: "Rapid technological change",
),
list_help(
screenSize: screenSize,
titel: "Changes in consumer behavior",
),
],
),
Spacer(
flex: 2,
),
Container(
width: screenSize.width,
height: 100,
child: Text(
'Too much admin. Longer work hours. Less time spent with patients.'
'You’re not alone in the stress and frustration these cause. At MedApps, '
'our medical practice management software is designed to make your life easier,'
'not harder. Which means you can get on with doing what you do best, in ways that work best for you.',
textAlign: TextAlign.justify,
style: GoogleFonts.poppins(
fontSize: 18,
letterSpacing: 1.1,
height: 1.8,
fontWeight: FontWeight.w500)),
),
Spacer(
flex:2,
),
Container(
width: screenSize.width,
height: 100,
child: Text(
'MedApps combines practice management and clinical workflows into one seamless, modern interface. '
'Manage all patient interactions securely on the go, or in your practice.'
'Benefit from server-free* infrastructure, automatic upgrades and simple licensing.',
textAlign: TextAlign.justify,
style: GoogleFonts.poppins(
fontSize: 18,
letterSpacing: 1.1,
height: 1.8,
fontWeight: FontWeight.w500)),
),
Spacer(
flex: 2,
),
],
),
);
}
}
class list_help extends StatelessWidget {
const list_help({Key? key, required this.screenSize, required this.titel})
: super(key: key);
final Size screenSize;
final String titel;
@override
Widget build(BuildContext context) {
return ListTile(
leading: const Icon(
Icons.circle_rounded,
size: 12,
color: Colors.black,
),
title: Container(
// padding: const EdgeInsets.only(left: 10),
// width: screenSize.width * 0.35,
// height: screenSize.height * 0.1,
child: Text(
titel,
style: GoogleFonts.poppins(
fontSize: 18,
height: 1.3,
),
textAlign: TextAlign.left,
),
));
}
}
This diff is collapsed.
import 'package:flutter/material.dart';
import 'package:medapp_eksad/appbar/appbar_home.dart';
import 'package:medapp_eksad/screen/footer.dart';
import 'package:medapp_eksad/screen/solution/our_solution.dart';
import 'package:medapp_eksad/widget/responsive.dart';
import 'package:flutter/services.dart';
void setPageTitle(String title, BuildContext context) {
SystemChrome.setApplicationSwitcherDescription(ApplicationSwitcherDescription(
label: title,
primaryColor: Theme.of(context).primaryColor.value, // This line is required
));
}
class Solutions extends StatefulWidget {
const Solutions({Key? key}) : super(key: key);
@override
State<Solutions> createState() => _SolutionsState();
}
class _SolutionsState extends State<Solutions> {
final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
@override
Widget build(BuildContext context) {
setPageTitle('MeddApp Solutions', context);
var screenSize = MediaQuery.of(context).size;
return Scaffold(
key: _scaffoldKey,
appBar: ResponsiveWidget.isSmallScreen(context)
? AppBarKecil()
: AppbarHomeLarge(screenSize, context, Colors.black, Colors.black,
Colors.blue, Colors.black, Colors.black),
body: ListView(
children: [OurSolution(), Footer()],
),
);
}
AppBar AppBarKecil() {
return AppBar(
leading: IconButton(
onPressed: () => _scaffoldKey.currentState!.openDrawer(),
icon: Icon(
Icons.list_outlined,
size: 30,
color: Colors.black,
),
),
backgroundColor: Colors.white,
centerTitle: true,
title: Container(
child: SizedBox(
height: 50,
width: 150,
child: Image.asset("assets/logo/medapp-logo.png"),
),
),
// ),
);
}
}
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:show_up_animation/show_up_animation.dart';
class OurSolution extends StatefulWidget {
const OurSolution({Key? key}) : super(key: key);
@override
State<OurSolution> createState() => _OurSolutionState();
}
class _OurSolutionState extends State<OurSolution> {
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
return Stack(
children: [
Container(
width: screenSize.width,
height: screenSize.height * 0.8,
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage(
"assets/images/solution.jpg",
),
alignment: Alignment.topCenter,
fit: BoxFit.cover),
),
),
const SizedBox(
height: 10,
),
SizedBox(
width: screenSize.width,
height: screenSize.height * 0.5,
// ),
),
Container(
padding: EdgeInsets.only(right: screenSize.width * 0.5),
child: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
const SizedBox(height: 70),
Container(
height: screenSize.height * 0.10,
child: ShowUpAnimation(
child: Text(
'Find & Get the Best Talent',
style: GoogleFonts.poppins(
fontSize: 34,
fontWeight: FontWeight.bold,
color: Colors.white),
textAlign: TextAlign.center,
),
),
),
const SizedBox(height: 10),
Container(
width: screenSize.width * 0.28,
height: screenSize.height * 0.15,
child: ShowUpAnimation(
delayStart: const Duration(seconds: 1),
curve: Curves.bounceIn,
direction: Direction.horizontal,
offset: -0.2,
child: Text(
'Register for free now, find our Best Talent, and enjoy our unlimited hires at a low cost',
style: GoogleFonts.poppins(
fontSize: 18,
letterSpacing: 1.8,
height: 1.4,
fontWeight: FontWeight.bold,
color: Colors.white),
textAlign: TextAlign.center,
),
),
),
Container(
height: 50,
child: ShowUpAnimation(
delayStart: const Duration(seconds: 1),
curve: Curves.bounceIn,
direction: Direction.horizontal,
offset: -0.2,
child: ElevatedButton(
onPressed: () {
Navigator.pushNamed(context, '/register');
},
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
primary: Color.fromARGB(255, 48, 104, 170),
// shape: MaterialStateProperty.all(RoundedRectangleBorder(borderRadius: BorderRadius.circular(30.0))),
),
child: const Text(
'FREE DEMO',
style: TextStyle(
fontSize: 19,
fontWeight: FontWeight.w500,
letterSpacing: 1.1,
color: Colors.white),
),
),
),
),
const SizedBox(
height: 10,
)
],
),
),
),
],
);
}
}
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class ContactUs1_small extends StatefulWidget {
const ContactUs1_small({Key? key}) : super(key: key);
@override
State<ContactUs1_small> createState() => _ContactUsState();
}
class _ContactUsState extends State<ContactUs1_small> {
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
return Stack(
children: [
Container(
width: screenSize.width,
height: screenSize.height * 0.42,
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage(
"assets/images/contactus1.jpg",
),
alignment: Alignment.center,
fit: BoxFit.cover)),
),
Container(
width: screenSize.width * 0.5,
height: screenSize.height * 0.34,
padding: EdgeInsets.only(
right: screenSize.width * 0.30, left: screenSize.height * 0.06),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
'Contact Us',
style: GoogleFonts.poppins(
fontSize: 37,
fontWeight: FontWeight.bold,
color: Colors.white),
overflow: TextOverflow.ellipsis,
),
],
),
),
],
);
}
}
This diff is collapsed.
This diff is collapsed.
import 'package:flutter/material.dart';
ButtonStyle DefaultColors() {
return ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith<Color?>(
(Set<MaterialState> states) {
return const Color(0xff1e5ea8); // Defer to the widget's default.
},
),
overlayColor: MaterialStateProperty.resolveWith<Color?>(
(Set<MaterialState> states) {
if (states.contains(MaterialState.hovered)) {
return Colors.red;
} //<-- SEE HERE
return null; // Defer to the widget's default.
},
),
);
}
ButtonStyle Btn_Submit() {
return ButtonStyle(
shape: MaterialStateProperty.resolveWith((ShapeBorder) =>
RoundedRectangleBorder(borderRadius: BorderRadius.circular(8))),
backgroundColor: MaterialStateProperty.resolveWith<Color?>(
(Set<MaterialState> states) {
return const Color(0xff1e5ea8); // Defer to the widget's default.
},
),
overlayColor: MaterialStateProperty.resolveWith<Color?>(
(Set<MaterialState> states) {
if (states.contains(MaterialState.hovered)) {
return Colors.red;
} //<-- SEE HERE
return null; // Defer to the widget's default.
},
),
);
}
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: Container(
decoration: BoxDecoration(
color: Colors.blue,
gradient: LinearGradient(
colors: [
Colors.blue,
Colors.blue.withOpacity(0.0),
],
stops: [0.0, 1.0],
),
),
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;
......
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:spring/spring.dart';
class WAChat extends StatelessWidget {
WAChat({Key? key}) : super(key: key);
void launchWhatsApp({
required final int phone,
required String message,
}) async {
String url() {
return "https://api.whatsapp.com/send?phone=$phone&text=${Uri.parse(message)}";
}
if (await canLaunch(url())) {
await launch(url());
} else {
throw 'Could not launch ${url()}';
}
}
final SpringController springController =
SpringController(initialAnim: Motion.play);
@override
Widget build(BuildContext context) {
return FloatingActionButton(
onPressed: () {
launchWhatsApp(
phone: 6281807890777,
message:
'Hallo, saya tertarik dengan produk EKSAD dan saya ingin tahu lebih lanjut tentang program Protalent');
},
backgroundColor: Colors.green,
child: GestureDetector(
onTap: () {
springController.play(
motion: Motion.reverse,
animDuration: const Duration(milliseconds: 1000),
curve: Curves.easeInBack,
delay: const Duration(milliseconds: 100));
launchWhatsApp(
phone: 6281807890777,
message:
'Hallo, saya tertarik dengan produk EKSAD dan saya ingin tahu lebih lanjut tentang program Protalent');
},
child: Spring.rotate(
endAngle: 360 * 10,
animDuration: const Duration(seconds: 3 * 10),
springController: springController,
alignment: Alignment.center,
animStatus: (AnimStatus status) {},
child: const Icon(Icons.whatsapp, size: 30),
),
),
);
}
}
...@@ -8,13 +8,6 @@ packages: ...@@ -8,13 +8,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.8.2" version: "2.8.2"
axis_layout:
dependency: transitive
description:
name: axis_layout
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:
...@@ -22,13 +15,6 @@ packages: ...@@ -22,13 +15,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "2.1.0"
carousel_slider:
dependency: "direct main"
description:
name: carousel_slider
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.1"
characters: characters:
dependency: transitive dependency: transitive
description: description:
...@@ -78,13 +64,6 @@ packages: ...@@ -78,13 +64,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.0.2" version: "5.0.2"
easy_table:
dependency: "direct main"
description:
name: easy_table
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
...@@ -143,7 +122,7 @@ packages: ...@@ -143,7 +122,7 @@ packages:
source: hosted source: hosted
version: "3.0.1" version: "3.0.1"
http: http:
dependency: transitive dependency: "direct main"
description: description:
name: http name: http
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
...@@ -254,6 +233,13 @@ packages: ...@@ -254,6 +233,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.2" version: "2.1.2"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.11.1"
platform: platform:
dependency: transitive dependency: transitive
description: description:
...@@ -289,6 +275,13 @@ packages: ...@@ -289,6 +275,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.7.0" version: "0.7.0"
simple_animations:
dependency: transitive
description:
name: simple_animations
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.1"
sky_engine: sky_engine:
dependency: transitive dependency: transitive
description: flutter description: flutter
...@@ -301,6 +294,13 @@ packages: ...@@ -301,6 +294,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.2" version: "1.8.2"
spring:
dependency: "direct main"
description:
name: spring
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
...@@ -322,6 +322,20 @@ packages: ...@@ -322,6 +322,20 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.0"
supercharged:
dependency: transitive
description:
name: supercharged
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
supercharged_dart:
dependency: transitive
description:
name: supercharged_dart
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
term_glyph: term_glyph:
dependency: transitive dependency: transitive
description: description:
...@@ -343,6 +357,13 @@ packages: ...@@ -343,6 +357,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.1" version: "1.3.1"
universal_platform:
dependency: transitive
description:
name: universal_platform
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0+1"
url_launcher: url_launcher:
dependency: "direct main" dependency: "direct main"
description: description:
......
...@@ -35,8 +35,6 @@ dependencies: ...@@ -35,8 +35,6 @@ dependencies:
font_awesome_flutter: ^10.1.0 font_awesome_flutter: ^10.1.0
intl: ^0.17.0 intl: ^0.17.0
dropdown_search: ^5.0.2 dropdown_search: ^5.0.2
carousel_slider: ^4.1.1
easy_table: ^2.0.1
sidebarx: ^0.7.0 sidebarx: ^0.7.0
flutter_web_plugins: flutter_web_plugins:
sdk: flutter sdk: flutter
...@@ -46,6 +44,8 @@ dependencies: ...@@ -46,6 +44,8 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2 cupertino_icons: ^1.0.2
show_up_animation: ^2.0.0 show_up_animation: ^2.0.0
http: ^0.13.4
spring: ^2.0.2
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
......
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