1+ import 'package:cookethflow/core/providers/supabase_provider.dart' ;
12import 'package:cookethflow/features/dashboard/pages/mobile/drawer_mobile.dart' ;
23import 'package:cookethflow/features/dashboard/providers/dashboard_provider.dart' ;
34import 'package:cookethflow/features/dashboard/widgets/dashboard_drawer.dart' ;
@@ -21,8 +22,8 @@ class _DashboardMobileState extends State<DashboardMobile> {
2122 @override
2223 Widget build (BuildContext context) {
2324 rh.DeviceType deviceType = rh.ResponsiveLayoutHelper .getDeviceType (context);
24- return Consumer <DashboardProvider >(
25- builder: (context, provider, child) {
25+ return Consumer2 <DashboardProvider , SupabaseService >(
26+ builder: (context, provider,suprovider, child) {
2627 return LayoutBuilder (
2728 builder: (context, constraints) {
2829 return Container (
@@ -38,7 +39,7 @@ class _DashboardMobileState extends State<DashboardMobile> {
3839 Container (
3940 padding: EdgeInsets .all (10 ),
4041 decoration: BoxDecoration (
41- border: Border .all (color: Colors .black),
42+ border: Border .all (color: suprovider.isDark ? Colors .white : Colors .black),
4243 borderRadius: BorderRadius .circular (8 ),
4344 ),
4445 child: InkWell (
@@ -56,7 +57,7 @@ class _DashboardMobileState extends State<DashboardMobile> {
5657 const SizedBox (height: 34 ),
5758 Expanded (
5859 // NEW: Conditionally build the main content area
59- child: _buildMainContent (provider),
60+ child: _buildMainContent (provider,suprovider ),
6061 ),
6162 ],
6263 ),
@@ -86,7 +87,7 @@ class _DashboardMobileState extends State<DashboardMobile> {
8687
8788
8889 // NEW: Helper widget to build content based on the selected tab
89- Widget _buildMainContent (DashboardProvider provider) {
90+ Widget _buildMainContent (DashboardProvider provider, SupabaseService su ) {
9091 switch (provider.tabIndex) {
9192 case 2 : // Trash Tab
9293 return Center (
@@ -96,7 +97,7 @@ class _DashboardMobileState extends State<DashboardMobile> {
9697 fontFamily: 'Fredrik' ,
9798 fontSize: 45. sp,
9899 fontWeight: FontWeight .w600,
99- color: Colors .grey[600 ],
100+ color: su.isDark ? Colors .white : Colors .grey[600 ],
100101 ),
101102 ),
102103 );
@@ -110,7 +111,7 @@ class _DashboardMobileState extends State<DashboardMobile> {
110111 fontFamily: 'Fredrik' ,
111112 fontSize: 40. sp,
112113 height: 1.6 ,
113- color: Colors .black.withOpacity (0.75 ),
114+ color: su.isDark ? Colors .white : Colors .black.withOpacity (0.75 ),
114115 ),
115116 ),
116117 );
@@ -126,7 +127,7 @@ class _DashboardMobileState extends State<DashboardMobile> {
126127 fontFamily: 'Fredrik' ,
127128 fontSize: 45. sp,
128129 fontWeight: FontWeight .w600,
129- color: Colors .grey[600 ],
130+ color: su.isDark ? Colors .white : Colors .grey[600 ],
130131 ),
131132 ),
132133 );
@@ -144,7 +145,7 @@ class _DashboardMobileState extends State<DashboardMobile> {
144145 ),
145146 itemBuilder: (context, index) {
146147 final workspace = displayedWorkspaces[index];
147- return ProjectCard (workspaceId: workspace.id);
148+ return ProjectCard (workspaceId: workspace.id,su : su, );
148149 },
149150 );
150151 }
0 commit comments