Skip to content

Commit aaf3607

Browse files
committed
Settings page is now tabbed + added lua bindings library (not implemented yet)
1 parent 6d59374 commit aaf3607

File tree

6 files changed

+58
-46
lines changed

6 files changed

+58
-46
lines changed

.flutter-plugins-dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_ios","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_ios-2.0.7\\\\","dependencies":[]},{"name":"permission_handler","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-8.3.0\\\\","dependencies":[]},{"name":"shared_preferences_ios","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_ios-2.0.8\\\\","dependencies":[]},{"name":"url_launcher","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher-6.0.15\\\\","dependencies":[]}],"android":[{"name":"path_provider_android","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_android-2.0.9\\\\","dependencies":[]},{"name":"permission_handler","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-8.3.0\\\\","dependencies":[]},{"name":"shared_preferences_android","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_android-2.0.9\\\\","dependencies":[]},{"name":"url_launcher","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher-6.0.15\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.3\\\\","dependencies":[]},{"name":"shared_preferences_macos","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_macos-2.0.2\\\\","dependencies":[]},{"name":"url_launcher_macos","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_macos-2.0.2\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.1.2\\\\","dependencies":[]},{"name":"shared_preferences_linux","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_linux-2.0.3\\\\","dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_linux-2.0.2\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.4\\\\","dependencies":[]},{"name":"shared_preferences_windows","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_windows-2.0.3\\\\","dependencies":["path_provider_windows"]},{"name":"url_launcher_windows","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_windows-2.0.2\\\\","dependencies":[]}],"web":[{"name":"shared_preferences_web","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_web-2.0.2\\\\","dependencies":[]},{"name":"url_launcher_web","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_web-2.0.4\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_ios","shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_ios","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"url_launcher","dependencies":["url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2021-12-07 19:44:06.717293","version":"2.5.3"}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_ios","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_ios-2.0.7\\\\","dependencies":[]},{"name":"permission_handler","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-8.3.0\\\\","dependencies":[]},{"name":"shared_preferences_ios","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_ios-2.0.8\\\\","dependencies":[]},{"name":"url_launcher","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher-6.0.15\\\\","dependencies":[]}],"android":[{"name":"path_provider_android","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_android-2.0.9\\\\","dependencies":[]},{"name":"permission_handler","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\permission_handler-8.3.0\\\\","dependencies":[]},{"name":"shared_preferences_android","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_android-2.0.9\\\\","dependencies":[]},{"name":"url_launcher","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher-6.0.15\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.3\\\\","dependencies":[]},{"name":"shared_preferences_macos","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_macos-2.0.2\\\\","dependencies":[]},{"name":"url_launcher_macos","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_macos-2.0.2\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.1.2\\\\","dependencies":[]},{"name":"shared_preferences_linux","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_linux-2.0.3\\\\","dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_linux-2.0.2\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.4\\\\","dependencies":[]},{"name":"shared_preferences_windows","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_windows-2.0.3\\\\","dependencies":["path_provider_windows"]},{"name":"url_launcher_windows","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_windows-2.0.2\\\\","dependencies":[]}],"web":[{"name":"shared_preferences_web","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\shared_preferences_web-2.0.2\\\\","dependencies":[]},{"name":"url_launcher_web","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_web-2.0.4\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_ios","shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_ios","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"url_launcher","dependencies":["url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2021-12-08 07:51:16.067684","version":"2.5.3"}

.packages

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# For more info see: https://dart.dev/go/dot-packages-deprecation
55
#
6-
# Generated by pub on 2021-12-06 22:46:47.553585.
6+
# Generated by pub on 2021-12-08 07:51:15.316498.
77
archive:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/archive-3.1.6/lib/
88
async:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.8.1/lib/
99
boolean_selector:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-2.1.0/lib/
@@ -29,6 +29,7 @@ image:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/
2929
js:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.3/lib/
3030
linked_scroll_controller:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/linked_scroll_controller-0.2.0/lib/
3131
lints:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/lints-1.0.1/lib/
32+
lua_dardo:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/lua_dardo-0.0.4/lib/
3233
matcher:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.10/lib/
3334
meta:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.7.0/lib/
3435
nested:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/nested-1.0.0/lib/
@@ -57,6 +58,7 @@ shared_preferences_web:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/
5758
shared_preferences_windows:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_windows-2.0.3/lib/
5859
sky_engine:file:///D:/Programming/Flutter/flutter/bin/cache/pkg/sky_engine/lib/
5960
source_span:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.8.1/lib/
61+
sprintf:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sprintf-6.0.0/lib/
6062
stack_trace:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.10.0/lib/
6163
stream_channel:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.1.0/lib/
6264
string_scanner:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.1.0/lib/

