@@ -17,6 +17,8 @@ import '../../util/cc_project_structure.dart';
17
17
import 'package:corecoder_develop/util/modules_manager.dart'
18
18
show Module, ModulesManager, Template;
19
19
20
+ import 'homepage_projectlist.dart' ;
21
+
20
22
/// Updates the file last modified
21
23
void touchFile (File file, CCSolution solution) {
22
24
var newTime = DateTime .now ();
@@ -469,6 +471,9 @@ class _HomePageState extends State<HomePage> {
469
471
});
470
472
}
471
473
474
+ //TODO: Implement add project
475
+ void onAddProject () {}
476
+
472
477
@override
473
478
Widget build (BuildContext context) {
474
479
final query = MediaQuery .of (context);
@@ -495,36 +500,11 @@ class _HomePageState extends State<HomePage> {
495
500
icon: const Icon (Icons .settings),
496
501
title: const Text ("Settings" )),
497
502
], 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
+ ),
528
508
const PluginsBrowser (),
529
509
SettingsPage (mm),
530
510
])
@@ -533,35 +513,11 @@ class _HomePageState extends State<HomePage> {
533
513
/// ==================
534
514
/// The android layout
535
515
/// ==================
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
+ ),
565
521
));
566
522
return Scaffold (
567
523
appBar: CoreCoderApp .isLandscape (context)
0 commit comments