Skip to content

Commit 0e6f268

Browse files
committed
Version now use single constant variable
1 parent 918f56f commit 0e6f268

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

lib/main.dart

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const borderColor = Color(0xFF3BBA73);
2929

3030
class CoreCoderApp extends StatefulWidget {
3131
const CoreCoderApp({Key? key}) : super(key: key);
32+
static const String version = "v0.0.1";
3233

3334
@override
3435
State<StatefulWidget> createState() {
@@ -85,12 +86,28 @@ class CoreCoderAppState extends State<CoreCoderApp> {
8586
// The title bar
8687
WindowTitleBarBox(
8788
child: Row(children: [
88-
Expanded(child: MoveWindow(child: Row(children:[
89-
const SizedBox(width: 16.0,),
90-
Image.asset("assets/logo.png",width: 20,height: 20,),
91-
const SizedBox(width: 16.0,),
92-
Text("CoreCoder v0.0.1", style: Theme.of(context).textTheme.bodyText1!,)
93-
]),)),
89+
Expanded(
90+
child: MoveWindow(
91+
child: Row(children: [
92+
const SizedBox(
93+
width: 16.0,
94+
),
95+
Image.asset(
96+
"assets/logo.png",
97+
isAntiAlias: true,
98+
filterQuality: FilterQuality.high,
99+
width: 20,
100+
height: 20,
101+
),
102+
const SizedBox(
103+
width: 16.0,
104+
),
105+
Text(
106+
"CoreCoder:Develop ${CoreCoderApp.version}",
107+
style: Theme.of(context).textTheme.bodyText1!,
108+
)
109+
]),
110+
)),
94111
const WindowButtons()
95112
])),
96113
if (widget != null) Expanded(child: widget)

lib/settings.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'package:corecoder_develop/main.dart';
12
import 'package:corecoder_develop/plugins_browser.dart';
23
import 'package:corecoder_develop/util/modules_manager.dart';
34
import 'package:corecoder_develop/util/theme_manager.dart';
@@ -251,10 +252,11 @@ class SettingsPageState extends State<SettingsPage> {
251252
}))
252253
]),
253254
/// About page
254-
Column(children:const [
255-
Text("CoreCoder Develop"),
256-
Text("v0.0.1 dev beta"),
257-
])
255+
ListTile(
256+
leading: Image.asset("assets/logo.png"),
257+
title: const Text("CoreCoder Develop"),
258+
subtitle: const Text(CoreCoderApp.version),
259+
)
258260
],
259261
);
260262
},future: PluginsManager.pluginsPath,)));

0 commit comments

Comments
 (0)