Skip to content

Commit

Permalink
release builds were not working
Browse files Browse the repository at this point in the history
  • Loading branch information
dazemc committed May 3, 2024
1 parent a6d4e00 commit 45e3310
Show file tree
Hide file tree
Showing 6 changed files with 58,696 additions and 45 deletions.
30 changes: 15 additions & 15 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "300451adae589accbece3490f4396f10bdf15e6e"
revision: "54e66469a933b60ddf175f858f82eaeb97e48c8d"
channel: "stable"

project_type: app
Expand All @@ -13,26 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 300451adae589accbece3490f4396f10bdf15e6e
base_revision: 300451adae589accbece3490f4396f10bdf15e6e
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
- platform: android
create_revision: 300451adae589accbece3490f4396f10bdf15e6e
base_revision: 300451adae589accbece3490f4396f10bdf15e6e
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
- platform: ios
create_revision: 300451adae589accbece3490f4396f10bdf15e6e
base_revision: 300451adae589accbece3490f4396f10bdf15e6e
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
- platform: linux
create_revision: 300451adae589accbece3490f4396f10bdf15e6e
base_revision: 300451adae589accbece3490f4396f10bdf15e6e
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
- platform: macos
create_revision: 300451adae589accbece3490f4396f10bdf15e6e
base_revision: 300451adae589accbece3490f4396f10bdf15e6e
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
- platform: web
create_revision: 300451adae589accbece3490f4396f10bdf15e6e
base_revision: 300451adae589accbece3490f4396f10bdf15e6e
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
- platform: windows
create_revision: 300451adae589accbece3490f4396f10bdf15e6e
base_revision: 300451adae589accbece3490f4396f10bdf15e6e
create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d
base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d

# User provided section

Expand Down
5 changes: 3 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:label="wipi"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/ic_launcher"
android:enableOnBackInvokedCallback="true">
<activity
android:name=".MainActivity"
android:exported="true"
Expand Down Expand Up @@ -42,4 +42,5 @@
<data android:mimeType="text/plain" />
</intent>
</queries>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
46 changes: 18 additions & 28 deletions lib/controllers/wipi_controller.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:flutter/foundation.dart';
import 'package:get/get.dart';
import 'package:flutter/material.dart';
import 'package:wipi/models/saved_connections.dart';
Expand Down Expand Up @@ -28,42 +27,35 @@ class WiPiController extends GetxController {
void fetchSavedConnections() async {
clearConnectionList();
final response = await getx.get(showConnections);
if (kDebugMode) {
savedConnections.value =
response.body['saved_connections'].cast<String>();
wifiInfo.value = savedConnections[0];
fetchCredentials(wifiInfo.value);
getDeleteColor();
}
savedConnections.value = response.body['saved_connections'].cast<String>();
wifiInfo.value = savedConnections[0];
fetchCredentials(wifiInfo.value);
getDeleteColor();
}

void fetchCredentials(connection) async {
wifiInfo.value = connection;
getDeleteColor();
final response = await getx.get("$showCredentials${wifiInfo.value}");
if (kDebugMode) {
creds = response.body;
for (String key in creds.keys) {
displayConnections = {
key: Connection(
ssid: creds[key]["ssid"],
keymgmt: creds[key]["key-mgmt"],
psk: creds[key]["psk"])
};
}
displayCredentials();
creds = response.body;
for (String key in creds.keys) {
displayConnections = {
key: Connection(
ssid: creds[key]["ssid"],
keymgmt: creds[key]["key-mgmt"],
psk: creds[key]["psk"])
};
}
displayCredentials();
}

void postCredentials() async {
// print('Sending Credentials');
final response =
await getx.post(sendCredentials, {"SSID": ssid, "PASS": pass});
if (kDebugMode) {
if (response.body == "Connected") {
connected = true;
fetchSavedConnections();
}
if (response.body == "Connected") {
connected = true;
fetchSavedConnections();
}
}

Expand All @@ -80,10 +72,8 @@ class WiPiController extends GetxController {
final response = await getx.get("$deleteCredentials$connection");
clearConnectionList();
fetchSavedConnections();
if (kDebugMode) {
if (response.body == "Deleted: $connection") {
print("Successfully deleted");
}
if (response.body == "Deleted: $connection") {
// print("Successfully deleted");
}
}

Expand Down
Loading

0 comments on commit 45e3310

Please sign in to comment.