feat: update
This commit is contained in:
parent
936875c30a
commit
c13e3c598e
@ -160,6 +160,7 @@ class _OrderPageState extends State<OrderPage> with TickerProviderStateMixin {
|
||||
return AppBar(
|
||||
elevation: 0,
|
||||
backgroundColor: AppColor.white,
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text('Pesanan'),
|
||||
actions: [
|
||||
IconButton(
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../../../../common/theme/theme.dart';
|
||||
|
||||
@ -12,7 +11,7 @@ class ProfilePage extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColor.background,
|
||||
appBar: AppBar(title: Text('Akun')),
|
||||
appBar: AppBar(title: Text('Profil'), automaticallyImplyLeading: false),
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
@ -165,61 +164,6 @@ class ProfilePage extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
// Share the Sip Card
|
||||
Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.backgroundLight,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: AppColor.borderLight),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
// Share Icon
|
||||
Container(
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.success.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Icon(
|
||||
Icons.share,
|
||||
color: AppColor.success,
|
||||
size: 20,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
// Share Info
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Share the Sip',
|
||||
style: AppStyle.md.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColor.textPrimary,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Bagikan kode referral, dapatkan hadiah',
|
||||
style: AppStyle.sm.copyWith(
|
||||
color: AppColor.textSecondary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
color: AppColor.textSecondary,
|
||||
size: 14,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -280,52 +224,6 @@ class ProfilePage extends StatelessWidget {
|
||||
|
||||
const SizedBox(height: 8),
|
||||
|
||||
// Social Media Section
|
||||
Container(
|
||||
color: AppColor.white,
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Media Sosial',
|
||||
style: AppStyle.md.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColor.textPrimary,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
_buildSocialButton(
|
||||
icon: Icons.camera_alt,
|
||||
color: Colors.purple,
|
||||
onTap: () => _launchSocialMedia('instagram'),
|
||||
),
|
||||
_buildSocialButton(
|
||||
icon: Icons.facebook,
|
||||
color: Colors.blue,
|
||||
onTap: () => _launchSocialMedia('facebook'),
|
||||
),
|
||||
_buildSocialButton(
|
||||
icon: Icons.play_arrow,
|
||||
color: Colors.red,
|
||||
onTap: () => _launchSocialMedia('youtube'),
|
||||
),
|
||||
_buildSocialButton(
|
||||
icon: Icons.close,
|
||||
color: Colors.black,
|
||||
onTap: () => _launchSocialMedia('twitter'),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 8),
|
||||
|
||||
// Customer Service Section
|
||||
Container(
|
||||
color: AppColor.white,
|
||||
@ -467,49 +365,12 @@ class ProfilePage extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSocialButton({
|
||||
required IconData icon,
|
||||
required Color color,
|
||||
required VoidCallback onTap,
|
||||
}) {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
width: 48,
|
||||
height: 48,
|
||||
decoration: BoxDecoration(color: color, shape: BoxShape.circle),
|
||||
child: Icon(icon, color: AppColor.white, size: 24),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _launchSocialMedia(String platform) async {
|
||||
String url = '';
|
||||
switch (platform) {
|
||||
case 'instagram':
|
||||
url = 'https://instagram.com/';
|
||||
break;
|
||||
case 'facebook':
|
||||
url = 'https://facebook.com/';
|
||||
break;
|
||||
case 'youtube':
|
||||
url = 'https://youtube.com/';
|
||||
break;
|
||||
case 'twitter':
|
||||
url = 'https://twitter.com/';
|
||||
break;
|
||||
}
|
||||
|
||||
if (await canLaunch(url)) {
|
||||
await launch(url);
|
||||
}
|
||||
}
|
||||
|
||||
void _showLogoutDialog(BuildContext context) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
backgroundColor: AppColor.white,
|
||||
title: Text(
|
||||
'Logout',
|
||||
style: AppStyle.lg.copyWith(fontWeight: FontWeight.w600),
|
||||
|
||||
@ -47,19 +47,7 @@ class _OrderDetailPageState extends State<OrderDetailPage> {
|
||||
|
||||
PreferredSizeWidget _buildAppBar() {
|
||||
return AppBar(
|
||||
elevation: 0,
|
||||
backgroundColor: AppColor.white,
|
||||
leading: IconButton(
|
||||
onPressed: () => context.router.back(),
|
||||
icon: const Icon(Icons.arrow_back, color: AppColor.textPrimary),
|
||||
),
|
||||
title: Text(
|
||||
'Detail Pesanan',
|
||||
style: AppStyle.lg.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColor.textPrimary,
|
||||
),
|
||||
),
|
||||
title: Text('Detail Pesanan'),
|
||||
actions: [
|
||||
IconButton(
|
||||
onPressed: _shareOrder,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user