Refactor project, get server-client coms working

This commit is contained in:
zontreck 2024-05-23 00:11:14 -07:00
parent 6fadb92a26
commit 7cddfd2de6
22 changed files with 730 additions and 677 deletions

46
lib/pages/Proton.dart Normal file
View file

@ -0,0 +1,46 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../proton.dart';
import '../structs/settings.dart';
class Proton extends StatefulWidget {
Settings settings;
Proton({super.key, required this.settings});
@override
ProtonState createState() => ProtonState(settings: settings);
}
class ProtonState extends State<Proton> {
Settings settings;
ProtonState({required this.settings});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Proton Manager"),
backgroundColor: Color.fromARGB(255, 100, 0, 0),
),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
children: [
ListTile(
title: Text("Init Prefix"),
subtitle: Text("Resets proton prefix"),
leading: Icon(CupertinoIcons.folder_fill),
onTap: () {
runProton(
"echo", ["hello"]); // Change to "cmd" to execute 'cmd'
},
)
],
),
),
),
);
}
}