@@ -30,19 +30,19 @@ class WorkspaceMobile extends StatelessWidget {
3030 return Scaffold (
3131 backgroundColor: provider.currentWorkspaceColor,
3232 body: Padding (
33- padding: EdgeInsets .symmetric (vertical: 20. h),
33+ padding: EdgeInsets .symmetric (vertical: 20. h, horizontal : 20. h ),
3434 child: Stack (
3535 clipBehavior: Clip .none,
3636 children: [
3737 const CanvasPage (),
3838 workspaceDrawerMob (device),
39- Positioned (right : 10 . h, top : 120 . h, child: UndoRedoButton ()),
40- Positioned (bottom : 100. h, left : 100. h, child : ToolBar ()),
41-
42- Positioned (
43- bottom : 0. h ,
44- right : 230. h ,
45- child : ZoomControlButton ( ),
39+ Positioned (top : 120 . h, right : 0 . h, child: UndoRedoButton ()),
40+ Padding (
41+ padding : EdgeInsets . only (bottom : 40. h),
42+ child : Align (
43+ alignment : Alignment .bottomCenter ,
44+ child : ToolBar () ,
45+ ),
4646 ),
4747
4848 Consumer2 <WorkspaceProvider , CanvasProvider >(
@@ -102,7 +102,7 @@ class WorkspaceMobile extends StatelessWidget {
102102 }
103103}
104104
105- Widget workspaceDrawerMob (rh.DeviceType device) {
105+ Widget workspaceDrawerMob (rh.DeviceType device, ) {
106106 return Consumer <WorkspaceProvider >(
107107 builder: (context, provider, child) {
108108 Color defaultBorderColor = const Color (0xFFD9D9D9 );
@@ -122,74 +122,76 @@ Widget workspaceDrawerMob(rh.DeviceType device) {
122122 mainAxisAlignment: MainAxisAlignment .start,
123123 children: [
124124 // Always visible header row
125- Container (
126- padding: EdgeInsets .only (bottom: 10 , top: 0 ),
127- child: Row (
128- mainAxisSize: MainAxisSize .min,
129- children: [
130- IconButton (
131- onPressed: () {
132- provider.toggleDrawer ();
133- },
134- icon: Icon (
135- PhosphorIconsRegular .sidebarSimple,
136- size: 80. sp,
125+ Row (
126+ mainAxisSize: MainAxisSize .min,
127+ mainAxisAlignment: MainAxisAlignment .start,
128+ children: [
129+ IconButton (
130+ onPressed: () {
131+ provider.toggleDrawer ();
132+ },
133+ icon:
134+ ! provider.isDrawerOpen
135+ ? Icon (
136+ PhosphorIconsRegular .sidebarSimple,
137+ size: 100. sp,
138+ color: Colors .black,
139+ )
140+ : Icon (
141+ Icons .close,
142+ size: 100. sp,
143+ color: Colors .black,
144+ ),
145+ splashRadius: 24. r,
146+ tooltip: 'Toggle Sidebar' ,
147+ ),
148+ SizedBox (width: 30. w),
149+ Expanded (
150+ child: TextField (
151+ controller: provider.workspaceNameController,
152+ style: TextStyle (
153+ fontFamily: 'Fredrik' ,
154+ fontSize: 72. sp,
155+ fontWeight: FontWeight .w600,
137156 color: Colors .black,
157+ letterSpacing: 0.6 ,
138158 ),
139- splashRadius: 24. r,
140- tooltip: 'Toggle Sidebar' ,
141- ),
142- SizedBox (width: 30. w),
143- Expanded (
144- child: TextField (
145- controller: provider.workspaceNameController,
146- style: TextStyle (
147- fontFamily: 'Fredrik' ,
148- fontSize: 62. sp,
149- fontWeight: FontWeight .w600,
150- color: Colors .black,
151- letterSpacing: 0.6 ,
152- ),
153- decoration: const InputDecoration (
154- isDense: true ,
155- contentPadding: EdgeInsets .zero,
156- border: InputBorder .none,
157- focusedBorder: InputBorder .none,
158- enabledBorder: InputBorder .none,
159- ),
159+ decoration: const InputDecoration (
160+ isDense: true ,
161+ contentPadding: EdgeInsets .zero,
162+ border: InputBorder .none,
163+ focusedBorder: InputBorder .none,
164+ enabledBorder: InputBorder .none,
160165 ),
161166 ),
162- SizedBox (width: 10. w),
167+ ),
168+ SizedBox (width: 10. w),
163169
164- Padding (
165- padding: const EdgeInsets .only (right: 20 ),
166- child: ElevatedButton (
167- onPressed: () {
168- showDialog (
169- context: context,
170- builder: (context) => ExportDialog (),
171- );
172- },
173- style: ElevatedButton .styleFrom (
174- elevation: 0 ,
175- backgroundColor: primaryColor,
176- padding: EdgeInsets .symmetric (
177- vertical: 25. h,
178- horizontal: 2. w,
179- ),
180- shape: RoundedRectangleBorder (
181- borderRadius: BorderRadius .circular (12. r),
182- ),
183- ),
184- child: Icon (
185- PhosphorIconsRegular .export,
186- color: Colors .white,
187- size: 80. sp,
188- ),
170+ ElevatedButton (
171+ onPressed: () {
172+ showDialog (
173+ context: context,
174+ builder: (context) => ExportDialog (),
175+ );
176+ },
177+ style: ElevatedButton .styleFrom (
178+ elevation: 0 ,
179+ backgroundColor: primaryColor,
180+ padding: EdgeInsets .symmetric (
181+ vertical: 10. h,
182+ horizontal: 0.1 .w,
183+ ),
184+ shape: RoundedRectangleBorder (
185+ borderRadius: BorderRadius .circular (12. r),
189186 ),
190187 ),
191- ],
192- ),
188+ child: Icon (
189+ PhosphorIconsRegular .export,
190+ color: Colors .white,
191+ size: 100. sp,
192+ ),
193+ ),
194+ ],
193195 ),
194196 Divider (),
195197 Expanded (
@@ -203,50 +205,50 @@ Widget workspaceDrawerMob(rh.DeviceType device) {
203205 alignment: Alignment .topCenter,
204206 child:
205207 provider.isDrawerOpen
206- ? Column (
207- mainAxisSize : MainAxisSize .max ,
208- children : [
209- device == rh. DeviceType .desktop
210- ? SizedBox ( height: 20. h)
211- : SizedBox (height : 10. h),
212- const Divider (color : Colors .grey, thickness : 0.5 ) ,
213- SizedBox (height : 10. h),
214- Expanded (
215- child: ListView .separated (
216- padding: EdgeInsets .zero,
217- itemCount: provider.canvasObjectsList.length,
218- separatorBuilder :
219- (context, index) =>
220- device == rh. DeviceType .desktop
221- ? SizedBox (height : 8. h)
222- : SizedBox (height : 2. h),
223- itemBuilder : (context, index) {
224- CanvasObject item =
225- provider.canvasObjectsList[index];
226- return _buildSelectableListTile (
227- context ,
228- provider : provider,
229- title :
230- item.toJson ()['object_type' ]
231- as String ,
232- iconData : provider. getIconForObjectType (
233- item. toJson ()[ 'object_type' ],
234- ), // Use the helper
235- index : index,
236- isSelected :
237- provider.currentlySelectedObjectId ==
238- item.id,
239- device : device,
240- onTap : () {
241- provider. changeCurrentlySelectedObj (
242- item.id ,
208+ ? Align (
209+ alignment : Alignment .topLeft ,
210+ child : SizedBox (
211+ width : 350. h,
212+ height: 780. h,
213+ child : Column (
214+ mainAxisSize : MainAxisSize .max ,
215+ children : [
216+ Expanded (
217+ child: ListView .builder (
218+ padding: EdgeInsets .zero,
219+ itemCount:
220+ provider.canvasObjectsList.length,
221+ itemBuilder : (context, index) {
222+ CanvasObject item =
223+ provider.canvasObjectsList[index];
224+ return _buildSelectableListTile (
225+ context,
226+ provider : provider,
227+ title :
228+ item. toJson ()[ 'object_type' ]
229+ as String ,
230+ iconData : provider
231+ . getIconForObjectType (
232+ item.toJson ()['object_type' ],
233+ ), // Use the helper
234+ index : index,
235+ isSelected :
236+ provider
237+ .currentlySelectedObjectId ==
238+ item.id,
239+ device : device,
240+ onTap : () {
241+ provider. changeCurrentlySelectedObj (
242+ item.id,
243+ );
244+ } ,
243245 );
244246 },
245- );
246- } ,
247- ) ,
247+ ),
248+ ) ,
249+ ] ,
248250 ),
249- ] ,
251+ ) ,
250252 )
251253 : const SizedBox .shrink (),
252254 ),
@@ -274,16 +276,12 @@ Widget _buildSelectableListTile(
274276 return Container (
275277 color: Colors .white,
276278 child: ListTile (
277- leading: Icon (
278- iconData,
279- size: device == rh.DeviceType .desktop ? 24. sp : 35. sp,
280- color: iconTextColor,
281- ),
279+ leading: Icon (iconData, size: 85. sp, color: iconTextColor),
282280 title: Text (
283281 title,
284282 style: TextStyle (
285283 fontFamily: 'Fredrik' ,
286- fontSize: device == rh. DeviceType .desktop ? 18. sp : 28 . sp,
284+ fontSize: 60 . sp,
287285 color: iconTextColor,
288286 ),
289287 ),
0 commit comments