Commit 9c9750a9 authored by Tohap Maruli Pasaribu's avatar Tohap Maruli Pasaribu

Merge branch 'master' of http://103.44.149.204/qorridi/medapp_eksad into develop

parents 41df0161 efdca11d
...@@ -27,18 +27,18 @@ Future<bool> createSetting(im, tt, em, no) async { ...@@ -27,18 +27,18 @@ Future<bool> createSetting(im, tt, em, no) async {
} }
} }
Future<bool> updateSetting(id, image, name, title, email, no,) async { Future<bool> updateSetting(id, title, email, no,) async {
final response = await http final response = await http
.put(Uri.parse('$cmd/setting/updateSetting'), .put(Uri.parse('$cmd/setting/updateSetting'),
body: jsonEncode({ body: jsonEncode({
"idsetting": id, "idsetting": id,
"image": image, // "image": image,
"name": name, //"name": name,
"title": title, "title": title,
// "tagline": tagline, // "tagline": tagline,
"email": email, "email": email,
"no": no, "no": no,
"idrole": "R001",
}), }),
headers: { headers: {
'Content-type': 'application/json; charset=UTF-8', 'Content-type': 'application/json; charset=UTF-8',
...@@ -61,3 +61,9 @@ Future<List<dynamic>> getSettingDesc() async { ...@@ -61,3 +61,9 @@ Future<List<dynamic>> getSettingDesc() async {
Uri.parse('$qry/setting/getSettingByIdDesc')); Uri.parse('$qry/setting/getSettingByIdDesc'));
return jsonDecode(response.body)['data']; return jsonDecode(response.body)['data'];
} }
Future<dynamic> getSettingDesc2() async {
var response = await http.get(
Uri.parse('$qry/setting/getSettingByIdDesc'));
return jsonDecode(response.body)['data'];
}
\ No newline at end of file
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:medapp_eksad/firebase/firebase_auth_methods.dart';
import 'package:medapp_eksad/widget/button_appbar.dart'; import 'package:medapp_eksad/widget/button_appbar.dart';
import 'package:medapp_eksad/register.dart'; import 'package:medapp_eksad/register.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:medapp_eksad/firebase/firebase_auth_methods.dart';
AppBar AppbarHomeLarge(Size screenSize, BuildContext context, Color home, AppBar AppbarHomeLarge(Size screenSize, BuildContext context, Color home,
......
...@@ -146,10 +146,10 @@ class _Dashboard4State extends State<Dashboard4> { ...@@ -146,10 +146,10 @@ class _Dashboard4State extends State<Dashboard4> {
content: Form( content: Form(
child: Container( child: Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: screenSize.width * 0.045, left: screenSize.width * 0.040,
top: screenSize.height * 0.01), top: screenSize.height * 0.01),
width: screenSize.width * 0.50, width: screenSize.width * 0.55,
height: screenSize.height * 0.50, height: screenSize.height * 0.55,
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
......
This diff is collapsed.
...@@ -6,6 +6,8 @@ import 'package:medapp_eksad/dashboard/admin/admin_setting.dart'; ...@@ -6,6 +6,8 @@ import 'package:medapp_eksad/dashboard/admin/admin_setting.dart';
import 'package:medapp_eksad/dashboard/admin/admin_sosmed.dart'; import 'package:medapp_eksad/dashboard/admin/admin_sosmed.dart';
import 'package:medapp_eksad/dashboard/admin/admin_userControl.dart'; import 'package:medapp_eksad/dashboard/admin/admin_userControl.dart';
import 'package:medapp_eksad/dashboard/admin/admin_whatsapp.dart'; import 'package:medapp_eksad/dashboard/admin/admin_whatsapp.dart';
import 'package:provider/provider.dart';
import 'package:medapp_eksad/firebase/firebase_auth_methods.dart';
class DashboardAdmin extends StatefulWidget { class DashboardAdmin extends StatefulWidget {
const DashboardAdmin({Key? key}) : super(key: key); const DashboardAdmin({Key? key}) : super(key: key);
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:medapp_eksad/api/setting_api.dart';
import 'package:medapp_eksad/appbar/appbar_home.dart'; import 'package:medapp_eksad/appbar/appbar_home.dart';
import 'package:medapp_eksad/screen_small/small_contact/small_contact_us2.dart'; import 'package:medapp_eksad/screen_small/small_contact/small_contact_us2.dart';
import 'package:medapp_eksad/screen/contact_us/contact_us2.dart'; import 'package:medapp_eksad/screen/contact_us/contact_us2.dart';
...@@ -12,6 +14,7 @@ import 'package:medapp_eksad/screen_small/small_home/small_home1.dart'; ...@@ -12,6 +14,7 @@ import 'package:medapp_eksad/screen_small/small_home/small_home1.dart';
import 'package:medapp_eksad/screen_small/small_home/small_home2.dart'; import 'package:medapp_eksad/screen_small/small_home/small_home2.dart';
import 'package:medapp_eksad/screen_small/small_home/small_home3.dart'; import 'package:medapp_eksad/screen_small/small_home/small_home3.dart';
import 'package:medapp_eksad/screen_small/small_home/small_home4.dart'; import 'package:medapp_eksad/screen_small/small_home/small_home4.dart';
import 'package:medapp_eksad/widget/Scroll_top.dart';
import 'package:medapp_eksad/widget/drawer.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';
...@@ -32,10 +35,26 @@ class HomePage extends StatefulWidget { ...@@ -32,10 +35,26 @@ class HomePage extends StatefulWidget {
} }
class _HomePageState extends State<HomePage> { class _HomePageState extends State<HomePage> {
// Untuk pake PAGE per index
PageController controller = PageController();
void _scrollToIndex2(int index) {
controller.animateToPage(index,
duration: const Duration(seconds: 2),
curve: Curves.fastLinearToSlowEaseIn);
}
// Untuk pake LIST per height container
ScrollController controller2 = ScrollController();
void _scrollToIndex(double index) {
controller2.animateTo(index,
duration: const Duration(seconds: 1),
curve: Curves.fastLinearToSlowEaseIn);
}
final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
setPageTitle('MedApp by Eksad', context); // setPageTitle('MedApp by Eksad', context);
var screenSize = MediaQuery.of(context).size; var screenSize = MediaQuery.of(context).size;
return Scaffold( return Scaffold(
key: _scaffoldKey, key: _scaffoldKey,
...@@ -46,29 +65,94 @@ class _HomePageState extends State<HomePage> { ...@@ -46,29 +65,94 @@ class _HomePageState extends State<HomePage> {
Colors.black, Colors.black, Colors.black), Colors.black, Colors.black, Colors.black),
drawer: const DrawerMedApp(), drawer: const DrawerMedApp(),
body: ResponsiveWidget.isSmallScreen(context) body: ResponsiveWidget.isSmallScreen(context)
? ListView( ? Stack(
children: const [ children: [
SmallHome1(), FutureBuilder<dynamic>(
SmallHome2(), future: getSettingDesc2(),
SmallHome3(), builder: (BuildContext context, AsyncSnapshot snapshot) {
SmallHome4(), var pgm = snapshot.data[0];
ContactUs2_small(), return Title(
FooterSmall(), title: pgm['title'],
color: Colors.white,
child: ListView(
scrollDirection: Axis.vertical,
controller: controller2,
children: [
SmallHome1(wijet: Button_scroll_small()),
SmallHome2(),
SmallHome3(),
SmallHome4(),
ContactUs2_small(),
FooterSmall(),
],
),
);
},
),
ScrollUpButton(controller2),
], ],
) )
: ListView( : Stack(
children: [ children: [
const Home1(), FutureBuilder<dynamic>(
const Home2(), future: getSettingDesc2(),
const Home3(), builder: (BuildContext context, AsyncSnapshot snapshot) {
const Home4(), var pgm = snapshot.data[0];
ContactUs2(), return Title(
Footer(), title: pgm['title'],
color: Colors.white,
child: ListView(
scrollDirection: Axis.vertical,
controller: controller2,
children: [
Home1(wijet: Button_scroll()),
const Home2(),
const Home3(),
const Home4(),
ContactUs2(),
Footer(),
],
),
);
},
),
ScrollUpButton(controller2),
], ],
), ),
); );
} }
ElevatedButton Button_scroll() {
return ElevatedButton(
onPressed: () {
_scrollToIndex(3780);
},
style: ElevatedButton.styleFrom(
primary: const Color(0xff1e5ea8),
),
child: Text(
'CONTACT US',
style: GoogleFonts.poppins(
fontSize: 17, letterSpacing: 2, fontWeight: FontWeight.w500),
),
);
}
ElevatedButton Button_scroll_small() {
return ElevatedButton(
onPressed: () {
_scrollToIndex(5410);
},
style: ElevatedButton.styleFrom(
primary: const Color(0xff1e5ea8), fixedSize: const Size(50, 20)),
child: Text(
'CONTACT US',
style: GoogleFonts.poppins(
fontSize: 15, letterSpacing: 1.5, fontWeight: FontWeight.w500),
),
);
}
AppBar AppBarKecil() { AppBar AppBarKecil() {
return AppBar( return AppBar(
leading: IconButton( leading: IconButton(
......
...@@ -29,10 +29,10 @@ class _SignInState extends State<SignIn> { ...@@ -29,10 +29,10 @@ class _SignInState extends State<SignIn> {
void loginUser() { void loginUser() {
context.read<FirebaseAuthMethods>().loginWithEmail( context.read<FirebaseAuthMethods>().loginWithEmail(
email: emailController.text, email: emailController.text,
password: passwordController.text, password: passwordController.text,
context: context, context: context,
); );
} }
@override @override
...@@ -42,7 +42,6 @@ class _SignInState extends State<SignIn> { ...@@ -42,7 +42,6 @@ class _SignInState extends State<SignIn> {
return Scaffold( return Scaffold(
body: Stack( body: Stack(
children: [ children: [
Container( Container(
decoration: const BoxDecoration( decoration: const BoxDecoration(
image: DecorationImage( image: DecorationImage(
...@@ -57,7 +56,6 @@ class _SignInState extends State<SignIn> { ...@@ -57,7 +56,6 @@ class _SignInState extends State<SignIn> {
bottom: screenSize.height * 0.13), bottom: screenSize.height * 0.13),
child: Stack( child: Stack(
children: [ children: [
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: const Color.fromARGB(255, 10, 116, 255), color: const Color.fromARGB(255, 10, 116, 255),
...@@ -71,7 +69,8 @@ class _SignInState extends State<SignIn> { ...@@ -71,7 +69,8 @@ class _SignInState extends State<SignIn> {
), ),
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: screenSize.width * 0.33, top: screenSize.height * 0.07), left: screenSize.width * 0.33,
top: screenSize.height * 0.07),
child: Container( child: Container(
width: screenSize.width * 0.3, width: screenSize.width * 0.3,
height: screenSize.height * 0.6, height: screenSize.height * 0.6,
...@@ -106,8 +105,8 @@ class _SignInState extends State<SignIn> { ...@@ -106,8 +105,8 @@ class _SignInState extends State<SignIn> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
padding: padding: EdgeInsets.only(
EdgeInsets.only(left: screenSize.width * 0.055), left: screenSize.width * 0.055),
height: screenSize.width * 0.02, height: screenSize.width * 0.02,
child: Image.asset("assets/logo/medapp-logo.png"), child: Image.asset("assets/logo/medapp-logo.png"),
), ),
...@@ -136,8 +135,15 @@ class _SignInState extends State<SignIn> { ...@@ -136,8 +135,15 @@ class _SignInState extends State<SignIn> {
child: TextFormField( child: TextFormField(
controller: emailController, controller: emailController,
textAlign: TextAlign.start, textAlign: TextAlign.start,
onFieldSubmitted: (String value){ onFieldSubmitted: (String value) {
loginUser(); if (emailController.value.text ==
'admin@admin.com' &&
passwordController.value.text ==
'administrator') {
Navigator.pushNamed(context, '/dashboard');
} else {
loginUser();
}
}, },
decoration: InputDecoration( decoration: InputDecoration(
labelText: "Enter Your Email", labelText: "Enter Your Email",
...@@ -183,8 +189,15 @@ class _SignInState extends State<SignIn> { ...@@ -183,8 +189,15 @@ class _SignInState extends State<SignIn> {
width: screenSize.width * 0.2, width: screenSize.width * 0.2,
child: TextFormField( child: TextFormField(
controller: passwordController, controller: passwordController,
onFieldSubmitted: (String value){ onFieldSubmitted: (String value) {
loginUser(); if (emailController.value.text ==
'admin@admin.com' &&
passwordController.value.text ==
'administrator') {
Navigator.pushNamed(context, '/dashboard');
} else {
loginUser();
}
}, },
textAlign: TextAlign.start, textAlign: TextAlign.start,
obscureText: _isObscure, obscureText: _isObscure,
...@@ -224,10 +237,15 @@ class _SignInState extends State<SignIn> { ...@@ -224,10 +237,15 @@ class _SignInState extends State<SignIn> {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
TextButton(onPressed: (){ TextButton(
Navigator.pushNamed(context, '/reset_password'); onPressed: () {
}, child: Text('Forgot Password?')), Navigator.pushNamed(
SizedBox(width: 52,) context, '/reset_password');
},
child: Text('Forgot Password?')),
SizedBox(
width: 52,
)
], ],
), ),
const Spacer( const Spacer(
...@@ -240,10 +258,13 @@ class _SignInState extends State<SignIn> { ...@@ -240,10 +258,13 @@ class _SignInState extends State<SignIn> {
width: screenSize.width * 0.08, width: screenSize.width * 0.08,
child: ElevatedButton( child: ElevatedButton(
onPressed: () { onPressed: () {
if (emailController.value.text == 'admin@admin.com' && if (emailController.value.text ==
passwordController.value.text == 'administrator') { 'admin@admin.com' &&
Navigator.pushNamed(context, '/dashboard'); passwordController.value.text ==
}else{ 'administrator') {
Navigator.pushNamed(
context, '/dashboard');
} else {
loginUser(); loginUser();
} }
// if (emailController.value.text == emailController && // if (emailController.value.text == emailController &&
...@@ -321,9 +342,11 @@ class _SignInState extends State<SignIn> { ...@@ -321,9 +342,11 @@ class _SignInState extends State<SignIn> {
), ),
Padding( Padding(
padding: const EdgeInsets.all(21.0), padding: const EdgeInsets.all(21.0),
child: ElevatedButton(onPressed: (){ child: ElevatedButton(
Navigator.pushNamed(context, '/'); onPressed: () {
}, child: Icon(Icons.arrow_back)), Navigator.pushNamed(context, '/');
},
child: Icon(Icons.arrow_back)),
), ),
], ],
), ),
......
...@@ -40,7 +40,7 @@ class MyApp extends StatelessWidget { ...@@ -40,7 +40,7 @@ class MyApp extends StatelessWidget {
], ],
child: MaterialApp( child: MaterialApp(
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
title: "MedApp by Eksad", // title: "MedApp by Eksad",
initialRoute: '/', initialRoute: '/',
routes: { routes: {
'/': (context) => const HomePage(), '/': (context) => const HomePage(),
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:medapp_eksad/api/setting_api.dart';
import 'package:medapp_eksad/appbar/appbar_home.dart'; import 'package:medapp_eksad/appbar/appbar_home.dart';
import 'package:medapp_eksad/screen_small/small_contact/small_contact_us2.dart'; import 'package:medapp_eksad/screen_small/small_contact/small_contact_us2.dart';
import 'package:medapp_eksad/screen/contact_us/contact_us2.dart'; import 'package:medapp_eksad/screen/contact_us/contact_us2.dart';
...@@ -12,6 +14,7 @@ import 'package:medapp_eksad/screen_small/small_home/small_home1.dart'; ...@@ -12,6 +14,7 @@ import 'package:medapp_eksad/screen_small/small_home/small_home1.dart';
import 'package:medapp_eksad/screen_small/small_home/small_home2.dart'; import 'package:medapp_eksad/screen_small/small_home/small_home2.dart';
import 'package:medapp_eksad/screen_small/small_home/small_home3.dart'; import 'package:medapp_eksad/screen_small/small_home/small_home3.dart';
import 'package:medapp_eksad/screen_small/small_home/small_home4.dart'; import 'package:medapp_eksad/screen_small/small_home/small_home4.dart';
import 'package:medapp_eksad/widget/Scroll_top.dart';
import 'package:medapp_eksad/widget/drawer.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';
...@@ -32,6 +35,22 @@ class AboutUs extends StatefulWidget { ...@@ -32,6 +35,22 @@ class AboutUs extends StatefulWidget {
} }
class _AboutUsState extends State<AboutUs> { class _AboutUsState extends State<AboutUs> {
// Untuk pake PAGE per index
PageController controller = PageController();
void _scrollToIndex2(int index) {
controller.animateToPage(index,
duration: const Duration(seconds: 2),
curve: Curves.fastLinearToSlowEaseIn);
}
// Untuk pake LIST per height container
ScrollController controller2 = ScrollController();
void _scrollToIndex(double index) {
controller2.animateTo(index,
duration: const Duration(seconds: 1),
curve: Curves.fastLinearToSlowEaseIn);
}
final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -43,28 +62,71 @@ class _AboutUsState extends State<AboutUs> { ...@@ -43,28 +62,71 @@ class _AboutUsState extends State<AboutUs> {
appBar: ResponsiveWidget.isSmallScreen(context) appBar: ResponsiveWidget.isSmallScreen(context)
? AppBarKecil() ? AppBarKecil()
: AppbarHomeLarge(screenSize, context, Colors.black, Colors.blue, : AppbarHomeLarge(screenSize, context, Colors.black, Colors.blue,
Colors.black, Colors.black, Colors.black), Colors.black, Colors.black, Colors.black),
drawer: const DrawerMedApp(), drawer: const DrawerMedApp(),
body: ResponsiveWidget.isSmallScreen(context) body: ResponsiveWidget.isSmallScreen(context)
? ListView( ? Stack(
children: const [ children: [
SmallHome1(), ListView(
SmallHome2(), scrollDirection: Axis.vertical,
SmallHome3(), controller: controller2,
SmallHome4(), children: [
ContactUs2_small(), SmallHome1(wijet: Button_scroll_small()),
FooterSmall(), SmallHome2(),
], SmallHome3(),
) SmallHome4(),
: ListView( ContactUs2_small(),
children: [ FooterSmall(),
const Home1(), ],
const Home2(), ),
const Home3(), ],
const Home4(), )
ContactUs2(), : Stack(
Footer(), children: [
], ListView(
scrollDirection: Axis.vertical,
controller: controller2,
children: [
Home1(wijet: Button_scroll()),
const Home2(),
const Home3(),
const Home4(),
ContactUs2(),
Footer(),
],
),
],
),
);
}
ElevatedButton Button_scroll() {
return ElevatedButton(
onPressed: () {
_scrollToIndex(3780);
},
style: ElevatedButton.styleFrom(
primary: const Color(0xff1e5ea8),
),
child: Text(
'CONTACT US',
style: GoogleFonts.poppins(
fontSize: 17, letterSpacing: 2, fontWeight: FontWeight.w500),
),
);
}
ElevatedButton Button_scroll_small() {
return ElevatedButton(
onPressed: () {
_scrollToIndex(5410);
},
style: ElevatedButton.styleFrom(
primary: const Color(0xff1e5ea8), fixedSize: const Size(50, 20)),
child: Text(
'CONTACT US',
style: GoogleFonts.poppins(
fontSize: 15, letterSpacing: 1.5, fontWeight: FontWeight.w500),
), ),
); );
} }
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:medapp_eksad/api/setting_api.dart';
import 'package:medapp_eksad/appbar/appbar_home.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_us1.dart';
import 'package:medapp_eksad/screen_small/small_contact/small_contact_us2.dart'; import 'package:medapp_eksad/screen_small/small_contact/small_contact_us2.dart';
...@@ -6,6 +8,7 @@ import 'package:medapp_eksad/screen_small/small_footer.dart'; ...@@ -6,6 +8,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/Scroll_top.dart';
import 'package:medapp_eksad/widget/drawer.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';
...@@ -26,6 +29,22 @@ class ContactUs extends StatefulWidget { ...@@ -26,6 +29,22 @@ class ContactUs extends StatefulWidget {
} }
class _ContactUsState extends State<ContactUs> { class _ContactUsState extends State<ContactUs> {
// Untuk pake PAGE per index
PageController controller = PageController();
void _scrollToIndex2(int index) {
controller.animateToPage(index,
duration: const Duration(seconds: 2),
curve: Curves.fastLinearToSlowEaseIn);
}
// Untuk pake LIST per height container
ScrollController controller2 = ScrollController();
void _scrollToIndex(double index) {
controller2.animateTo(index,
duration: const Duration(seconds: 1),
curve: Curves.fastLinearToSlowEaseIn);
}
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -39,22 +58,64 @@ class _ContactUsState extends State<ContactUs> { ...@@ -39,22 +58,64 @@ class _ContactUsState extends State<ContactUs> {
Colors.black, Colors.black, Colors.blue), Colors.black, Colors.black, Colors.blue),
drawer: const DrawerMedApp(), drawer: const DrawerMedApp(),
body: ResponsiveWidget.isSmallScreen(context) body: ResponsiveWidget.isSmallScreen(context)
? ListView( ? Stack(
children: const [ children: [
ContactUs1_small(), ListView(
ContactUs2_small(), scrollDirection: Axis.vertical,
FooterSmall(), controller: controller2,
children: [
ContactUs1_small(wijet: Button_scroll_small()),
ContactUs2_small(),
FooterSmall(),
],
),
], ],
) )
: ListView( : Stack(
children: [ children: [
ContactUs1(), ListView(
ContactUs2(), scrollDirection: Axis.vertical,
Footer(), controller: controller2,
children: [
ContactUs1(wijet: Button_scroll()),
ContactUs2(),
Footer(),
],
),
], ],
), ),
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat, floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
floatingActionButton: WAChat() floatingActionButton: WAChat());
}
ElevatedButton Button_scroll() {
return ElevatedButton(
onPressed: () {
_scrollToIndex(3780);
},
style: ElevatedButton.styleFrom(
primary: const Color(0xff1e5ea8),
),
child: Text(
'CONTACT US',
style: GoogleFonts.poppins(
fontSize: 17, letterSpacing: 2, fontWeight: FontWeight.w500),
),
);
}
ElevatedButton Button_scroll_small() {
return ElevatedButton(
onPressed: () {
_scrollToIndex(5410);
},
style: ElevatedButton.styleFrom(
primary: const Color(0xff1e5ea8), fixedSize: const Size(50, 20)),
child: Text(
'CONTACT US',
style: GoogleFonts.poppins(
fontSize: 15, letterSpacing: 1.5, fontWeight: FontWeight.w500),
),
); );
} }
......
...@@ -2,7 +2,8 @@ import 'package:flutter/material.dart'; ...@@ -2,7 +2,8 @@ import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart'; import 'package:google_fonts/google_fonts.dart';
class ContactUs1 extends StatefulWidget { class ContactUs1 extends StatefulWidget {
const ContactUs1({Key? key}) : super(key: key); ContactUs1({Key? key, required this.wijet}) : super(key: key);
final Widget wijet;
@override @override
State<ContactUs1> createState() => _ContactUsState(); State<ContactUs1> createState() => _ContactUsState();
...@@ -26,10 +27,10 @@ class _ContactUsState extends State<ContactUs1> { ...@@ -26,10 +27,10 @@ class _ContactUsState extends State<ContactUs1> {
fit: BoxFit.cover)), fit: BoxFit.cover)),
), ),
Container( Container(
width: screenSize.width * 0.5, width: screenSize.width * 0.6,
height: screenSize.height * 0.34, height: screenSize.height * 0.34,
padding: EdgeInsets.only( padding: EdgeInsets.only(
right: screenSize.width * 0.30, left: screenSize.height * 0.06), right: screenSize.width * 0.30, left: screenSize.height * 0.22),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
...@@ -37,7 +38,7 @@ class _ContactUsState extends State<ContactUs1> { ...@@ -37,7 +38,7 @@ class _ContactUsState extends State<ContactUs1> {
Text( Text(
'Contact Us', 'Contact Us',
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 37, fontSize: 30,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.white), color: Colors.white),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
......
...@@ -18,6 +18,9 @@ class ContactUs2 extends StatelessWidget { ...@@ -18,6 +18,9 @@ class ContactUs2 extends StatelessWidget {
final emailController = TextEditingController(); final emailController = TextEditingController();
final messageController = TextEditingController(); final messageController = TextEditingController();
String pattern =
r'(\+62|62|0)(\d{2,3})?\)?[ .-]?\d{2,4}[ .-]?\d{2,4}[ .-]?\d{2,4}';
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size; var screenSize = MediaQuery.of(context).size;
...@@ -49,45 +52,37 @@ class ContactUs2 extends StatelessWidget { ...@@ -49,45 +52,37 @@ class ContactUs2 extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
SizedBox(
height: screenSize.height * 0.23,
child: Text(
'Yes, you need '
'\n'
'an outsourcing partner '
'you can trust and thrive with',
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 30,
fontWeight: FontWeight.bold)),
),
const Spacer( const Spacer(
flex: 1, flex: 2,
),
SizedBox(
height: screenSize.height * 0.22,
child: Text(
'Go for the one who knows what they are doing, those who you share values with, '
'and those who will celebrate your success, and help you win over your biggest challenges. '
'\nLooking for an outsourcing partner? ',
textAlign: TextAlign.justify,
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 18,
// fontWeight: FontWeight.bold,
letterSpacing: 1.1)),
), ),
Text("Leave Your Contact Info and Let's Discuss Business",
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 30,
fontWeight: FontWeight.w500)),
// const Spacer(
// flex: 1,
// ),
// Text("Let's Discuss Business",
// style: GoogleFonts.poppins(
// color: Colors.white,
// fontSize: 35,
//
// fontWeight: FontWeight.w500,
// // fontWeight: FontWeight.bold,
// letterSpacing: 1.1)
// ),
const Spacer( const Spacer(
flex: 1, flex: 1,
), ),
Text("We’ll contact you immediately to discuss to help you.", Text(
"We’ll contact you immediately to discuss potential business",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
color: Colors.white, color: Colors.white,
fontSize: 18, fontSize: 18,
letterSpacing: 1.2)), fontWeight: FontWeight.w500)),
const Spacer( const Spacer(
flex: 2, flex: 3,
), ),
], ],
), ),
...@@ -186,6 +181,8 @@ class ContactUs2 extends StatelessWidget { ...@@ -186,6 +181,8 @@ class ContactUs2 extends StatelessWidget {
validator: (value) { validator: (value) {
if (value == null || value.isEmpty) { if (value == null || value.isEmpty) {
return 'Please enter your phone number'; return 'Please enter your phone number';
} else if (!RegExp(pattern).hasMatch(value)) {
return 'Start with 628 or 08';
} }
return null; return null;
}, },
......
This diff is collapsed.
...@@ -6,7 +6,8 @@ import 'package:medapp_eksad/widget/button_color.dart'; ...@@ -6,7 +6,8 @@ import 'package:medapp_eksad/widget/button_color.dart';
import 'package:show_up_animation/show_up_animation.dart'; import 'package:show_up_animation/show_up_animation.dart';
class Home1 extends StatelessWidget { class Home1 extends StatelessWidget {
const Home1({Key? key}) : super(key: key); Home1({Key? key, required this.wijet}) : super(key: key);
final Widget wijet;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
......
...@@ -23,7 +23,7 @@ class _Home3State extends State<Home3> { ...@@ -23,7 +23,7 @@ class _Home3State extends State<Home3> {
const SizedBox( const SizedBox(
height: 45, height: 45,
), ),
Text("Why MedApp ?", Text("Our Features",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 36, fontSize: 36,
color: const Color(0xff1e5ea8), color: const Color(0xff1e5ea8),
...@@ -45,7 +45,7 @@ class _Home3State extends State<Home3> { ...@@ -45,7 +45,7 @@ class _Home3State extends State<Home3> {
child: Animasi_Kiri_Kanan( child: Animasi_Kiri_Kanan(
screenSize: screenSize, screenSize: screenSize,
widget: Image.asset( widget: Image.asset(
'assets/icons/why1.png', 'assets/icons/queuesystem.png',
height: 60, height: 60,
width: 60, width: 60,
) )
...@@ -94,7 +94,7 @@ class _Home3State extends State<Home3> { ...@@ -94,7 +94,7 @@ class _Home3State extends State<Home3> {
child: Animasi_Kiri_Kanan( child: Animasi_Kiri_Kanan(
screenSize: screenSize, screenSize: screenSize,
widget: Image.asset( widget: Image.asset(
'assets/icons/why2.png', 'assets/icons/patientnotification.png',
height: 60, height: 60,
width: 60, width: 60,
))), ))),
...@@ -142,7 +142,7 @@ class _Home3State extends State<Home3> { ...@@ -142,7 +142,7 @@ class _Home3State extends State<Home3> {
child: Animasi_Kiri_Kanan( child: Animasi_Kiri_Kanan(
screenSize: screenSize, screenSize: screenSize,
widget: Image.asset( widget: Image.asset(
'assets/icons/why3.png', 'assets/icons/selfregistration.png',
height: 60, height: 60,
width: 60, width: 60,
))), ))),
...@@ -193,7 +193,7 @@ class _Home3State extends State<Home3> { ...@@ -193,7 +193,7 @@ class _Home3State extends State<Home3> {
child: Animasi_Kiri_Kanan( child: Animasi_Kiri_Kanan(
screenSize: screenSize, screenSize: screenSize,
widget: Image.asset( widget: Image.asset(
'assets/icons/why4.png', 'assets/icons/multipayment.png',
height: 60, height: 60,
width: 60, width: 60,
))), ))),
...@@ -313,7 +313,7 @@ class _Home3State extends State<Home3> { ...@@ -313,7 +313,7 @@ class _Home3State extends State<Home3> {
child: Animasi_Kiri_Kanan( child: Animasi_Kiri_Kanan(
screenSize: screenSize, screenSize: screenSize,
widget: Image.asset( widget: Image.asset(
'assets/icons/why4.png', 'assets/icons/otherfeatures.png',
height: 60, height: 60,
width: 60, width: 60,
))), ))),
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:medapp_eksad/api/setting_api.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/contact_us/contact_us2.dart';
import 'package:medapp_eksad/screen/footer.dart'; import 'package:medapp_eksad/screen/footer.dart';
...@@ -8,6 +10,7 @@ import 'package:medapp_eksad/screen/solution/our_solution3.dart'; ...@@ -8,6 +10,7 @@ import 'package:medapp_eksad/screen/solution/our_solution3.dart';
import 'package:medapp_eksad/screen_small/small_footer.dart'; import 'package:medapp_eksad/screen_small/small_footer.dart';
import 'package:medapp_eksad/screen_small/small_solution/small_solution1.dart'; import 'package:medapp_eksad/screen_small/small_solution/small_solution1.dart';
import 'package:medapp_eksad/screen_small/small_solution/small_solution2.dart'; import 'package:medapp_eksad/screen_small/small_solution/small_solution2.dart';
import 'package:medapp_eksad/widget/Scroll_top.dart';
import 'package:medapp_eksad/widget/componen.dart'; import 'package:medapp_eksad/widget/componen.dart';
import 'package:medapp_eksad/widget/drawer.dart'; import 'package:medapp_eksad/widget/drawer.dart';
import 'package:medapp_eksad/widget/responsive.dart'; import 'package:medapp_eksad/widget/responsive.dart';
...@@ -39,7 +42,7 @@ class _SolutionsState extends State<Solutions> { ...@@ -39,7 +42,7 @@ class _SolutionsState extends State<Solutions> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
setPageTitle('MeddApp Solutions', context); setPageTitle('Our Solutions', context);
var screenSize = MediaQuery.of(context).size; var screenSize = MediaQuery.of(context).size;
return Scaffold( return Scaffold(
key: _scaffoldKey, key: _scaffoldKey,
...@@ -50,22 +53,33 @@ class _SolutionsState extends State<Solutions> { ...@@ -50,22 +53,33 @@ class _SolutionsState extends State<Solutions> {
Colors.blue, Colors.black, Colors.black), Colors.blue, Colors.black, Colors.black),
drawer: const DrawerMedApp(), drawer: const DrawerMedApp(),
body: ResponsiveWidget.isSmallScreen(context) body: ResponsiveWidget.isSmallScreen(context)
? ListView( ? Stack(
children: const [ children: [
SmallOurSolution(), ListView(
SmallOurSolution2(), scrollDirection: Axis.vertical,
FooterSmall(), controller: controller2,
children: [
SmallOurSolution(wijet: Button_scroll()),
SmallOurSolution2(),
FooterSmall(),
],
),
], ],
) )
: ListView( : Stack(
controller: controller2,
children: [ children: [
OurSolution( ListView(
button: ButtonSolution(context), controller: controller2,
children: [
OurSolution(
wijet: Button_scroll(),
button: ButtonSolution(context),
),
OurSolution2(),
ContactUs2(),
Footer(),
],
), ),
OurSolution2(),
ContactUs2(),
Footer(),
], ],
), ),
); );
...@@ -95,6 +109,37 @@ class _SolutionsState extends State<Solutions> { ...@@ -95,6 +109,37 @@ class _SolutionsState extends State<Solutions> {
); );
} }
ElevatedButton Button_scroll() {
return ElevatedButton(
onPressed: () {
_scrollToIndex(3780);
},
style: ElevatedButton.styleFrom(
primary: const Color(0xff1e5ea8),
),
child: Text(
'CONTACT US',
style: GoogleFonts.poppins(
fontSize: 17, letterSpacing: 2, fontWeight: FontWeight.w500),
),
);
}
ElevatedButton Button_scroll_small() {
return ElevatedButton(
onPressed: () {
_scrollToIndex(5410);
},
style: ElevatedButton.styleFrom(
primary: const Color(0xff1e5ea8), fixedSize: const Size(50, 20)),
child: Text(
'CONTACT US',
style: GoogleFonts.poppins(
fontSize: 15, letterSpacing: 1.5, fontWeight: FontWeight.w500),
),
);
}
AppBar AppBarKecil() { AppBar AppBarKecil() {
return AppBar( return AppBar(
leading: IconButton( leading: IconButton(
......
...@@ -2,11 +2,14 @@ import 'package:flutter/material.dart'; ...@@ -2,11 +2,14 @@ import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart'; import 'package:google_fonts/google_fonts.dart';
import 'package:show_up_animation/show_up_animation.dart'; import 'package:show_up_animation/show_up_animation.dart';
class OurSolution extends StatelessWidget { class OurSolution extends StatelessWidget {
const OurSolution({Key? key,required this.button}) : super(key: key); OurSolution({
Key? key,
required this.button,
required this.wijet,
}) : super(key: key);
final Widget button; final Widget button;
final Widget wijet;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
......
...@@ -3,7 +3,8 @@ import 'package:google_fonts/google_fonts.dart'; ...@@ -3,7 +3,8 @@ import 'package:google_fonts/google_fonts.dart';
class ContactUs1_small extends StatefulWidget { class ContactUs1_small extends StatefulWidget {
const ContactUs1_small({Key? key}) : super(key: key); ContactUs1_small({Key? key, required this.wijet}) : super(key: key);
final Widget wijet;
@override @override
State<ContactUs1_small> createState() => _ContactUsState(); State<ContactUs1_small> createState() => _ContactUsState();
......
This diff is collapsed.
...@@ -3,9 +3,9 @@ import 'package:google_fonts/google_fonts.dart'; ...@@ -3,9 +3,9 @@ import 'package:google_fonts/google_fonts.dart';
import 'package:medapp_eksad/widget/button_color.dart'; import 'package:medapp_eksad/widget/button_color.dart';
import 'package:show_up_animation/show_up_animation.dart'; import 'package:show_up_animation/show_up_animation.dart';
class SmallHome1 extends StatelessWidget { class SmallHome1 extends StatelessWidget {
const SmallHome1({Key? key}) : super(key: key); SmallHome1({Key? key, required this.wijet}) : super(key: key);
final Widget wijet;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -75,8 +75,8 @@ class SmallHome1 extends StatelessWidget { ...@@ -75,8 +75,8 @@ class SmallHome1 extends StatelessWidget {
// offset: -0.2, // offset: -0.2,
child: Text( child: Text(
'Welcome to healthcare’s most powerful collaboration suite. ' 'Welcome to healthcare’s most powerful collaboration suite. '
'Enhance clinical workflows, speed decisions, and improve' 'Enhance clinical workflows, speed decisions, and improve'
' patient outcomes, safely and securely.', ' patient outcomes, safely and securely.',
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 15, fontSize: 15,
......
...@@ -24,7 +24,7 @@ class _SmallHome3State extends State<SmallHome3> { ...@@ -24,7 +24,7 @@ class _SmallHome3State extends State<SmallHome3> {
const SizedBox( const SizedBox(
height: 40, height: 40,
), ),
Text("Why MedApps ?", Text("Our Features",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 36, fontSize: 36,
color: const Color(0xff1e5ea8), color: const Color(0xff1e5ea8),
...@@ -49,7 +49,7 @@ class _SmallHome3State extends State<SmallHome3> { ...@@ -49,7 +49,7 @@ class _SmallHome3State extends State<SmallHome3> {
child: Animasi_Kiri_Kanan( child: Animasi_Kiri_Kanan(
screenSize: screenSize, screenSize: screenSize,
widget: Image.asset( widget: Image.asset(
'assets/icons/why1.png', 'assets/icons/queuesystem.png',
height: 60, height: 60,
width: 60, width: 60,
))), ))),
...@@ -102,7 +102,7 @@ class _SmallHome3State extends State<SmallHome3> { ...@@ -102,7 +102,7 @@ class _SmallHome3State extends State<SmallHome3> {
child: Animasi_Kiri_Kanan( child: Animasi_Kiri_Kanan(
screenSize: screenSize, screenSize: screenSize,
widget: Image.asset( widget: Image.asset(
'assets/icons/why2.png', 'assets/icons/patientnotification.png',
height: 60, height: 60,
width: 60, width: 60,
))), ))),
...@@ -155,7 +155,7 @@ class _SmallHome3State extends State<SmallHome3> { ...@@ -155,7 +155,7 @@ class _SmallHome3State extends State<SmallHome3> {
child: Animasi_Kiri_Kanan( child: Animasi_Kiri_Kanan(
screenSize: screenSize, screenSize: screenSize,
widget: Image.asset( widget: Image.asset(
'assets/icons/why3.png', 'assets/icons/selfregistration.png',
height: 60, height: 60,
width: 60, width: 60,
))), ))),
...@@ -207,7 +207,7 @@ class _SmallHome3State extends State<SmallHome3> { ...@@ -207,7 +207,7 @@ class _SmallHome3State extends State<SmallHome3> {
child: Animasi_Kiri_Kanan( child: Animasi_Kiri_Kanan(
screenSize: screenSize, screenSize: screenSize,
widget: Image.asset( widget: Image.asset(
'assets/icons/why4.png', 'assets/icons/multipayment.png',
height: 60, height: 60,
width: 60, width: 60,
))), ))),
...@@ -314,7 +314,7 @@ class _SmallHome3State extends State<SmallHome3> { ...@@ -314,7 +314,7 @@ class _SmallHome3State extends State<SmallHome3> {
child: Animasi_Kiri_Kanan( child: Animasi_Kiri_Kanan(
screenSize: screenSize, screenSize: screenSize,
widget: Image.asset( widget: Image.asset(
'assets/icons/why4.png', 'assets/icons/otherfeatures.png',
height: 60, height: 60,
width: 60, width: 60,
))), ))),
......
...@@ -3,7 +3,8 @@ import 'package:google_fonts/google_fonts.dart'; ...@@ -3,7 +3,8 @@ import 'package:google_fonts/google_fonts.dart';
import 'package:show_up_animation/show_up_animation.dart'; import 'package:show_up_animation/show_up_animation.dart';
class SmallOurSolution extends StatefulWidget { class SmallOurSolution extends StatefulWidget {
const SmallOurSolution({Key? key}) : super(key: key); SmallOurSolution({Key? key, required this.wijet}) : super(key: key);
final Widget wijet;
@override @override
State<SmallOurSolution> createState() => _SmallOurSolutionState(); State<SmallOurSolution> createState() => _SmallOurSolutionState();
...@@ -56,7 +57,7 @@ class _SmallOurSolutionState extends State<SmallOurSolution> { ...@@ -56,7 +57,7 @@ class _SmallOurSolutionState extends State<SmallOurSolution> {
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
fontSize: 34, fontSize: 34,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black87), color: Colors.white),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),
...@@ -76,7 +77,7 @@ class _SmallOurSolutionState extends State<SmallOurSolution> { ...@@ -76,7 +77,7 @@ class _SmallOurSolutionState extends State<SmallOurSolution> {
letterSpacing: 1.8, letterSpacing: 1.8,
height: 1.4, height: 1.4,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black87), color: Colors.white),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),
......
...@@ -6,6 +6,8 @@ import '../appbar/appbar_home.dart'; ...@@ -6,6 +6,8 @@ import '../appbar/appbar_home.dart';
import '../widget/drawer.dart'; import '../widget/drawer.dart';
import '../widget/responsive.dart'; import '../widget/responsive.dart';
import '../widget/whatsapp.dart'; import '../widget/whatsapp.dart';
import 'package:provider/provider.dart';
import 'package:medapp_eksad/firebase/firebase_auth_methods.dart';
void setPageTitle(String title, BuildContext context) { void setPageTitle(String title, BuildContext context) {
SystemChrome.setApplicationSwitcherDescription(ApplicationSwitcherDescription( SystemChrome.setApplicationSwitcherDescription(ApplicationSwitcherDescription(
...@@ -23,88 +25,195 @@ class DemoUser extends StatefulWidget { ...@@ -23,88 +25,195 @@ class DemoUser extends StatefulWidget {
class _DemoUserState extends State<DemoUser> { class _DemoUserState extends State<DemoUser> {
final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
setPageTitle('Free Demo Medapp', context); setPageTitle('Demo', context);
var screenSize = MediaQuery.of(context).size; var screenSize = MediaQuery.of(context).size;
final user = context.read<FirebaseAuthMethods>().user;
final String mail = user.email!;
return Scaffold( return Scaffold(
key: _scaffoldKey, key: _scaffoldKey,
floatingActionButton: WAChat(), floatingActionButton: WAChat(),
appBar: ResponsiveWidget.isSmallScreen(context) appBar: ResponsiveWidget.isSmallScreen(context)
? AppBarKecil() ? AppBarKecil()
: AppbarHomeLargeUser(screenSize, context, Colors.black, Colors.black, : AppbarHomeLargeUser(screenSize, context, Colors.black, Colors.black,
Colors.black, Colors.black, Colors.black,Colors.blue), Colors.black, Colors.black, Colors.black, Colors.blue),
drawer: const DrawerMedApp(), drawer: const DrawerMedApp(),
body: Container( body: ResponsiveWidget.isSmallScreen(context)
width: screenSize.width, ? Container(
height: screenSize.height, padding: EdgeInsets.symmetric(horizontal: screenSize.width*0.1),
child: Row( width: screenSize.width,
mainAxisAlignment: MainAxisAlignment.spaceEvenly, height: screenSize.height,
children: [ child: Column(
Box( mainAxisAlignment: MainAxisAlignment.spaceEvenly,
wijet: ElevatedButton.icon( children: [
onPressed: () {}, Center(
icon: Icon( child: Text(
Icons.download, 'Welcome, $mail',
size: 40, style: GoogleFonts.poppins(fontSize: 25),
),
), ),
label: Text( Card(
'Download APK', child: ListTile(
style: GoogleFonts.poppins( onTap: (){},
fontSize: 20, fontWeight: FontWeight.w600), leading: Icon(
textAlign: TextAlign.center, Icons.download,
size: 40,
),
title: Text(
'Download APK',
style: GoogleFonts.poppins(
fontSize: 20, fontWeight: FontWeight.w600),
textAlign: TextAlign.center,
),
),
), ),
), Card(
), child: ListTile(
Box( onTap: (){},
wijet: ElevatedButton.icon( leading: Icon(
onPressed: () {}, Icons.tv,
icon: Icon( size: 40,
Icons.tv, ),
size: 40, title: Text(
'TV Display',
style: GoogleFonts.poppins(
fontSize: 20, fontWeight: FontWeight.w600),
textAlign: TextAlign.center,
),
),
), ),
label: Text( Card(
'TV Display', child: ListTile(
style: GoogleFonts.poppins( onTap: (){},
fontSize: 20, fontWeight: FontWeight.w600), leading: Icon(
textAlign: TextAlign.center, Icons.phone_android,
size: 40,
),
title: Text(
'Kiosk',
style: GoogleFonts.poppins(
fontSize: 20, fontWeight: FontWeight.w600),
textAlign: TextAlign.center,
),
),
), ),
), Card(
), child: ListTile(
Box( onTap: (){},
wijet: ElevatedButton.icon( leading: Icon(
onPressed: () {}, Icons.browser_updated,
icon: Icon( size: 40,
Icons.phone_android, ),
size: 40, title: Text(
'Website Admin',
style: GoogleFonts.poppins(
fontSize: 20, fontWeight: FontWeight.w600),
textAlign: TextAlign.center,
),
),
), ),
label: Text( ElevatedButton(
'Kiosk', onPressed: () {
style: GoogleFonts.poppins( context.read<FirebaseAuthMethods>().signOut(context);
fontSize: 20, fontWeight: FontWeight.w600), Navigator.pushNamed(context, '/');
textAlign: TextAlign.center, },
style: ElevatedButton.styleFrom(
primary: const Color(0xff1e5ea8),
fixedSize: const Size(130, 45),
onPrimary: Colors.red,
),
child: const Text(
'Logout',
style: TextStyle(
color: Colors.white, fontSize: 19, fontWeight: FontWeight.w500),
),
), ),
), ],
), ),
Box( )
wijet: ElevatedButton.icon( : Container(
onPressed: () {}, width: screenSize.width,
icon: Icon( height: screenSize.height,
Icons.browser_updated, child: Column(
size: 40, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
), children: [
label: Text( Center(
'Web Admin', child: Text(
style: GoogleFonts.poppins( 'Welcome, $mail',
fontSize: 20, fontWeight: FontWeight.w600), style: GoogleFonts.poppins(fontSize: 25),
textAlign: TextAlign.center, ),
), ),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Box(
wijet: ElevatedButton.icon(
onPressed: () {},
icon: Icon(
Icons.download,
size: 40,
),
label: Text(
'Download APK',
style: GoogleFonts.poppins(
fontSize: 20, fontWeight: FontWeight.w600),
textAlign: TextAlign.center,
),
),
),
Box(
wijet: ElevatedButton.icon(
onPressed: () {},
icon: Icon(
Icons.tv,
size: 40,
),
label: Text(
'TV Display',
style: GoogleFonts.poppins(
fontSize: 20, fontWeight: FontWeight.w600),
textAlign: TextAlign.center,
),
),
),
Box(
wijet: ElevatedButton.icon(
onPressed: () {},
icon: Icon(
Icons.phone_android,
size: 40,
),
label: Text(
'Kiosk',
style: GoogleFonts.poppins(
fontSize: 20, fontWeight: FontWeight.w600),
textAlign: TextAlign.center,
),
),
),
Box(
wijet: ElevatedButton.icon(
onPressed: () {},
icon: Icon(
Icons.browser_updated,
size: 40,
),
label: Text(
'Web Admin',
style: GoogleFonts.poppins(
fontSize: 20, fontWeight: FontWeight.w600),
textAlign: TextAlign.center,
),
),
),
],
),
],
), ),
), ),
],
),
),
); );
} }
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:medapp_eksad/api/setting_api.dart';
import 'package:medapp_eksad/appbar/appbar_home.dart'; import 'package:medapp_eksad/appbar/appbar_home.dart';
import 'package:medapp_eksad/screen_small/small_contact/small_contact_us2.dart'; import 'package:medapp_eksad/screen_small/small_contact/small_contact_us2.dart';
import 'package:medapp_eksad/screen/contact_us/contact_us2.dart'; import 'package:medapp_eksad/screen/contact_us/contact_us2.dart';
...@@ -12,6 +14,7 @@ import 'package:medapp_eksad/screen_small/small_home/small_home1.dart'; ...@@ -12,6 +14,7 @@ import 'package:medapp_eksad/screen_small/small_home/small_home1.dart';
import 'package:medapp_eksad/screen_small/small_home/small_home2.dart'; import 'package:medapp_eksad/screen_small/small_home/small_home2.dart';
import 'package:medapp_eksad/screen_small/small_home/small_home3.dart'; import 'package:medapp_eksad/screen_small/small_home/small_home3.dart';
import 'package:medapp_eksad/screen_small/small_home/small_home4.dart'; import 'package:medapp_eksad/screen_small/small_home/small_home4.dart';
import 'package:medapp_eksad/widget/Scroll_top.dart';
import 'package:medapp_eksad/widget/drawer.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';
...@@ -32,10 +35,26 @@ class HomePageUser extends StatefulWidget { ...@@ -32,10 +35,26 @@ class HomePageUser extends StatefulWidget {
} }
class _HomePageUserState extends State<HomePageUser> { class _HomePageUserState extends State<HomePageUser> {
// Untuk pake PAGE per index
PageController controller = PageController();
void _scrollToIndex2(int index) {
controller.animateToPage(index,
duration: const Duration(seconds: 2),
curve: Curves.fastLinearToSlowEaseIn);
}
// Untuk pake LIST per height container
ScrollController controller2 = ScrollController();
void _scrollToIndex(double index) {
controller2.animateTo(index,
duration: const Duration(seconds: 1),
curve: Curves.fastLinearToSlowEaseIn);
}
final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
setPageTitle('MedApp by Eksad', context); // setPageTitle('MedApp by Eksad', context);
var screenSize = MediaQuery.of(context).size; var screenSize = MediaQuery.of(context).size;
return Scaffold( return Scaffold(
key: _scaffoldKey, key: _scaffoldKey,
...@@ -43,28 +62,87 @@ class _HomePageUserState extends State<HomePageUser> { ...@@ -43,28 +62,87 @@ class _HomePageUserState extends State<HomePageUser> {
appBar: ResponsiveWidget.isSmallScreen(context) appBar: ResponsiveWidget.isSmallScreen(context)
? AppBarKecil() ? AppBarKecil()
: AppbarHomeLarge(screenSize, context, Colors.blue, Colors.black, : AppbarHomeLarge(screenSize, context, Colors.blue, Colors.black,
Colors.black, Colors.black, Colors.black), Colors.black, Colors.black, Colors.black),
drawer: const DrawerMedApp(), drawer: const DrawerMedApp(),
body: ResponsiveWidget.isSmallScreen(context) body: ResponsiveWidget.isSmallScreen(context)
? ListView( ? Stack(
children: const [ children: [
SmallHome1(), Title(
SmallHome2(), color: Colors.white,
SmallHome3(), child: ListView(
SmallHome4(), scrollDirection: Axis.vertical,
ContactUs2_small(), controller: controller2,
FooterSmall(), children: [
], SmallHome1(wijet: Button_scroll_small()),
) SmallHome2(),
: ListView( SmallHome3(),
children: [ SmallHome4(),
const Home1(), ContactUs2_small(),
const Home2(), FooterSmall(),
const Home3(), ],
const Home4(), ),
ContactUs2(), ),
Footer(), ScrollUpButton(controller2),
], ],
)
: Stack(
children: [
FutureBuilder<dynamic>(
future: getSettingDesc2(),
builder: (BuildContext context, AsyncSnapshot snapshot) {
var pgm = snapshot.data[0];
return Title(
title: pgm['title'],
color: Colors.white,
child: ListView(
scrollDirection: Axis.vertical,
controller: controller2,
children: [
Home1(wijet: Button_scroll()),
const Home2(),
const Home3(),
const Home4(),
ContactUs2(),
Footer(),
],
),
);
},
),
ScrollUpButton(controller2),
],
),
);
}
ElevatedButton Button_scroll() {
return ElevatedButton(
onPressed: () {
_scrollToIndex(3780);
},
style: ElevatedButton.styleFrom(
primary: const Color(0xff1e5ea8),
),
child: Text(
'CONTACT US',
style: GoogleFonts.poppins(
fontSize: 17, letterSpacing: 2, fontWeight: FontWeight.w500),
),
);
}
ElevatedButton Button_scroll_small() {
return ElevatedButton(
onPressed: () {
_scrollToIndex(5410);
},
style: ElevatedButton.styleFrom(
primary: const Color(0xff1e5ea8), fixedSize: const Size(50, 20)),
child: Text(
'CONTACT US',
style: GoogleFonts.poppins(
fontSize: 15, letterSpacing: 1.5, fontWeight: FontWeight.w500),
), ),
); );
} }
......
import 'package:flutter/material.dart';
class ScrollUpButton extends StatefulWidget {
const ScrollUpButton(this.controller);
final ScrollController controller;
@override
_ScrollUpButtonState createState() => _ScrollUpButtonState();
}
class _ScrollUpButtonState extends State<ScrollUpButton> {
bool _showScrollUp = false;
@override
void initState() {
super.initState();
widget.controller.addListener(() {
if (widget.controller.position.pixels > 150 && !_showScrollUp) {
setState(() {
_showScrollUp = true;
});
} else if (widget.controller.position.pixels < 150 && _showScrollUp) {
setState(() {
_showScrollUp = false;
});
}
// On GitHub there was a question on how to determine the event
// of widget being scrolled to the bottom. Here's the sample
// if (widget.controller.position.hasViewportDimension &&
// widget.controller.position.pixels >=
// widget.controller.position.maxScrollExtent - 0.01) {
// print('Scrolled to bottom');
//}
});
}
@override
Widget build(BuildContext context) {
return _showScrollUp
? Positioned(
right:20,
bottom: 170,
child: OutlinedButton(
onPressed: () => widget.controller.animateTo(0,
duration: const Duration(milliseconds: 300),
curve: Curves.easeIn),
style: ButtonStyle(
fixedSize: MaterialStateProperty.all(Size(30, 30)),
backgroundColor: MaterialStateProperty.all(Colors.grey[50]),
foregroundColor: MaterialStateProperty.all(Colors.black)),
child: Icon(Icons.arrow_circle_up,color: Colors.grey,)
//child: const Text('Go\nTop',textAlign: TextAlign.center,),
))
: const SizedBox();
}
}
\ No newline at end of file
...@@ -11,7 +11,6 @@ export 'package:medapp_eksad/screen/solution/our_solution.dart'; ...@@ -11,7 +11,6 @@ export 'package:medapp_eksad/screen/solution/our_solution.dart';
export 'package:medapp_eksad/screen/solution/our_solution2.dart'; export 'package:medapp_eksad/screen/solution/our_solution2.dart';
export 'package:medapp_eksad/screen/contact_us/contact_us1.dart'; export 'package:medapp_eksad/screen/contact_us/contact_us1.dart';
export 'package:medapp_eksad/screen/contact_us/contact_us2.dart'; export 'package:medapp_eksad/screen/contact_us/contact_us2.dart';
export 'package:medapp_eksad/screen_small/small_footer.dart';
export 'package:medapp_eksad/screen_small/small_contact/small_contact_us1.dart'; export 'package:medapp_eksad/screen_small/small_contact/small_contact_us1.dart';
export 'package:medapp_eksad/screen_small/small_contact/small_contact_us2.dart'; export 'package:medapp_eksad/screen_small/small_contact/small_contact_us2.dart';
export 'package:medapp_eksad/screen_small/small_home/small_home1.dart'; export 'package:medapp_eksad/screen_small/small_home/small_home1.dart';
......
...@@ -30,15 +30,10 @@ class WAChat extends StatelessWidget { ...@@ -30,15 +30,10 @@ class WAChat extends StatelessWidget {
return FloatingActionButton( return FloatingActionButton(
onPressed: () {}, onPressed: () {},
backgroundColor: Colors.green, backgroundColor: Colors.green,
child: FutureBuilder<List<dynamic>>( child: FutureBuilder<List<dynamic>>(
future: getSosmedDesc(), future: getWaDesc(),
builder: (BuildContext context, AsyncSnapshot snapshot) { builder: (BuildContext context, AsyncSnapshot snapshot) {
var pgm = snapshot.data[0]; var pgm = snapshot.data[0];
if (snapshot.hasError ||
snapshot.data == null ||
snapshot.connectionState == ConnectionState.waiting) {
return const CircularProgressIndicator();
}
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
wa = pgm['whatsapp']; wa = pgm['whatsapp'];
...@@ -50,7 +45,7 @@ class WAChat extends StatelessWidget { ...@@ -50,7 +45,7 @@ class WAChat extends StatelessWidget {
launchWhatsApp( launchWhatsApp(
phone: wa, phone: wa,
message: message:
'Hallo, saya tertarik dan saya ingin tahu lebih lanjut tentang program Medapp dari EKSAD'); 'Hallo, saya tertarik dan saya ingin tahu lebih lanjut tentang program Medapp dari EKSAD');
}, },
child: Spring.rotate( child: Spring.rotate(
endAngle: 360 * 10, endAngle: 360 * 10,
......
...@@ -81,6 +81,7 @@ flutter: ...@@ -81,6 +81,7 @@ flutter:
uses-material-design: true uses-material-design: true
assets: assets:
- assets/file/
- assets/icons/ - assets/icons/
- assets/logo/ - assets/logo/
- assets/images/ - assets/images/
......
web/favicon.png

917 Bytes | W: | H:

web/favicon.png

5.01 KB | W: | H:

web/favicon.png
web/favicon.png
web/favicon.png
web/favicon.png
  • 2-up
  • Swipe
  • Onion skin
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