Commit d3b4e2f5 authored by Fikri's avatar Fikri

consume api get untuk public

parent 92a9251b
...@@ -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.8, height: screenSize.height * 0.78,
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.6, height: screenSize.height * 0.55,
//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.25, width: screenSize.width * 0.2,
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 Medapp'); launch('mailto:$email?subject=Info MCS');
}, },
// child: SettingAPI(), // child: SettingAPI(),
child: Text( child: Text(
......
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