lib/homepage.dart

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -170,29 +170,6 @@ class _HomePageState extends State<HomePage> {
170170
},
171171
barrierDismissible: true);
172172
},
173-
// Row(
174-
// children: [
175-
// Image(
176-
// image:
177-
// ResizeImage.resizeIfNeeded(48, 48, t.icon.image)),
178-
// Column(
179-
// crossAxisAlignment: CrossAxisAlignment.start,
180-
// children: [
181-
// Text(
182-
// t.title,
183-
// style: const TextStyle(
184-
// fontSize: 16, fontWeight: FontWeight.bold),
185-
// ),
186-
// Text(t.desc, overflow: TextOverflow.ellipsis,)
187-
// ]),
188-
// const Expanded(child: Center()),
189-
// Column(
190-
// crossAxisAlignment: CrossAxisAlignment.end,
191-
// children: [Text(t.version)],
192-
// mainAxisAlignment: MainAxisAlignment.end,
193-
// ),
194-
// ],
195-
// ),
196173
));
197174
}
198175
}
@@ -329,17 +306,8 @@ class _HomePageState extends State<HomePage> {
329306
return Scaffold(
330307
appBar: AppBar(
331308
title: const Text("CoreCoder Develop"),
332-
// title: Text("Recursive Fibonacci"),
333309
centerTitle: true,
334310
actions: [
335-
// IconButton(
336-
// onPressed: () => {showCreateProjectDialog()},
337-
// icon: const Icon(Icons.add),
338-
// tooltip: "Create Project"),
339-
// IconButton(
340-
// onPressed: () => {refreshRecentProjects()},
341-
// icon: const Icon(Icons.refresh),
342-
// tooltip: "Refresh Projects"),
343311
IconButton(
344312
onPressed: () => {showSettings()},
345313
icon: const Icon(Icons.settings),

lib/settings.dart

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:corecoder_develop/util/theme_manager.dart';
2+
import 'package:flutter/cupertino.dart';
23
import 'package:flutter/material.dart';
34

45
class AppSettings {
@@ -32,6 +33,20 @@ class SettingsPageItem {
3233

3334
class SettingsPage extends StatelessWidget {
3435
static var routeName = "/SettingsPage";
36+
var tabs = <Widget>[
37+
Tab(
38+
text: "General",
39+
),
40+
Tab(text: "Plugins"),
41+
Tab(text: "About"),
42+
];
43+
44+
Widget getSettingsTabContent(BuildContext context) {
45+
return Column(
46+
children: List.generate(items.length, (index) {
47+
return generateListItem(index, context);
48+
}));
49+
}
3550

3651
SettingsPage({Key? key}) : super(key: key);
3752
List<SettingsPageItem> items = [
@@ -105,17 +120,28 @@ class SettingsPage extends StatelessWidget {
105120

106121
@override
107122
Widget build(BuildContext context) {
108-
return Scaffold(
109-
appBar: AppBar(
110-
title: const Text("Settings"),
111-
),
112-
body: SingleChildScrollView(
113-
controller: ScrollController(),
114-
child: Column(
115-
children: List.generate(items.length, (index) {
116-
return generateListItem(index, context);
117-
})),
118-
),
119-
);
123+
var tabsContent = <Widget>[
124+
/// General Page
125+
getSettingsTabContent(context),
126+
/// Plugins Page
127+
Column(),
128+
/// About page
129+
Column(children:const [
130+
Text("CoreCoder Develop"),
131+
Text("v0.0.1 dev beta"),
132+
])
133+
];
134+
return DefaultTabController(
135+
length: tabs.length,
136+
child: Scaffold(
137+
appBar: AppBar(
138+
title: const Text("Settings"),
139+
bottom: TabBar(
140+
tabs: tabs,
141+
),
142+
),
143+
body: TabBarView(
144+
children: tabsContent,
145+
)));
120146
}
121147
}

pubspec.lock

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,13 @@ packages:
170170
url: "https://pub.dartlang.org"
171171
source: hosted
172172
version: "1.0.1"
173+
lua_dardo:
174+
dependency: "direct dev"
175+
description:
176+
name: lua_dardo
177+
url: "https://pub.dartlang.org"
178+
source: hosted
179+
version: "0.0.4"
173180
matcher:
174181
dependency: transitive
175182
description:
@@ -364,6 +371,13 @@ packages:
364371
url: "https://pub.dartlang.org"
365372
source: hosted
366373
version: "1.8.1"
374+
sprintf:
375+
dependency: transitive
376+
description:
377+
name: sprintf
378+
url: "https://pub.dartlang.org"
379+
source: hosted
380+
version: "6.0.0"
367381
stack_trace:
368382
dependency: transitive
369383
description:

pubspec.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ dev_dependencies:
5656
linked_scroll_controller: ^0.2.0-nullsafety.0
5757
highlight: ^0.7.0
5858
flutter_highlight: ^0.7.0
59+
60+
lua_dardo: ^0.0.3
5961
# The "flutter_lints" package below contains a set of recommended lints to
6062
# encourage good coding practices. The lint set provided by the package is
6163
# activated in the `analysis_options.yaml` file located at the root of your

0 commit comments

Comments
 (0)