Skip to content

Commit 872a69c

Browse files
committed
Refactored file structure to follow MVC pattern
1 parent 808054d commit 872a69c

File tree

9 files changed

+54
-455
lines changed

9 files changed

+54
-455
lines changed

lib/controller/proxy_controller.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:get/get.dart';
2-
import '../model/proxies.dart';
2+
import '/model/proxies_model.dart';
33

44
class ProxyController extends GetxController {
55
final SocksModel socksModel = SocksModel();

lib/main.dart

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:flutter/material.dart';
22
import 'package:google_fonts/google_fonts.dart';
33

4-
import 'pages/home.dart';
4+
import 'view/pages/home_view.dart';
55

66
void main() {
77
runApp(const MyApp());
@@ -28,7 +28,45 @@ class MyApp extends StatelessWidget {
2828
),
2929
),
3030
// Set the home page as HomePage with a title 'Proxy Manager'
31-
home: const HomePage(title: 'Proxy Manager'),
31+
home: const HomeView(title: 'Proxy Manager'),
3232
);
3333
}
3434
}
35+
36+
37+
38+
39+
40+
41+
42+
43+
44+
45+
46+
47+
48+
49+
50+
51+
52+
53+
54+
55+
///
56+
///
57+
/// m: *
58+
/// p: * * * *
59+
///
60+
//
61+
/// m: * *
62+
/// p:
63+
//
64+
//
65+
66+
67+
68+
69+
70+
71+
72+

lib/model/proxies.dart renamed to lib/model/proxies_model.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@ import 'package:get/get.dart';
33
// Model for HTTP proxy basic configuration
44
class HTTPModel {
55
// Observable server address
6-
final RxString server = "127.0.0.1".obs;
6+
final RxString server = '127.0.0.1'.obs;
77
// Observable port
8-
final RxString port = "8080".obs;
8+
final RxString port = '8080'.obs;
99
// Observable for enabling/disabling this proxy
1010
final RxBool isEnabled = false.obs;
1111
}
1212

1313
// Model for HTTPS proxy basic configuration
1414
class HTTPSModel {
1515
// Observable server address
16-
final RxString server = "127.0.0.1".obs;
16+
final RxString server = '127.0.0.1'.obs;
1717
// Observable port
18-
final RxString port = "8080".obs;
18+
final RxString port = '8080'.obs;
1919
// Observable for enabling/disabling this proxy
2020
final RxBool isEnabled = false.obs;
2121
}
2222

2323
// Model for SOCKS proxy basic configuration
2424
class SocksModel {
2525
// Observable server address
26-
final RxString server = "127.0.0.1".obs;
26+
final RxString server = '127.0.0.1'.obs;
2727
// Observable port
28-
final RxString port = "8080".obs;
28+
final RxString port = '8080'.obs;
2929
// Observable for enabling/disabling this proxy
3030
final RxBool isEnabled = false.obs;
3131
}

lib/pages/home.dart

Lines changed: 0 additions & 229 deletions
This file was deleted.

0 commit comments

Comments
 (0)