11import 'dart:io' ;
22
3+ import 'package:archive/archive.dart' ;
34import 'package:corecoder_develop/screens/editor/editor.dart' ;
45import 'package:corecoder_develop/screens/settings/plugins_browser.dart' ;
56import 'package:corecoder_develop/util/cc_project_structure.dart' ;
7+ import 'package:corecoder_develop/util/plugins_manager.dart' ;
68import 'package:corecoder_develop/util/theme_manager.dart' ;
79import 'package:flutter/material.dart' ;
810import 'package:flutter/services.dart' ;
@@ -12,7 +14,6 @@ import 'package:shared_preferences/shared_preferences.dart';
1214import 'screens/homepage/homepage.dart' ;
1315import 'screens/editor/editor_drawer.dart' ;
1416import 'package:bitsdojo_window/bitsdojo_window.dart' ;
15-
1617void main () async {
1718 runApp (const CoreCoderApp ());
1819 if (CoreCoderApp .isDesktop) {
@@ -30,12 +31,16 @@ const borderColor = Color(0xFF3BBA73);
3031
3132class CoreCoderApp extends StatefulWidget {
3233 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) {
3639 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;
3842 }
43+
3944 @override
4045 State <StatefulWidget > createState () {
4146 return CoreCoderAppState ();
@@ -81,11 +86,10 @@ class CoreCoderAppState extends State<CoreCoderApp> {
8186 // debugPrint(result as String);
8287 // });
8388 }
84-
85-
8689 }
90+
8791 static final Future <SharedPreferences > _pref =
88- SharedPreferences .getInstance ();
92+ SharedPreferences .getInstance ();
8993
9094 @override
9195 Widget build (BuildContext context) {
@@ -109,33 +113,33 @@ class CoreCoderAppState extends State<CoreCoderApp> {
109113 child: Column (
110114 children: [
111115 // 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+ ])),
139143 if (widget != null ) Expanded (child: widget)
140144 ],
141145 ));
0 commit comments