Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 85 additions & 21 deletions lib/features/dashboard/widgets/dashboard_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,18 @@ class DashboardDrawer extends StatelessWidget {
return IntrinsicWidth(
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).cardColor,
color:
supabaseService.isDark
? Color.fromRGBO(48, 48, 48, 1)
: Color.fromRGBO(255, 255, 255, 1),
//const Color(0xFFD9D9D9)
border: Border.all(color: supabaseService.isDark? Color.fromARGB(1, 174, 174, 174): Color(0xFFD9D9D9), width: 1.2),
border: Border.all(
color:
supabaseService.isDark
? Color.fromRGBO(75, 75, 75, 1)
: Color.fromRGBO(217, 217, 217, 1),
width: 1.2,
),
borderRadius: BorderRadius.circular(12.r),
),
child: Padding(
Expand All @@ -53,9 +62,17 @@ class DashboardDrawer extends StatelessWidget {
ClipOval(
child: SizedBox(
width:
device == rh.DeviceType.desktop ? 72.w : device == rh.DeviceType.tab ? 72.w : 80.w,
device == rh.DeviceType.desktop
? 72.w
: device == rh.DeviceType.tab
? 72.w
: 80.w,
height:
device == rh.DeviceType.desktop ? 72.h : device == rh.DeviceType.tab ?72.h : 80.h,
device == rh.DeviceType.desktop
? 72.h
: device == rh.DeviceType.tab
? 72.h
: 80.h,
child:
displayAvatarUrl.isNotEmpty
? CachedNetworkImage(
Expand All @@ -79,7 +96,12 @@ class DashboardDrawer extends StatelessWidget {
),
),
SizedBox(
width: device == rh.DeviceType.desktop ? 8.w : device == rh.DeviceType.tab ? 8.w : 24.w,
width:
device == rh.DeviceType.desktop
? 8.w
: device == rh.DeviceType.tab
? 8.w
: 24.w,
),
Flexible(
child: Column(
Expand All @@ -93,7 +115,9 @@ class DashboardDrawer extends StatelessWidget {
fontSize:
device == rh.DeviceType.desktop
? 24.sp
: device == rh.DeviceType.tab ?24.sp : 36.sp,
: device == rh.DeviceType.tab
? 24.sp
: 36.sp,
fontWeight: FontWeight.w600,
letterSpacing: 0.6,
),
Expand All @@ -106,7 +130,9 @@ class DashboardDrawer extends StatelessWidget {
fontSize:
device == rh.DeviceType.desktop
? 16.sp
: device == rh.DeviceType.tab ? 16.sp : 24.sp,
: device == rh.DeviceType.tab
? 16.sp
: 24.sp,
),
),
],
Expand All @@ -115,11 +141,19 @@ class DashboardDrawer extends StatelessWidget {
],
),
SizedBox(
height: device == rh.DeviceType.desktop ? 30.h : device == rh.DeviceType.tab ?30.h : 16.h,
height:
device == rh.DeviceType.desktop
? 30.h
: device == rh.DeviceType.tab
? 30.h
: 16.h,
),
Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: device == rh.DeviceType.desktop ? MainAxisAlignment.start : MainAxisAlignment.spaceBetween ,
mainAxisAlignment:
device == rh.DeviceType.desktop
? MainAxisAlignment.start
: MainAxisAlignment.spaceBetween,
children: [
ElevatedButton.icon(
onPressed: () {
Expand All @@ -132,7 +166,8 @@ class DashboardDrawer extends StatelessWidget {
icon: Icon(
PhosphorIcons.pencilSimple(),
color: primaryColor,
size:device == rh.DeviceType.desktop ? 30.h : 25.h ,
size:
device == rh.DeviceType.desktop ? 30.h : 25.h,
),
style: ElevatedButton.styleFrom(
padding: EdgeInsets.symmetric(
Expand All @@ -149,11 +184,18 @@ class DashboardDrawer extends StatelessWidget {
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.r),
),
backgroundColor: Theme.of(context).cardColor,
backgroundColor:
supabaseService.isDark
? Color.fromRGBO(48, 48, 48, 1)
: Color.fromRGBO(255, 255, 255, 1),
side: BorderSide(color: primaryColor),
minimumSize: Size(
0,
device == rh.DeviceType.desktop ? 48.h : device == rh.DeviceType.tab ?48.h: 40.h,
device == rh.DeviceType.desktop
? 48.h
: device == rh.DeviceType.tab
? 48.h
: 40.h,
),
),
label: Text(
Expand All @@ -163,7 +205,9 @@ class DashboardDrawer extends StatelessWidget {
fontSize:
device == rh.DeviceType.desktop
? 16.sp
: device == rh.DeviceType.tab ? 18.sp : 24.sp,
: device == rh.DeviceType.tab
? 18.sp
: 24.sp,
color: primaryColor,
),
),
Expand All @@ -177,7 +221,8 @@ class DashboardDrawer extends StatelessWidget {
icon: Icon(
PhosphorIcons.signOut(),
color: Colors.white,
size:device == rh.DeviceType.desktop ? 30.h : 25.h ,
size:
device == rh.DeviceType.desktop ? 30.h : 25.h,
),
style: ElevatedButton.styleFrom(
padding: EdgeInsets.symmetric(
Expand All @@ -198,7 +243,11 @@ class DashboardDrawer extends StatelessWidget {
side: BorderSide(color: primaryColor),
minimumSize: Size(
0,
device == rh.DeviceType.desktop ? 48.h :device == rh.DeviceType.tab ?48.h: 40.h,
device == rh.DeviceType.desktop
? 48.h
: device == rh.DeviceType.tab
? 48.h
: 40.h,
),
),
label: Text(
Expand All @@ -208,7 +257,9 @@ class DashboardDrawer extends StatelessWidget {
fontSize:
device == rh.DeviceType.desktop
? 16.sp
: device == rh.DeviceType.tab ? 18.sp: 24.sp,
: device == rh.DeviceType.tab
? 18.sp
: 24.sp,
color: Colors.white,
),
),
Expand All @@ -218,7 +269,12 @@ class DashboardDrawer extends StatelessWidget {
],
),
SizedBox(
height: device == rh.DeviceType.desktop ? 15.h :device == rh.DeviceType.tab ?15.h: 10.h,
height:
device == rh.DeviceType.desktop
? 15.h
: device == rh.DeviceType.tab
? 15.h
: 10.h,
),
Visibility(
visible: dashboardProvider.isDrawerOpen,
Expand Down Expand Up @@ -257,7 +313,9 @@ class DashboardDrawer extends StatelessWidget {
color:
isSelected
? secondaryColors[6]
: supabaseService.isDark? Colors.white : Colors.black,
: supabaseService.isDark
? Colors.white
: Colors.black,
size:
device == rh.DeviceType.desktop
? 26.sp
Expand All @@ -279,9 +337,15 @@ class DashboardDrawer extends StatelessWidget {
fontSize:
device == rh.DeviceType.desktop
? 18.sp
: device == rh.DeviceType.tab ? 25.sp : 16.sp,
: device == rh.DeviceType.tab
? 25.sp
: 16.sp,
color:
isSelected ? Colors.blue : supabaseService.isDark? Colors.white :Colors.black,
isSelected
? Colors.blue
: supabaseService.isDark
? Colors.white
: Colors.black,
fontWeight:
isSelected
? FontWeight.w600
Expand All @@ -296,7 +360,7 @@ class DashboardDrawer extends StatelessWidget {
),
),
Spacer(),
UpgradeCard(sv: supabaseService,),
UpgradeCard(sv: supabaseService),
],
),
),
Expand Down
48 changes: 38 additions & 10 deletions lib/features/dashboard/widgets/project_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'package:provider/provider.dart';
import 'package:cookethflow/core/helpers/responsive_layout.helper.dart' as rh;

class ProjectCard extends StatelessWidget {
const ProjectCard({super.key, required this.workspaceId,required this.su});
const ProjectCard({super.key, required this.workspaceId, required this.su});
final String workspaceId;
final SupabaseService su;

Expand All @@ -40,9 +40,16 @@ class ProjectCard extends StatelessWidget {
},
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).cardColor,
color:
su.isDark
? Color.fromRGBO(75, 75, 75, 100)
: Color.fromRGBO(217, 217, 217, 100),
borderRadius: BorderRadius.circular(12.r),
border: Border.all(color: su.isDark?Colors.grey.shade700: const Color(0xFFD9D9D9), width: 1.2),
border: Border.all(
color:
su.isDark ? Colors.grey.shade700 : const Color(0xFFD9D9D9),
width: 1.2,
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
Expand All @@ -53,7 +60,10 @@ class ProjectCard extends StatelessWidget {
// Use the workspace background color for the thumbnail
decoration: BoxDecoration(
color:
workspace.backgroundColor ?? (su.isDark?Colors.grey.shade700: const Color(0xFFD3D3D3)),
workspace.backgroundColor ??
(su.isDark
? Colors.grey.shade700
: const Color(0xFFD3D3D3)),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(12.r),
topRight: Radius.circular(12.r),
Expand All @@ -70,8 +80,17 @@ class ProjectCard extends StatelessWidget {
? EdgeInsets.all(8.w)
: EdgeInsets.all(8.w),
decoration: BoxDecoration(
color:su.isDark? Theme.of(context).scaffoldBackgroundColor: Colors.white.withOpacity(0.8),
color:
su.isDark
? Color.fromRGBO(48, 48, 48, 1)
: Color.fromRGBO(255, 255, 255, 1),
borderRadius: BorderRadius.circular(12.r),
border: BoxBorder.all(
color:
su.isDark
? Color.fromRGBO(75, 75, 75, 1)
: Color.fromRGBO(217, 217, 217,1),
),
),
child: IconButton(
padding: EdgeInsets.zero,
Expand All @@ -98,7 +117,7 @@ class ProjectCard extends StatelessWidget {
: deviceType == rh.DeviceType.tab
? 32.sp
: 80.sp,
color: su.isDark?Colors.white: Colors.black,
color: su.isDark ? Colors.white : Colors.black,
),
),
),
Expand All @@ -110,7 +129,10 @@ class ProjectCard extends StatelessWidget {
Expanded(
flex: 1,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24, vertical: 16),
padding: EdgeInsets.symmetric(
horizontal: 24,
vertical: 16,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
Expand All @@ -129,7 +151,8 @@ class ProjectCard extends StatelessWidget {
: deviceType == rh.DeviceType.tab
? 18.sp
: 50.sp,
color: su.isDark?Colors.white: Colors.black,
color:
su.isDark ? Colors.white : Colors.black,
fontWeight: FontWeight.w600,
),
overflow: TextOverflow.ellipsis,
Expand All @@ -139,7 +162,10 @@ class ProjectCard extends StatelessWidget {
dth.formatLastEdited(workspace.lastEdited),
style: TextStyle(
fontFamily: 'Fredrik',
color: su.isDark?Colors.white: Colors.grey[600],
color:
su.isDark
? Colors.white
: Colors.grey[600],
fontSize:
deviceType == rh.DeviceType.desktop
? 14.sp
Expand Down Expand Up @@ -181,7 +207,9 @@ class ProjectCard extends StatelessWidget {
color:
workspace.isStarred
? Colors.amber
:su.isDark?Colors.white: Colors.black54,
: su.isDark
? Colors.white
: Colors.black54,
),
),
),
Expand Down
4 changes: 3 additions & 1 deletion lib/features/dashboard/widgets/upgrade_plan.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ class _UpgradeCardState extends State<UpgradeCard> {
: 30.w,
),
decoration: BoxDecoration(
color: Theme.of(context).cardColor,
color: widget.sv.isDark
? Color.fromRGBO(48, 48, 48, 100)
: Color.fromRGBO(255, 255, 255, 100),
borderRadius: BorderRadius.circular(12.r),
border: Border.all(
color: widget.sv.isDark ? Colors.grey.shade700 : Color(0xFFD9D9D9),
Expand Down
Loading