Commit afdcae7d 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 44bae067 e18fa4d4
......@@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:form_field_validator/form_field_validator.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:http/http.dart' as http;
import 'package:medapp_eksad/firebase/showSnackbar_Alertdialog.dart';
import 'package:medapp_eksad/widget/button_color.dart';
......@@ -27,6 +28,7 @@ class _ForgotPasswordState extends State<ForgotPassword> {
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
return Stack(
children: [
Container(
......@@ -45,38 +47,64 @@ class _ForgotPasswordState extends State<ForgotPassword> {
),
Center(
child: AlertDialog(
title: Text('Receive an email \nto reset your password.',textAlign: TextAlign.center,),
content: Form(
key: formKey,
child: TextFormField(
textAlign: TextAlign.start,
controller: emailController,
textInputAction: TextInputAction.done,
autovalidateMode: AutovalidateMode.onUserInteraction,
validator: (email) => email != null && EmailValidator(errorText: 'Enter a valid email').isValid(email)
? "Enter a valid email"
:null
,
decoration: InputDecoration(
labelText: "Enter your email address",
hintStyle: const TextStyle(),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0)),
),
// onChanged: (value) => email = value,
title: Text('Reset Password',textAlign: TextAlign.center,),
content: Container(
width: screenSize.width*0.25,
height: screenSize.height*0.3,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Form(
key: formKey,
child: TextFormField(
textAlign: TextAlign.start,
controller: emailController,
textInputAction: TextInputAction.done,
//autovalidateMode: AutovalidateMode.onUserInteraction,
decoration: InputDecoration(
labelText: "Enter your email address",
hintStyle: const TextStyle(),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0)),
),
validator: (value) {
if (value == null || value.isEmpty) {
return 'Please enter your email address';
}
return null;
},
// onChanged: (value) => email = value,
),
),
Container
(height: screenSize.height*0.1,
child: Text('We will send you an email with'
' a link to reset your password, please enter the email'
' associated with your account above.',style: GoogleFonts.poppins(fontSize: 12),),),
Container(
width: screenSize.width*0.31,
height: screenSize.height*0.065,
child: ElevatedButton(
onPressed: () async {
if (formKey.currentState!.validate()) {
await resetPassword();
return;
}
},
// resetPassword();
// //Navigator.pushNamed(context, 'dashboard');
// },
child: const Text('Send'),),
)
],
),
),
actions: <Widget>[
TextButton(
onPressed: () {
resetPassword();
//Navigator.pushNamed(context, 'dashboard');
},
child: const Text('Send'),
),
],
)),
),
),
],
);
}
......@@ -90,7 +118,7 @@ class _ForgotPasswordState extends State<ForgotPassword> {
} on FirebaseAuthException catch (e){
print(e);
showSnackBar(context, e.message.toString());
showSnackBarError(context, e.message!);
Navigator.of(context).pop();
}
}
......
......@@ -63,7 +63,7 @@ class _HomePageState extends State<HomePage> {
const Home3(),
const Home4(),
ContactUs2(),
const Footer(),
Footer(),
],
),
);
......
......@@ -63,7 +63,7 @@ class _AboutUsState extends State<AboutUs> {
const Home3(),
const Home4(),
ContactUs2(),
const Footer(),
Footer(),
],
),
);
......
......@@ -2,17 +2,22 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:medapp_eksad/api/setting_api.dart';
import 'package:medapp_eksad/api/sosmed_api.dart';
import 'package:url_launcher/url_launcher.dart';
class Footer extends StatelessWidget {
const Footer({Key? key}) : super(key: key);
Footer({Key? key}) : super(key: key);
String ln = '';
String tw = '';
String ig = '';
String yt = '';
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
return Container(
width: screenSize.width,
height: screenSize.height * 0.78,
height: screenSize.height * 0.8,
color: Colors.white,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
......@@ -41,11 +46,12 @@ class Footer extends StatelessWidget {
width: screenSize.width * 0.12,
height: screenSize.height * 0.07,
decoration: const BoxDecoration(
//color: Colors.lightBlueAccent,
image: DecorationImage(
image: AssetImage(
'assets/logo/medapp-logo.png'),
fit: BoxFit.fill)),
//color: Colors.lightBlueAccent,
image: DecorationImage(
image:
AssetImage('assets/logo/medapp-logo.png'),
fit: BoxFit.fill),
),
),
const Spacer(
flex: 8,
......@@ -54,11 +60,12 @@ class Footer extends StatelessWidget {
width: screenSize.width * 0.1,
height: screenSize.height * 0.08,
decoration: const BoxDecoration(
//color: Colors.lightBlueAccent,
image: DecorationImage(
image: AssetImage(
'assets/logo/logo-eksad.png'),
fit: BoxFit.fill)),
//color: Colors.lightBlueAccent,
image: DecorationImage(
image:
AssetImage('assets/logo/logo-eksad.png'),
fit: BoxFit.fill),
),
),
const Spacer(
flex: 8,
......@@ -86,55 +93,72 @@ class Footer extends StatelessWidget {
width: screenSize.width * 0.14,
height: screenSize.height * 0.03,
//color: Colors.blue,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
IconButton(
onPressed: () {
launch(
'https://www.linkedin.com/company/pt-tiga-daya-digital-indonesia-triputra-group-eksad-technology');
},
icon: const Icon(
FontAwesomeIcons.linkedinIn,
size: 30,
),
iconSize: 20,
),
IconButton(
onPressed: () {
launch(
'https://twitter.com/eksadtechnology/');
},
icon: const Icon(
FontAwesomeIcons.twitter,
size: 30,
),
iconSize: 20,
),
IconButton(
onPressed: () {
launch(
'https://www.instagram.com/eksad_technology/');
},
icon: const Icon(
FontAwesomeIcons.instagram,
size: 30,
),
iconSize: 20,
),
IconButton(
onPressed: () {
launch(
'https://www.youtube.com/channel/UCiZgIbpWgrAMrHW-TaS9EPw');
},
icon: const Icon(
FontAwesomeIcons.youtube,
size: 30,
),
iconSize: 20,
)
],
child: FutureBuilder<List<dynamic>>(
future: getSosmedDesc(),
builder: (BuildContext context, AsyncSnapshot snapshot) {
var pgm = snapshot.data[0];
if (snapshot.hasError ||
snapshot.data == null ||
snapshot.connectionState == ConnectionState.waiting) {
return const CircularProgressIndicator();
}
return Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
IconButton(
onPressed: () {
ln = pgm['linkedin'];
launch(ln);
// _launchLinkedIn();
},
icon: const Icon(
FontAwesomeIcons.linkedinIn,
size: 25,
),
iconSize: 25,
color: Colors.black),
IconButton(
onPressed: () {
tw = pgm['twitter'];
launch(tw);
//_launchTwitter();
},
icon: const Icon(
FontAwesomeIcons.twitter,
size: 25,
),
iconSize: 25,
color: Colors.black,
),
IconButton(
onPressed: () {
ig = pgm['instagram'];
launch(ig);
// _launchInstagram();
},
icon: const Icon(
FontAwesomeIcons.instagram,
size: 25,
),
iconSize: 25,
color: Colors.black),
IconButton(
onPressed: () {
yt = pgm['youtube'];
launch(yt);
// _launchYoutube();
},
icon: const Icon(
FontAwesomeIcons.youtube,
size: 25,
),
iconSize: 25,
color: Colors.black)
],
);
},
),
),
const Spacer(
flex: 8,
......@@ -251,7 +275,7 @@ class Footer extends StatelessWidget {
)),
Container(
width: screenSize.width * 0.25,
height: screenSize.height * 0.55,
height: screenSize.height * 0.6,
//color: Colors.blue,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
......@@ -285,9 +309,9 @@ class Footer extends StatelessWidget {
height: screenSize.height * 0.3,
child: Text(
'PT. Tiga Daya Digital Indonesia \nThe East '
'Tower 19th Floor \nJl. Dr. Ide Anak Agung '
'\nGde Agung Blok E3.2 '
'\nMega Kuningan, \nJakarta Selatan 12950',
'Tower 19th Floor \nJl. Dr. Ide Anak Agung '
'\nGde Agung Blok E3.2 '
'\nMega Kuningan, \nJakarta Selatan 12950',
style: GoogleFonts.poppins(
fontSize: 16,
height: 1.5,
......@@ -310,9 +334,9 @@ class Footer extends StatelessWidget {
height: screenSize.height * 0.13,
child: const Center(
child: Text(
'PT. Tiga Daya Digital Indonesia © 2018, All Rights Reserved.',
style: TextStyle(letterSpacing: 1.3, height: 1.4, fontSize: 17),
)),
'PT. Tiga Daya Digital Indonesia © 2018, All Rights Reserved.',
style: TextStyle(letterSpacing: 1.3, height: 1.4, fontSize: 17),
)),
)
],
));
......@@ -411,7 +435,7 @@ class _EmailAPIState extends State<EmailAPI> {
return const CircularProgressIndicator();
}
return Container(
width: screenSize.width * 0.2,
width: screenSize.width * 0.25,
child: ListTile(
leading: const Icon(
Icons.mail,
......@@ -421,7 +445,7 @@ class _EmailAPIState extends State<EmailAPI> {
title: TextButton(
onPressed: () {
email = pgm['email'];
launch('mailto:$email?subject=Info MCS');
launch('mailto:$email?subject=Info Medapp');
},
// child: SettingAPI(),
child: Text(
......
......@@ -63,7 +63,7 @@ class _HomePageUserState extends State<HomePageUser> {
const Home3(),
const Home4(),
ContactUs2(),
const Footer(),
Footer(),
],
),
);
......
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