Commit 00648504 authored by rizky ramadhan's avatar rizky ramadhan

footer

parent 81efd891
......@@ -3,8 +3,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:url_launcher/url_launcher.dart';
import '../api/setting_api.dart';
class Footer extends StatelessWidget {
const Footer({Key? key}) : super(key: key);
......@@ -13,7 +11,7 @@ class Footer extends StatelessWidget {
var screenSize = MediaQuery.of(context).size;
return Container(
width: screenSize.width,
height: screenSize.height * 0.80,
height: screenSize.height * 0.78,
color: Colors.white,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
......@@ -27,7 +25,7 @@ class Footer extends StatelessWidget {
),
Container(
width: screenSize.width,
height: screenSize.height * 0.50,
height: screenSize.height * 0.55,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
......@@ -252,7 +250,7 @@ class Footer extends StatelessWidget {
)),
Container(
width: screenSize.width * 0.25,
height: screenSize.height * 0.75,
height: screenSize.height * 0.55,
//color: Colors.blue,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
......@@ -270,8 +268,30 @@ class Footer extends StatelessWidget {
),
),
const SizedBox(height: 8),
TelphoneApi(),
Container(
width: screenSize.width * 0.2,
child: ListTile(
leading: const Icon(
Icons.phone,
size: 22,
),
title: TextButton(
onPressed: () {
launch('tel:02157958040');
},
child: Container(
height: screenSize.height * 0.04,
child: Text(
'(021) 5795 - 8040',
style: GoogleFonts.poppins(
fontSize: 16,
color: Colors.black87,
),
),
),
),
),
),
Container(
width: screenSize.width * 0.2,
child: ListTile(
......@@ -365,56 +385,3 @@ class itemBawah extends StatelessWidget {
));
}
}
class TelphoneApi extends StatefulWidget {
const TelphoneApi({Key? key}) : super(key: key);
@override
State<TelphoneApi> createState() => _TelphoneApiState();
}
class _TelphoneApiState extends State<TelphoneApi> {
String no = '';
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
return FutureBuilder<List<dynamic>>(
future: getSettingDesc(),
builder: (BuildContext context, AsyncSnapshot snapshot) {
var pgm = snapshot.data[0];
if (snapshot.hasError ||
snapshot.data == null ||
snapshot.connectionState == ConnectionState.waiting) {
return const CircularProgressIndicator();
}
return Container(
width: screenSize.width * 0.01,
child: ListTile(
leading: const Icon(
Icons.phone,
size: 23,
color: Colors.black,
),
title: TextButton(
onPressed: () {
no = pgm['no'];
//02157958040
launch('tel:$no');
},
child: Text(
pgm['no'],
style: GoogleFonts.poppins(
fontSize: 16,
color: Colors.black87,
letterSpacing: 1.5
),
)),
),
);
},
);
}
}
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