Commit 697b8c40 authored by Arham Aulia Nugraha's avatar Arham Aulia Nugraha
parents dbbbef7e 687da645
...@@ -19,6 +19,7 @@ Future savecontact(nama, email, nohp, message) async { ...@@ -19,6 +19,7 @@ Future savecontact(nama, email, nohp, message) async {
// } else { // } else {
// return false; // return false;
// } // }
return response.statusCode;
} }
Future<List<contact>> showcontact() async { Future<List<contact>> showcontact() async {
......
import 'package:flutter/material.dart';
class ForgotPassword extends StatefulWidget {
const ForgotPassword({Key? key}) : super(key: key);
@override
State<ForgotPassword> createState() => _ForgotPasswordState();
}
class _ForgotPasswordState extends State<ForgotPassword> {
final formKey = GlobalKey<FormState>();
String email = '';
@override
Widget build(BuildContext context) {
return Stack(
children: [
Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/images/medapp_image2.jpg'),
fit: BoxFit.fill)),
),
Padding(
padding: const EdgeInsets.all(21.0),
child: ElevatedButton(onPressed: (){
Navigator.pushNamed(context, '/login');
}, child: Icon(Icons.arrow_back)),
),
Center(
child:AlertDialog(
title: Text('Find your account'),
content: Form(
key: formKey,
child: TextFormField(
textAlign: TextAlign.start,
decoration: InputDecoration(
labelText: "Enter your email address",
hintStyle: const TextStyle(),
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(5.0)),
),
onChanged: (value) => email = value,
),
),
actions: <Widget>[
TextButton(
onPressed: () {
Navigator.pushNamed(context, 'dashboard');
},
child: const Text('Send'),
),
],
)
),
],
);
}
}
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class Dashboard4 extends StatefulWidget {
const Dashboard4({Key? key}) : super(key: key);
@override
State<Dashboard4> createState() => _Dashboard4State();
}
class MessageUser {
int id;
String name;
String email;
String message;
String number;
MessageUser(
this.id,
this.name,
this.email,
this.message,
this.number
);
}
class _Dashboard4State extends State<Dashboard4> {
List<MessageUser> ListMessage = <MessageUser>[
MessageUser(1, "Jay", 'email', 'message', 'number'),
MessageUser(2, 'nama', 'email', 'message', 'nomer'),
MessageUser(1, "Jay", 'email', 'message', 'number'),
MessageUser(2, 'nama', 'email', 'message', 'nomer'),MessageUser(1, "Jay", 'email', 'message', 'number'),
MessageUser(2, 'nama', 'email', 'message', 'nomer'),MessageUser(1, "Jay", 'email', 'message', 'number'),
MessageUser(2, 'nama', 'email', 'message', 'nomer'),
];
@override
void initState() {
super.initState();
}
refreshList() {
setState(() {
ListMessage=ListMessage;
});
}
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
return Padding(
padding: const EdgeInsets.all(30.0),
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
color: Colors.white60,
borderRadius: BorderRadius.circular(20),
boxShadow: [
BoxShadow(
color: const Color.fromARGB(255, 10, 116, 255)
.withAlpha(60),
blurRadius: 5.0,
spreadRadius: 5.0,
offset: const Offset(
0.0,
3.0,
),
),
]),
child: Column(
children: [
Container(
height: screenSize.height * 0.15,
child: Center(
child: Text('Data Messages from User',style: GoogleFonts.poppins(
height: 1.5,
fontSize: 31,
fontWeight: FontWeight.bold,
color: Colors.blueAccent[200]),),
),
),
Container(
// height: screenSize.height*0.63,
width: screenSize.width*0.95,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(40)),
//color: Colors.white,
child: PaginatedDataTable(
rowsPerPage:5,
// header :Text("Data Message User"),
columnSpacing: 150,
columns: [
DataColumn(label: Text("ID"),),
DataColumn(label: Text("Name"),),
DataColumn(label: Text("Email"),),
DataColumn(label: Text("Message"),),
DataColumn(label: Text("Number"),),
],
source: UserDataTableSource(userData: ListMessage)),
)
],
),
),
);
}
}
class UserDataTableSource extends DataTableSource {
UserDataTableSource({
required List<MessageUser> userData,
})
: _userData = userData,
assert(userData != null);
final List<MessageUser> _userData;
@override
DataRow? getRow(int index) {
assert(index >= 0);
if (index >= _userData.length) {
return null;
}
final _user = _userData[index];
return DataRow.byIndex(
index: index,
cells: <DataCell>[
DataCell(Text('${_user.id}')),
DataCell(Text('${_user.name}')),
DataCell(Text('${_user.email}')),
DataCell(Text('${_user.message}')),
DataCell(Text('${_user.number}')),
],
);
}
@override
bool get isRowCountApproximate => false;
@override
int get rowCount => _userData.length;
@override
int get selectedRowCount => 0;
void sort<T>(Comparable<T> Function(MessageUser d) getField, bool ascending) {
_userData.sort((a, b) {
final aValue = getField(a);
final bValue = getField(b);
return ascending
? Comparable.compare(aValue, bValue)
: Comparable.compare(bValue, aValue);
});
notifyListeners();
}
}
import 'package:flutter/material.dart';
class Dashboard1 extends StatelessWidget {
const Dashboard1({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
return Stack(
children: [
Image.asset('assets/images/medapp_image1.png',height: screenSize.height,width: screenSize.width,)
],
);
}
}
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class Dashboard3 extends StatefulWidget {
const Dashboard3({Key? key}) : super(key: key);
@override
State<Dashboard3> createState() => _Dashboard3State();
}
class WhatsappNumber {
String name;
String number;
String status;
WhatsappNumber(
this.name,
this.number,
this.status
);
}
class _Dashboard3State extends State<Dashboard3> {
List<WhatsappNumber> ListWhatsapp = <WhatsappNumber>[
WhatsappNumber("Jay", 'email', 'ACTIVE',),
WhatsappNumber('Rizky', 'email', 'INACTIVE',),
WhatsappNumber('Fahrur', 'email', 'INACTIVE',),
];
@override
void initState() {
super.initState();
}
refreshList() {
setState(() {
ListWhatsapp=ListWhatsapp;
});
}
final TextEditingController phoneController = TextEditingController();
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
return Container(
height: screenSize.height,
width: screenSize.width,
child: Padding(
padding: const EdgeInsets.all(21.0),
child: Container(
height: screenSize.height,
width: screenSize.width,
decoration: BoxDecoration(
color: Colors.white60,
borderRadius: BorderRadius.circular(20),
boxShadow: [
BoxShadow(
color: const Color.fromARGB(255, 10, 116, 255)
.withAlpha(60),
blurRadius: 5.0,
spreadRadius: 5.0,
offset: const Offset(
0.0,
3.0,
),
),
]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: screenSize.width*0.08),
child: ListTile(
title: Center(
child: Text('WhatsApp Admin Number',
style: GoogleFonts.poppins(
height: 1.5,
fontSize: 31,
fontWeight: FontWeight.bold,
color: Colors.blueAccent[200]),
),
),
),
),
Form(
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: 48,
width: 250,
child: TextFormField(
controller: phoneController,
decoration: const InputDecoration(
hintText: "Enter a whatsapp number",
fillColor: Colors.white,
filled: true,
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.blue),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.blue),
),
),
),
),
SizedBox(width: 15,),
Container(
height : 45,
width : 175,
child: ElevatedButton(
onPressed: (){},
style: ElevatedButton.styleFrom(
primary: Colors.blueAccent[200],
onSurface: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10)
),
),
),
child: Text(
"Change Number",
style: TextStyle(
fontSize: 16,
letterSpacing: 2
),
),
),
),
],
),
),
Center(
child: Container(
width: screenSize.width*0.75,
child: ClipRRect(
borderRadius: BorderRadius.circular(30),
child: PaginatedDataTable(
rowsPerPage:4,
// header :Text("Data Message User"),
columnSpacing: 170,
columns: [
DataColumn(label: Text("Name"),),
DataColumn(label: Text("Number"),),
DataColumn(label: Text("Status"),),
],
source: UserDataTableSource(userData: ListWhatsapp)),
),
),
),
],
),
),
),
);
}
}
class UserDataTableSource extends DataTableSource {
UserDataTableSource({
required List<WhatsappNumber> userData,
})
: _userData = userData,
assert(userData != null);
final List<WhatsappNumber> _userData;
@override
DataRow? getRow(int index) {
assert(index >= 0);
if (index >= _userData.length) {
return null;
}
final _user = _userData[index];
return DataRow.byIndex(
index: index,
cells: <DataCell>[
DataCell(Text('${_user.name}')),
DataCell(Text('${_user.number}')),
DataCell(Text('${_user.status}')),
],
);
}
@override
bool get isRowCountApproximate => false;
@override
int get rowCount => _userData.length;
@override
int get selectedRowCount => 0;
void sort<T>(Comparable<T> Function(WhatsappNumber d) getField, bool ascending) {
_userData.sort((a, b) {
final aValue = getField(a);
final bValue = getField(b);
return ascending
? Comparable.compare(aValue, bValue)
: Comparable.compare(bValue, aValue);
});
notifyListeners();
}
}
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:easy_sidemenu/easy_sidemenu.dart'; import 'package:easy_sidemenu/easy_sidemenu.dart';
import 'package:medapp_eksad/dashboard/admin/admin_contact.dart';
import 'package:medapp_eksad/dashboard/admin/admin_dashboard.dart';
import 'package:medapp_eksad/dashboard/admin/admin_whatsapp.dart';
class DashboardAdmin extends StatefulWidget { class DashboardAdmin extends StatefulWidget {
const DashboardAdmin({Key? key}) : super(key: key); const DashboardAdmin({Key? key}) : super(key: key);
...@@ -130,11 +133,11 @@ class _DashboardAdminState extends State<DashboardAdmin> { ...@@ -130,11 +133,11 @@ class _DashboardAdminState extends State<DashboardAdmin> {
), ),
SideMenuItem( SideMenuItem(
priority: 4, priority: 4,
title: 'Settings', title: 'Message User',
onTap: () { onTap: () {
page.jumpToPage(4); page.jumpToPage(4);
}, },
icon: const Icon(Icons.settings), icon: const Icon(Icons.contact_mail),
), ),
], ],
...@@ -143,15 +146,7 @@ class _DashboardAdminState extends State<DashboardAdmin> { ...@@ -143,15 +146,7 @@ class _DashboardAdminState extends State<DashboardAdmin> {
child: PageView( child: PageView(
controller: page, controller: page,
children: [ children: [
Container( const Dashboard1(),
color: Colors.white,
child: const Center(
child: Text(
'Dashboard',
style: TextStyle(fontSize: 35),
),
),
),
Container( Container(
color: Colors.white, color: Colors.white,
child: const Center( child: const Center(
...@@ -170,20 +165,14 @@ class _DashboardAdminState extends State<DashboardAdmin> { ...@@ -170,20 +165,14 @@ class _DashboardAdminState extends State<DashboardAdmin> {
), ),
), ),
), ),
Dashboard3(),
Dashboard4(),
Container( Container(
color: Colors.white, color: Colors.white,
child: const Center( child: const Center(
child: Text( child: Text(
'Download', 'Dashboard',
style: TextStyle(fontSize: 35),
),
),
),
Container(
color: Colors.white,
child: const Center(
child: Text(
'Settings',
style: TextStyle(fontSize: 35), style: TextStyle(fontSize: 35),
), ),
), ),
......
This diff is collapsed.
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:medapp_eksad/auth/forget_password.dart';
import 'package:medapp_eksad/dashboard/admin/main_dashboard_admin.dart'; import 'package:medapp_eksad/dashboard/admin/main_dashboard_admin.dart';
import 'package:medapp_eksad/homepage.dart'; import 'package:medapp_eksad/homepage.dart';
import 'package:medapp_eksad/login.dart'; import 'package:medapp_eksad/login.dart';
...@@ -26,7 +27,8 @@ class MyApp extends StatelessWidget { ...@@ -26,7 +27,8 @@ class MyApp extends StatelessWidget {
'/contact': (context) => const ContactUs(), '/contact': (context) => const ContactUs(),
'/login': (context) => const login(), '/login': (context) => const login(),
'/register': (context) => const Register(), '/register': (context) => const Register(),
'/dashboard': (context) => const DashboardAdmin() '/dashboard': (context) => const DashboardAdmin(),
'/reset_password': (context) => const ForgotPassword(),
}, },
); );
} }
......
...@@ -21,7 +21,7 @@ class ContactUs2 extends StatelessWidget { ...@@ -21,7 +21,7 @@ class ContactUs2 extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size; var screenSize = MediaQuery.of(context).size;
return Container( return Container(
height: 500, height: 460,
width: screenSize.width, width: screenSize.width,
// color: Colors.blue, // color: Colors.blue,
decoration: const BoxDecoration( decoration: const BoxDecoration(
......
...@@ -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: screenSize.height * 0.9, height: screenSize.height * 1.1,
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,
......
...@@ -66,9 +66,11 @@ class Home4 extends StatelessWidget { ...@@ -66,9 +66,11 @@ class Home4 extends StatelessWidget {
height: 100, height: 100,
width: ScreenSize.width *0.30, width: ScreenSize.width *0.30,
child: Text( child: Text(
"MedApps menyediakan Aplikasi Mobile dan juga website yang bisa anda kunjungi", "Now this application is available on your smartphone, Download now !",
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 21,
height: 1.3,
letterSpacing: 1.3,
color: Colors.white color: Colors.white
), ),
) )
...@@ -95,7 +97,7 @@ class Home4 extends StatelessWidget { ...@@ -95,7 +97,7 @@ class Home4 extends StatelessWidget {
), ),
), ),
child: Text( child: Text(
"LEARN MORE", "Download",
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18,
letterSpacing: 2 letterSpacing: 2
......
...@@ -8,6 +8,7 @@ import 'package:medapp_eksad/screen/solution/our_solution3.dart'; ...@@ -8,6 +8,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/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';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
...@@ -29,7 +30,6 @@ class Solutions extends StatefulWidget { ...@@ -29,7 +30,6 @@ class Solutions extends StatefulWidget {
class _SolutionsState extends State<Solutions> { class _SolutionsState extends State<Solutions> {
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
ScrollController controller2 = ScrollController(); ScrollController controller2 = ScrollController();
void _scrollToIndex(double index) { void _scrollToIndex(double index) {
controller2.animateTo(index, controller2.animateTo(index,
...@@ -37,7 +37,6 @@ class _SolutionsState extends State<Solutions> { ...@@ -37,7 +37,6 @@ class _SolutionsState extends State<Solutions> {
curve: Curves.fastLinearToSlowEaseIn); curve: Curves.fastLinearToSlowEaseIn);
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
setPageTitle('MeddApp Solutions', context); setPageTitle('MeddApp Solutions', context);
...@@ -54,14 +53,15 @@ class _SolutionsState extends State<Solutions> { ...@@ -54,14 +53,15 @@ class _SolutionsState extends State<Solutions> {
children: const [ children: const [
SmallOurSolution(), SmallOurSolution(),
SmallOurSolution2(), SmallOurSolution2(),
FooterSmall(), FooterSmall(),
], ],
) )
: ListView( : ListView(
controller: controller2, controller: controller2,
children: [ children: [
OurSolution(button: ButtonSolution(context),), OurSolution(
button: ButtonSolution(context),
),
OurSolution2(), OurSolution2(),
OurSolution3(), OurSolution3(),
ContactUs2(), ContactUs2(),
...@@ -71,32 +71,28 @@ class _SolutionsState extends State<Solutions> { ...@@ -71,32 +71,28 @@ class _SolutionsState extends State<Solutions> {
); );
} }
ElevatedButton ButtonSolution(BuildContext context) { ElevatedButton ButtonSolution(BuildContext context) {
return ElevatedButton( return ElevatedButton(
onPressed: () { onPressed: () {
_scrollToIndex(1500); _scrollToIndex(1500);
}, },
style: ElevatedButton.styleFrom( style: DefaultColors(),
shape: RoundedRectangleBorder( // ElevatedButton.styleFrom(
borderRadius: BorderRadius.circular(10), // shape: RoundedRectangleBorder(
), // borderRadius: BorderRadius.circular(10),
primary: Color.fromARGB(255, 48, 104, 170), // ),
// shape: MaterialStateProperty.all(RoundedRectangleBorder(borderRadius: BorderRadius.circular(30.0))), // primary: Color.fromARGB(255, 48, 104, 170),
), // // shape: MaterialStateProperty.all(RoundedRectangleBorder(borderRadius: BorderRadius.circular(30.0))),
child: const Text( // ),
'FREE DEMO', child: const Text(
style: TextStyle( 'FREE DEMO',
fontSize: 19, style: TextStyle(
fontWeight: FontWeight.w500, fontSize: 19,
letterSpacing: 1.1, fontWeight: FontWeight.w500,
color: Colors.white), letterSpacing: 1.1,
), color: Colors.white),
); ),
);
} }
AppBar AppBarKecil() { AppBar AppBarKecil() {
......
...@@ -249,7 +249,6 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -249,7 +249,6 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
Text('Failed to send message!'), Text('Failed to send message!'),
backgroundColor: Colors.red), backgroundColor: Colors.red),
); );
nameController.clear(); nameController.clear();
phoneController.clear(); phoneController.clear();
emailController.clear(); emailController.clear();
......
...@@ -9,7 +9,7 @@ ButtonStyle DefaultColors() { ...@@ -9,7 +9,7 @@ ButtonStyle DefaultColors() {
), ),
overlayColor: MaterialStateProperty.resolveWith<Color?>( overlayColor: MaterialStateProperty.resolveWith<Color?>(
(Set<MaterialState> states) { (Set<MaterialState> states) {
if (states.contains(MaterialState.hovered)) { if (states.contains(MaterialState.pressed)) {
return Colors.red; return Colors.red;
} //<-- SEE HERE } //<-- SEE HERE
return null; // Defer to the widget's default. return null; // Defer to the widget's default.
......
...@@ -2,9 +2,6 @@ import 'package:flutter/material.dart'; ...@@ -2,9 +2,6 @@ import 'package:flutter/material.dart';
import 'package:carousel_slider/carousel_slider.dart'; import 'package:carousel_slider/carousel_slider.dart';
final List<String> imgList = [ final List<String> imgList = [
'images/homepage.png',
'images/solution.jpg',
'images/contactus1.jpg',
'images/solution1.jpg', 'images/solution1.jpg',
'images/solution2.jpg', 'images/solution2.jpg',
......
...@@ -10,7 +10,7 @@ class WAChat extends StatelessWidget { ...@@ -10,7 +10,7 @@ class WAChat extends StatelessWidget {
required String message, required String message,
}) async { }) async {
String url() { String url() {
return "https://api.whatsapp.com/send?phone=$phone&text=${Uri.parse(message)}"; return "https://api.whatsapp.com/send?phone=+62$phone&text=${Uri.parse(message)}";
} }
if (await canLaunch(url())) { if (await canLaunch(url())) {
...@@ -28,9 +28,10 @@ class WAChat extends StatelessWidget { ...@@ -28,9 +28,10 @@ class WAChat extends StatelessWidget {
return FloatingActionButton( return FloatingActionButton(
onPressed: () { onPressed: () {
launchWhatsApp( launchWhatsApp(
phone: 6281807890777, //phone: 81807890777,
phone: 87701892981,
message: message:
'Hallo, saya tertarik dengan produk EKSAD dan saya ingin tahu lebih lanjut tentang program Protalent'); 'Hallo, saya tertarik dan saya ingin tahu lebih lanjut tentang program Medapp by EKSAD');
}, },
backgroundColor: Colors.green, backgroundColor: Colors.green,
child: GestureDetector( child: GestureDetector(
......
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