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'; ...@@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:firebase_auth/firebase_auth.dart'; import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:form_field_validator/form_field_validator.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:http/http.dart' as http;
import 'package:medapp_eksad/firebase/showSnackbar_Alertdialog.dart'; import 'package:medapp_eksad/firebase/showSnackbar_Alertdialog.dart';
import 'package:medapp_eksad/widget/button_color.dart'; import 'package:medapp_eksad/widget/button_color.dart';
...@@ -27,6 +28,7 @@ class _ForgotPasswordState extends State<ForgotPassword> { ...@@ -27,6 +28,7 @@ class _ForgotPasswordState extends State<ForgotPassword> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
return Stack( return Stack(
children: [ children: [
Container( Container(
...@@ -45,38 +47,64 @@ class _ForgotPasswordState extends State<ForgotPassword> { ...@@ -45,38 +47,64 @@ class _ForgotPasswordState extends State<ForgotPassword> {
), ),
Center( Center(
child: AlertDialog( child: AlertDialog(
title: Text('Receive an email \nto reset your password.',textAlign: TextAlign.center,), title: Text('Reset Password',textAlign: TextAlign.center,),
content: Form( content: Container(
width: screenSize.width*0.25,
height: screenSize.height*0.3,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Form(
key: formKey, key: formKey,
child: TextFormField( child: TextFormField(
textAlign: TextAlign.start, textAlign: TextAlign.start,
controller: emailController, controller: emailController,
textInputAction: TextInputAction.done, textInputAction: TextInputAction.done,
autovalidateMode: AutovalidateMode.onUserInteraction, //autovalidateMode: AutovalidateMode.onUserInteraction,
validator: (email) => email != null && EmailValidator(errorText: 'Enter a valid email').isValid(email)
? "Enter a valid email"
:null
,
decoration: InputDecoration( decoration: InputDecoration(
labelText: "Enter your email address", labelText: "Enter your email address",
hintStyle: const TextStyle(), hintStyle: const TextStyle(),
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0)), borderRadius: BorderRadius.circular(5.0)),
), ),
validator: (value) {
if (value == null || value.isEmpty) {
return 'Please enter your email address';
}
return null;
},
// onChanged: (value) => email = value, // onChanged: (value) => email = value,
), ),
), ),
actions: <Widget>[ Container
TextButton( (height: screenSize.height*0.1,
onPressed: () { child: Text('We will send you an email with'
resetPassword(); ' a link to reset your password, please enter the email'
//Navigator.pushNamed(context, 'dashboard'); ' 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;
}
}, },
child: const Text('Send'), // resetPassword();
// //Navigator.pushNamed(context, 'dashboard');
// },
child: const Text('Send'),),
)
],
),
),
), ),
], ),
)),
], ],
); );
} }
...@@ -90,7 +118,7 @@ class _ForgotPasswordState extends State<ForgotPassword> { ...@@ -90,7 +118,7 @@ class _ForgotPasswordState extends State<ForgotPassword> {
} on FirebaseAuthException catch (e){ } on FirebaseAuthException catch (e){
print(e); print(e);
showSnackBar(context, e.message.toString()); showSnackBarError(context, e.message!);
Navigator.of(context).pop(); Navigator.of(context).pop();
} }
} }
......
...@@ -63,7 +63,7 @@ class _HomePageState extends State<HomePage> { ...@@ -63,7 +63,7 @@ class _HomePageState extends State<HomePage> {
const Home3(), const Home3(),
const Home4(), const Home4(),
ContactUs2(), ContactUs2(),
const Footer(), Footer(),
], ],
), ),
); );
......
...@@ -63,7 +63,7 @@ class _AboutUsState extends State<AboutUs> { ...@@ -63,7 +63,7 @@ class _AboutUsState extends State<AboutUs> {
const Home3(), const Home3(),
const Home4(), const Home4(),
ContactUs2(), ContactUs2(),
const Footer(), Footer(),
], ],
), ),
); );
......
...@@ -2,17 +2,22 @@ import 'package:flutter/material.dart'; ...@@ -2,17 +2,22 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:google_fonts/google_fonts.dart'; import 'package:google_fonts/google_fonts.dart';
import 'package:medapp_eksad/api/setting_api.dart'; import 'package:medapp_eksad/api/setting_api.dart';
import 'package:medapp_eksad/api/sosmed_api.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class Footer extends StatelessWidget { 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size; var screenSize = MediaQuery.of(context).size;
return Container( return Container(
width: screenSize.width, width: screenSize.width,
height: screenSize.height * 0.78, height: screenSize.height * 0.8,
color: Colors.white, color: Colors.white,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
...@@ -43,9 +48,10 @@ class Footer extends StatelessWidget { ...@@ -43,9 +48,10 @@ class Footer extends StatelessWidget {
decoration: const BoxDecoration( decoration: const BoxDecoration(
//color: Colors.lightBlueAccent, //color: Colors.lightBlueAccent,
image: DecorationImage( image: DecorationImage(
image: AssetImage( image:
'assets/logo/medapp-logo.png'), AssetImage('assets/logo/medapp-logo.png'),
fit: BoxFit.fill)), fit: BoxFit.fill),
),
), ),
const Spacer( const Spacer(
flex: 8, flex: 8,
...@@ -56,9 +62,10 @@ class Footer extends StatelessWidget { ...@@ -56,9 +62,10 @@ class Footer extends StatelessWidget {
decoration: const BoxDecoration( decoration: const BoxDecoration(
//color: Colors.lightBlueAccent, //color: Colors.lightBlueAccent,
image: DecorationImage( image: DecorationImage(
image: AssetImage( image:
'assets/logo/logo-eksad.png'), AssetImage('assets/logo/logo-eksad.png'),
fit: BoxFit.fill)), fit: BoxFit.fill),
),
), ),
const Spacer( const Spacer(
flex: 8, flex: 8,
...@@ -86,55 +93,72 @@ class Footer extends StatelessWidget { ...@@ -86,55 +93,72 @@ class Footer extends StatelessWidget {
width: screenSize.width * 0.14, width: screenSize.width * 0.14,
height: screenSize.height * 0.03, height: screenSize.height * 0.03,
//color: Colors.blue, //color: Colors.blue,
child: Row( 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, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
IconButton( IconButton(
onPressed: () { onPressed: () {
launch( ln = pgm['linkedin'];
'https://www.linkedin.com/company/pt-tiga-daya-digital-indonesia-triputra-group-eksad-technology'); launch(ln);
// _launchLinkedIn();
}, },
icon: const Icon( icon: const Icon(
FontAwesomeIcons.linkedinIn, FontAwesomeIcons.linkedinIn,
size: 30, size: 25,
),
iconSize: 20,
), ),
iconSize: 25,
color: Colors.black),
IconButton( IconButton(
onPressed: () { onPressed: () {
launch( tw = pgm['twitter'];
'https://twitter.com/eksadtechnology/'); launch(tw);
//_launchTwitter();
}, },
icon: const Icon( icon: const Icon(
FontAwesomeIcons.twitter, FontAwesomeIcons.twitter,
size: 30, size: 25,
), ),
iconSize: 20, iconSize: 25,
color: Colors.black,
), ),
IconButton( IconButton(
onPressed: () { onPressed: () {
launch( ig = pgm['instagram'];
'https://www.instagram.com/eksad_technology/'); launch(ig);
// _launchInstagram();
}, },
icon: const Icon( icon: const Icon(
FontAwesomeIcons.instagram, FontAwesomeIcons.instagram,
size: 30, size: 25,
),
iconSize: 20,
), ),
iconSize: 25,
color: Colors.black),
IconButton( IconButton(
onPressed: () { onPressed: () {
launch( yt = pgm['youtube'];
'https://www.youtube.com/channel/UCiZgIbpWgrAMrHW-TaS9EPw'); launch(yt);
// _launchYoutube();
}, },
icon: const Icon( icon: const Icon(
FontAwesomeIcons.youtube, FontAwesomeIcons.youtube,
size: 30, size: 25,
), ),
iconSize: 20, iconSize: 25,
) color: Colors.black)
], ],
);
},
), ),
), ),
const Spacer( const Spacer(
flex: 8, flex: 8,
...@@ -251,7 +275,7 @@ class Footer extends StatelessWidget { ...@@ -251,7 +275,7 @@ class Footer extends StatelessWidget {
)), )),
Container( Container(
width: screenSize.width * 0.25, width: screenSize.width * 0.25,
height: screenSize.height * 0.55, height: screenSize.height * 0.6,
//color: Colors.blue, //color: Colors.blue,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
...@@ -411,7 +435,7 @@ class _EmailAPIState extends State<EmailAPI> { ...@@ -411,7 +435,7 @@ class _EmailAPIState extends State<EmailAPI> {
return const CircularProgressIndicator(); return const CircularProgressIndicator();
} }
return Container( return Container(
width: screenSize.width * 0.2, width: screenSize.width * 0.25,
child: ListTile( child: ListTile(
leading: const Icon( leading: const Icon(
Icons.mail, Icons.mail,
...@@ -421,7 +445,7 @@ class _EmailAPIState extends State<EmailAPI> { ...@@ -421,7 +445,7 @@ class _EmailAPIState extends State<EmailAPI> {
title: TextButton( title: TextButton(
onPressed: () { onPressed: () {
email = pgm['email']; email = pgm['email'];
launch('mailto:$email?subject=Info MCS'); launch('mailto:$email?subject=Info Medapp');
}, },
// child: SettingAPI(), // child: SettingAPI(),
child: Text( child: Text(
......
...@@ -63,7 +63,7 @@ class _HomePageUserState extends State<HomePageUser> { ...@@ -63,7 +63,7 @@ class _HomePageUserState extends State<HomePageUser> {
const Home3(), const Home3(),
const Home4(), const Home4(),
ContactUs2(), 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