1
1
import 'dart:io' ;
2
2
3
+ import 'package:archive/archive.dart' ;
3
4
import 'package:corecoder_develop/screens/editor/editor.dart' ;
4
5
import 'package:corecoder_develop/screens/settings/plugins_browser.dart' ;
5
6
import 'package:corecoder_develop/util/cc_project_structure.dart' ;
7
+ import 'package:corecoder_develop/util/plugins_manager.dart' ;
6
8
import 'package:corecoder_develop/util/theme_manager.dart' ;
7
9
import 'package:flutter/material.dart' ;
8
10
import 'package:flutter/services.dart' ;
@@ -12,7 +14,6 @@ import 'package:shared_preferences/shared_preferences.dart';
12
14
import 'screens/homepage/homepage.dart' ;
13
15
import 'screens/editor/editor_drawer.dart' ;
14
16
import 'package:bitsdojo_window/bitsdojo_window.dart' ;
15
-
16
17
void main () async {
17
18
runApp (const CoreCoderApp ());
18
19
if (CoreCoderApp .isDesktop) {
@@ -30,12 +31,16 @@ const borderColor = Color(0xFF3BBA73);
30
31
31
32
class CoreCoderApp extends StatefulWidget {
32
33
const CoreCoderApp ({Key ? key}) : super (key: key);
33
- static const String version = "v0.0.3.1" ;
34
- static bool isDesktop = (Platform .isWindows || Platform .isLinux || Platform .isMacOS);
35
- static bool isLandscape (BuildContext context){
34
+ static const String version = "v0.0.4" ;
35
+ static bool isDesktop =
36
+ (Platform .isWindows || Platform .isLinux || Platform .isMacOS);
37
+
38
+ static bool isLandscape (BuildContext context) {
36
39
var q = MediaQuery .of (context);
37
- return q.orientation == Orientation .landscape || q.size.width > q.size.height;
40
+ return q.orientation == Orientation .landscape ||
41
+ q.size.width > q.size.height;
38
42
}
43
+
39
44
@override
40
45
State <StatefulWidget > createState () {
41
46
return CoreCoderAppState ();
@@ -81,11 +86,10 @@ class CoreCoderAppState extends State<CoreCoderApp> {
81
86
// debugPrint(result as String);
82
87
// });
83
88
}
84
-
85
-
86
89
}
90
+
87
91
static final Future <SharedPreferences > _pref =
88
- SharedPreferences .getInstance ();
92
+ SharedPreferences .getInstance ();
89
93
90
94
@override
91
95
Widget build (BuildContext context) {
@@ -109,33 +113,33 @@ class CoreCoderAppState extends State<CoreCoderApp> {
109
113
child: Column (
110
114
children: [
111
115
// The title bar
112
- if (CoreCoderApp .isDesktop)
113
- WindowTitleBarBox (
114
- child: Row (children: [
115
- Expanded (
116
- child: MoveWindow (
117
- child: Row (children: [
118
- const SizedBox (
119
- width: 16.0 ,
120
- ),
121
- Image .asset (
122
- "assets/logo.png" ,
123
- isAntiAlias: true ,
124
- filterQuality: FilterQuality .high,
125
- width: 20 ,
126
- height: 20 ,
127
- ),
128
- const SizedBox (
129
- width: 16.0 ,
130
- ),
131
- Text (
132
- "CoreCoder:Develop ${CoreCoderApp .version }" ,
133
- style: Theme .of (context).textTheme.bodyText1! ,
134
- )
135
- ]),
136
- )),
137
- const WindowButtons ()
138
- ])),
116
+ if (CoreCoderApp .isDesktop)
117
+ WindowTitleBarBox (
118
+ child: Row (children: [
119
+ Expanded (
120
+ child: MoveWindow (
121
+ child: Row (children: [
122
+ const SizedBox (
123
+ width: 16.0 ,
124
+ ),
125
+ Image .asset (
126
+ "assets/logo.png" ,
127
+ isAntiAlias: true ,
128
+ filterQuality: FilterQuality .high,
129
+ width: 20 ,
130
+ height: 20 ,
131
+ ),
132
+ const SizedBox (
133
+ width: 16.0 ,
134
+ ),
135
+ Text (
136
+ "CoreCoder:Develop ${CoreCoderApp .version }" ,
137
+ style: Theme .of (context).textTheme.bodyText1! ,
138
+ )
139
+ ]),
140
+ )),
141
+ const WindowButtons ()
142
+ ])),
139
143
if (widget != null ) Expanded (child: widget)
140
144
],
141
145
));
0 commit comments