File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -285,12 +285,20 @@ class _HomePageState extends State<HomePage> {
285
285
RecentProjectsManager .instance.projects.sort ((CCSolution a, CCSolution b) {
286
286
return b.dateModified.compareTo (a.dateModified);
287
287
});
288
+ if (RecentProjectsManager .instance.projects.isEmpty) {
289
+ projectsWidgets.add (
290
+ const Text (
291
+ 'No recent projects found. Create one using the button below!' ,
292
+ )
293
+ );
294
+ }
295
+ else {
288
296
for (CCSolution p in RecentProjectsManager .instance.projects) {
289
297
if (p.name == "" ) {
290
298
continue ;
291
299
} // TODO: add better way to check if project is corrupt
292
300
//debugPrint(p.name);
293
- projectsWidgets.add (Card (
301
+ projectsWidgets.add (Card ( //TODO: refactor this as a widget elsewhere, then reference that widget from here
294
302
child: ListTile (
295
303
onTap: () {
296
304
touchFile (File (p.slnPath), p);
@@ -387,6 +395,8 @@ class _HomePageState extends State<HomePage> {
387
395
// icon: const Icon(FontAwesomeIcons.ellipsisV),
388
396
// )));
389
397
}
398
+
399
+ }
390
400
});
391
401
}
392
402
@@ -439,7 +449,7 @@ class _HomePageState extends State<HomePage> {
439
449
body: SingleChildScrollView (child: page),
440
450
floatingActionButton: FloatingActionButton (
441
451
onPressed: () => showCreateProjectDialog (),
442
- child: const Icon (Icons .create_new_folder)
452
+ child: const Icon (Icons .create_new_folder),
443
453
)
444
454
);
445
455
}
You can’t perform that action at this time.
0 commit comments