Skip to content

Commit 4360817

Browse files
committed
Plugins System!
1 parent 9d60aef commit 4360817

31 files changed

+704
-71
lines changed

.flutter-plugins

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# This is a generated file; do not edit or check into version control.
2+
flutter_jscore=D:\\Programming\\Flutter\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_jscore-1.0.0\\
23
path_provider=D:\\Programming\\Flutter\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider-2.0.7\\
34
path_provider_android=D:\\Programming\\Flutter\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_android-2.0.9\\
45
path_provider_ios=D:\\Programming\\Flutter\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_ios-2.0.7\\

.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-09 10:21:01.856007","version":"2.5.3"}
1+
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_jscore","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_jscore-1.0.0\\\\","dependencies":[]},{"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":"flutter_jscore","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_jscore-1.0.0\\\\","dependencies":[]},{"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":"flutter_jscore","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_jscore-1.0.0\\\\","dependencies":[]},{"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":"flutter_jscore","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_jscore-1.0.0\\\\","dependencies":[]},{"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":"flutter_jscore","path":"D:\\\\Programming\\\\Flutter\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_jscore-1.0.0\\\\","dependencies":[]},{"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":"flutter_jscore","dependencies":[]},{"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-13 08:26:45.743616","version":"2.5.3"}

.packages

Lines changed: 2 additions & 3 deletions
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-09 10:21:01.272861.
6+
# Generated by pub on 2021-12-11 10:45:13.222499.
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/
@@ -20,6 +20,7 @@ file:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/f
2020
file_icon:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/file_icon-1.0.0/lib/
2121
flutter:file:///D:/Programming/Flutter/flutter/packages/flutter/lib/
2222
flutter_highlight:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_highlight-0.7.0/lib/
23+
flutter_jscore:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_jscore-1.0.0/lib/
2324
flutter_lints:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_lints-1.0.4/lib/
2425
flutter_test:file:///D:/Programming/Flutter/flutter/packages/flutter_test/lib/
2526
flutter_treeview:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_treeview-1.0.6+1/lib/
@@ -30,7 +31,6 @@ image:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/
3031
js:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.3/lib/
3132
linked_scroll_controller:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/linked_scroll_controller-0.2.0/lib/
3233
lints:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/lints-1.0.1/lib/
33-
lua_dardo:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/lua_dardo-0.0.4/lib/
3434
matcher:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.10/lib/
3535
meta:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.7.0/lib/
3636
nested:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/nested-1.0.0/lib/
@@ -59,7 +59,6 @@ shared_preferences_web:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/
5959
shared_preferences_windows:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_windows-2.0.3/lib/
6060
sky_engine:file:///D:/Programming/Flutter/flutter/bin/cache/pkg/sky_engine/lib/
6161
source_span:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.8.1/lib/
62-
sprintf:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sprintf-6.0.0/lib/
6362
stack_trace:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.10.0/lib/
6463
stream_channel:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.1.0/lib/
6564
string_scanner:file:///D:/Programming/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.1.0/lib/

android/app/build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ android {
4848
signingConfig signingConfigs.debug
4949
}
5050
}
51+
52+
repositories {
53+
flatDir {
54+
dirs 'libs'
55+
}
56+
}
57+
58+
sourceSets {
59+
main {
60+
jniLibs.srcDirs = ['jniLibs']
61+
}
62+
}
5163
}
5264

5365
flutter {
1.01 MB
Binary file not shown.
642 KB
Binary file not shown.
1.04 MB
Binary file not shown.
1.07 MB
Binary file not shown.
24.1 MB
Binary file not shown.

lib/homepage.dart

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'dart:io';
22

33
import 'package:corecoder_develop/settings.dart';
44
import 'package:corecoder_develop/util/cc_project_structure.dart';
5+
import 'package:corecoder_develop/util/plugins_manager.dart';
56
import 'package:flutter/material.dart';
67
import 'package:flutter/widgets.dart';
78

@@ -106,8 +107,7 @@ class _HomePageState extends State<HomePage> {
106107
/// Project Options
107108
/// -------------------------------------------------
108109
options.add(ListTile(
109-
leading: Image(
110-
image: ResizeImage.resizeIfNeeded(48, 48, t.icon.image)),
110+
leading: t.icon,
111111
trailing: Text(t.version),
112112
title: Text(t.title),
113113
subtitle: Text(t.desc),
@@ -151,7 +151,7 @@ class _HomePageState extends State<HomePage> {
151151
/// Go Ahead and create project asynchronously
152152
var slnPath = await t.onCreated(
153153
values); //TODO: This is prone to error (not checking if the file existed first)
154-
154+
if(slnPath == null) return;
155155
/// Add it to recent projects
156156
CCSolution? project =
157157
await rpm.addSolution(slnPath);
@@ -207,7 +207,7 @@ class _HomePageState extends State<HomePage> {
207207
rpm.clear();
208208
for (var sln in pref.getStringList("recentProjectsSln") ?? []) {
209209
await rpm.addSolution(sln);
210-
debugPrint(sln);
210+
//debugPrint(sln);
211211
}
212212
debugPrint("DONE");
213213
}
@@ -217,6 +217,7 @@ class _HomePageState extends State<HomePage> {
217217
void initState() {
218218
super.initState();
219219
refreshRecentProjects();
220+
220221
}
221222

222223
@override
@@ -274,19 +275,15 @@ class _HomePageState extends State<HomePage> {
274275
if (p.name == "") {
275276
continue;
276277
} // TODO: add better way to check if project is corrupt
277-
debugPrint(p.name);
278+
//debugPrint(p.name);
278279
projectsWidgets.add(Card(
279280
child: ListTile(
280281
onTap: () {
281282
touchFile(File(p.slnPath), p);
282283
refreshRecentProjects();
283284
loadSolution(p, context, mm);
284285
},
285-
leading: p.image != null
286-
? Image(
287-
image:
288-
ResizeImage.resizeIfNeeded(48, 48, p.image!.image))
289-
: const Icon(
286+
leading: p.image ?? const Icon(
290287
Icons.insert_drive_file,
291288
size: 48,
292289
),

0 commit comments

Comments
 (0)