46 lines
1.2 KiB
Dart
46 lines
1.2 KiB
Dart
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'
|
|
},
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|