From c13e3c598e93b6db3f2d1a8c452dc610ec6cc6ac Mon Sep 17 00:00:00 2001 From: efrilm Date: Fri, 29 Aug 2025 20:48:40 +0700 Subject: [PATCH] feat: update --- .../pages/main/pages/order/order_page.dart | 1 + .../main/pages/profile/profile_page.dart | 143 +----------------- .../order/order_detail/order_detail_page.dart | 14 +- 3 files changed, 4 insertions(+), 154 deletions(-) diff --git a/lib/presentation/pages/main/pages/order/order_page.dart b/lib/presentation/pages/main/pages/order/order_page.dart index e631034..33b0a8a 100644 --- a/lib/presentation/pages/main/pages/order/order_page.dart +++ b/lib/presentation/pages/main/pages/order/order_page.dart @@ -160,6 +160,7 @@ class _OrderPageState extends State with TickerProviderStateMixin { return AppBar( elevation: 0, backgroundColor: AppColor.white, + automaticallyImplyLeading: false, title: Text('Pesanan'), actions: [ IconButton( diff --git a/lib/presentation/pages/main/pages/profile/profile_page.dart b/lib/presentation/pages/main/pages/profile/profile_page.dart index 4e3e49b..b7cc4eb 100644 --- a/lib/presentation/pages/main/pages/profile/profile_page.dart +++ b/lib/presentation/pages/main/pages/profile/profile_page.dart @@ -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), diff --git a/lib/presentation/pages/order/order_detail/order_detail_page.dart b/lib/presentation/pages/order/order_detail/order_detail_page.dart index 1c2d99f..7016635 100644 --- a/lib/presentation/pages/order/order_detail/order_detail_page.dart +++ b/lib/presentation/pages/order/order_detail/order_detail_page.dart @@ -47,19 +47,7 @@ class _OrderDetailPageState extends State { 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,