@@ -17,6 +17,8 @@ import '../../util/cc_project_structure.dart';
1717import 'package:corecoder_develop/util/modules_manager.dart'
1818 show Module, ModulesManager, Template;
1919
20+ import 'homepage_projectlist.dart' ;
21+
2022/// Updates the file last modified
2123void touchFile (File file, CCSolution solution) {
2224 var newTime = DateTime .now ();
@@ -469,6 +471,9 @@ class _HomePageState extends State<HomePage> {
469471 });
470472 }
471473
474+ //TODO: Implement add project
475+ void onAddProject () {}
476+
472477 @override
473478 Widget build (BuildContext context) {
474479 final query = MediaQuery .of (context);
@@ -495,36 +500,11 @@ class _HomePageState extends State<HomePage> {
495500 icon: const Icon (Icons .settings),
496501 title: const Text ("Settings" )),
497502 ], content: < Widget > [
498- Padding (
499- padding: const EdgeInsets .all (16.0 ),
500- child: Column (
501- crossAxisAlignment: CrossAxisAlignment .stretch,
502- children: [
503- Row (children: [
504- const Text (
505- "Recent Projects" ,
506- style: TextStyle (
507- fontWeight: FontWeight .bold,
508- fontSize: 24.0 ,
509- ),
510- ),
511- const Spacer (flex: 1 ),
512- OutlinedButton (
513- onPressed: () {
514- refreshRecentProjects ();
515- },
516- child: const Text ("Refresh" ),
517- ),
518- const SizedBox (width: 4 ,),
519- OutlinedButton (
520- onPressed: () {},
521- child: const Text ("Open" ),
522- ),
523- ]),
524- Column (
525- children: projectsWidgetList,
526- )
527- ])),
503+ ProjectList (
504+ onAddProject: onAddProject,
505+ onRefresh: refreshRecentProjects,
506+ children: projectsWidgetList,
507+ ),
528508 const PluginsBrowser (),
529509 SettingsPage (mm),
530510 ])
@@ -533,35 +513,11 @@ class _HomePageState extends State<HomePage> {
533513 /// ==================
534514 /// The android layout
535515 /// ==================
536- Padding (
537- padding: const EdgeInsets .all (16.0 ),
538- child: Column (
539- crossAxisAlignment: CrossAxisAlignment .stretch,
540- children: [
541- Row (children: [
542- const Text (
543- "Recent Projects" ,
544- style: TextStyle (
545- fontWeight: FontWeight .bold,
546- fontSize: 24.0 ,
547- ),
548- ),
549- const Spacer (flex: 1 ),
550- OutlinedButton (
551- onPressed: () {
552- refreshRecentProjects ();
553- },
554- child: const Text ("Refresh" ),
555- ),
556- OutlinedButton (
557- onPressed: () {},
558- child: const Text ("Add" ),
559- ),
560- ]),
561- Column (
562- children: projectsWidgetList,
563- )
564- ])),
516+ ProjectList (
517+ onAddProject: onAddProject,
518+ onRefresh: refreshRecentProjects,
519+ children: projectsWidgetList,
520+ ),
565521 ));
566522 return Scaffold (
567523 appBar: CoreCoderApp .isLandscape (context)
0 commit comments