commit before upgrade
parent
b560340ebc
commit
fdd2354320
|
@ -40,8 +40,6 @@ class UserBloc extends Bloc<UserEvent, UserState> {
|
||||||
final String? saved = CREDENTIALS?.get('saved');
|
final String? saved = CREDENTIALS?.get('saved');
|
||||||
username = CREDENTIALS?.get('username');
|
username = CREDENTIALS?.get('username');
|
||||||
password = CREDENTIALS?.get('password');
|
password = CREDENTIALS?.get('password');
|
||||||
print(username);
|
|
||||||
print(password);
|
|
||||||
if (saved != null) {
|
if (saved != null) {
|
||||||
save = true;
|
save = true;
|
||||||
add(UserLogin(username: username, password: password));
|
add(UserLogin(username: username, password: password));
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
class VersionInfo {
|
class VersionInfo {
|
||||||
VersionInfo({
|
VersionInfo({
|
||||||
this.version,
|
this.id,
|
||||||
this.versionInfo,
|
this.versionInfo,
|
||||||
this.dateReleased,
|
this.dateReleased,
|
||||||
this.development,
|
this.development,
|
||||||
|
@ -11,7 +11,7 @@ class VersionInfo {
|
||||||
this.x8664DownloadUrl,
|
this.x8664DownloadUrl,
|
||||||
});
|
});
|
||||||
|
|
||||||
String? version;
|
String? id;
|
||||||
String? versionInfo;
|
String? versionInfo;
|
||||||
DateTime? dateReleased;
|
DateTime? dateReleased;
|
||||||
bool? development;
|
bool? development;
|
||||||
|
@ -22,7 +22,7 @@ class VersionInfo {
|
||||||
String? x8664DownloadUrl;
|
String? x8664DownloadUrl;
|
||||||
|
|
||||||
factory VersionInfo.fromJson(Map<String, dynamic> json) => VersionInfo(
|
factory VersionInfo.fromJson(Map<String, dynamic> json) => VersionInfo(
|
||||||
version: json["version"],
|
id: json["id"],
|
||||||
versionInfo: json["version_info"],
|
versionInfo: json["version_info"],
|
||||||
dateReleased: DateTime.parse(json["date_released"]),
|
dateReleased: DateTime.parse(json["date_released"]),
|
||||||
development: json["development"],
|
development: json["development"],
|
||||||
|
@ -34,7 +34,7 @@ class VersionInfo {
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
Map<String, dynamic> toJson() => {
|
||||||
"version": version,
|
"version": id,
|
||||||
"version_info": versionInfo,
|
"version_info": versionInfo,
|
||||||
"date_released":
|
"date_released":
|
||||||
"${dateReleased!.year.toString().padLeft(4, '0')}-${dateReleased!.month.toString().padLeft(2, '0')}-${dateReleased!.day.toString().padLeft(2, '0')}",
|
"${dateReleased!.year.toString().padLeft(4, '0')}-${dateReleased!.month.toString().padLeft(2, '0')}-${dateReleased!.day.toString().padLeft(2, '0')}",
|
||||||
|
|
|
@ -168,9 +168,9 @@ class _UpdateState extends State<Update> {
|
||||||
Future<void> openFile() async {
|
Future<void> openFile() async {
|
||||||
try {
|
try {
|
||||||
final filePath = await downloadFile();
|
final filePath = await downloadFile();
|
||||||
await openAPK(filePath);
|
await OpenFile.open(filePath);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print(e.toString());
|
throw e.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ class _UniT2LoginState extends State<UniT2Login> {
|
||||||
}, builder: (context, state) {
|
}, builder: (context, state) {
|
||||||
if (state is VersionLoaded) {
|
if (state is VersionLoaded) {
|
||||||
return Builder(builder: (context) {
|
return Builder(builder: (context) {
|
||||||
if (state.versionInfo?.version != state.apkVersion) {
|
if (state.versionInfo?.id == state.apkVersion) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Stack(
|
child: Stack(
|
||||||
|
@ -355,7 +355,7 @@ class _UniT2LoginState extends State<UniT2Login> {
|
||||||
//New update available
|
//New update available
|
||||||
return Update(
|
return Update(
|
||||||
apkVersion: state.apkVersion!,
|
apkVersion: state.apkVersion!,
|
||||||
currenVersion: state.versionInfo!.version!,
|
currenVersion: state.versionInfo!.id!,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -20,6 +20,18 @@ const xClientSecret = "unitcYqAN7GGalyz";
|
||||||
String? globalSex;
|
String? globalSex;
|
||||||
Profile? globalCurrentProfile;
|
Profile? globalCurrentProfile;
|
||||||
|
|
||||||
|
|
||||||
|
const String urlDownloadArmeabiv7aAPK =
|
||||||
|
"https://agusandelnorte.gov.ph/media/public/transparency/downloadables/UniT-App/v1.0.1/beta/unit_app_v1_0_1_beta_armeabi-v7a-release.apk?download";
|
||||||
|
|
||||||
|
const String urlDownloadX8664APK =
|
||||||
|
"https://agusandelnorte.gov.ph/media/public/transparency/downloadables/UniT-App/v1.0.1/beta/unit_app_v1_0_1_beta_x86_64-release.apk?download";
|
||||||
|
|
||||||
|
const String urlDownloadarm64v8aAPK =
|
||||||
|
"https://agusandelnorte.gov.ph/media/public/transparency/downloadables/UniT-App/v1.0.1/beta/unit_app_v1_0_1_beta_arm64-v8a-release.apk?download";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//// hive boxes
|
//// hive boxes
|
||||||
Box? CREDENTIALS;
|
Box? CREDENTIALS;
|
||||||
Box? SOS;
|
Box? SOS;
|
|
@ -2,7 +2,6 @@ import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:fluttertoast/fluttertoast.dart';
|
|
||||||
import 'package:http/http.dart';
|
import 'package:http/http.dart';
|
||||||
import 'package:unit2/utils/text_container.dart';
|
import 'package:unit2/utils/text_container.dart';
|
||||||
import 'package:unit2/utils/urls.dart';
|
import 'package:unit2/utils/urls.dart';
|
||||||
|
|
|
@ -5,8 +5,8 @@ class Url {
|
||||||
|
|
||||||
String host() {
|
String host() {
|
||||||
// return '192.168.10.183:3000';
|
// return '192.168.10.183:3000';
|
||||||
return 'agusandelnorte.gov.ph';
|
// return 'agusandelnorte.gov.ph';
|
||||||
// return "192.168.10.219:3000";
|
return "192.168.10.219:3000";
|
||||||
// return "192.168.10.241";
|
// return "192.168.10.241";
|
||||||
// return "192.168.10.221:3004";
|
// return "192.168.10.221:3004";
|
||||||
// return "playweb.agusandelnorte.gov.ph";
|
// return "playweb.agusandelnorte.gov.ph";
|
||||||
|
|
18
pubspec.lock
18
pubspec.lock
|
@ -25,14 +25,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.2"
|
version: "3.0.2"
|
||||||
animated_splash_screen:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: animated_splash_screen
|
|
||||||
sha256: f45634db6ec4e8cf034c53e03f3bd83898a16fe3c9286bf5510b6831dfcf2124
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.3.0"
|
|
||||||
app_popup_menu:
|
app_popup_menu:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -981,14 +973,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.1"
|
||||||
page_transition:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: page_transition
|
|
||||||
sha256: dee976b1f23de9bbef5cd512fe567e9f6278caee11f5eaca9a2115c19dc49ef6
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.1.0"
|
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1603,7 +1587,7 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.1.11"
|
version: "6.1.11"
|
||||||
url_launcher_android:
|
url_launcher_android:
|
||||||
dependency: "direct main"
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: url_launcher_android
|
name: url_launcher_android
|
||||||
sha256: b04af59516ab45762b2ca6da40fa830d72d0f6045cd97744450b73493fa76330
|
sha256: b04af59516ab45762b2ca6da40fa830d72d0f6045cd97744450b73493fa76330
|
||||||
|
|
|
@ -79,7 +79,7 @@ dependencies:
|
||||||
platform_device_id: ^1.0.1
|
platform_device_id: ^1.0.1
|
||||||
multi_dropdown: ^1.0.9
|
multi_dropdown: ^1.0.9
|
||||||
searchable_paginated_dropdown: ^1.2.0
|
searchable_paginated_dropdown: ^1.2.0
|
||||||
audioplayers: ^4.1.0
|
audioplayers: ^5.1.0
|
||||||
assets_audio_player: ^3.0.6
|
assets_audio_player: ^3.0.6
|
||||||
flutter_speed_dial: ^6.2.0
|
flutter_speed_dial: ^6.2.0
|
||||||
im_stepper: ^1.0.1+1
|
im_stepper: ^1.0.1+1
|
||||||
|
@ -93,11 +93,11 @@ dependencies:
|
||||||
file_picker: ^5.3.1
|
file_picker: ^5.3.1
|
||||||
expandable: ^5.0.1
|
expandable: ^5.0.1
|
||||||
flutter_simple_treeview: ^3.0.2
|
flutter_simple_treeview: ^3.0.2
|
||||||
syncfusion_flutter_pdfviewer: ^21.2.3
|
syncfusion_flutter_pdfviewer: ^23.1.36
|
||||||
url_launcher: ^6.1.11
|
url_launcher: ^6.1.11
|
||||||
url_launcher_android: ^6.0.38
|
|
||||||
share_plus: ^7.1.0
|
share_plus: ^7.1.0
|
||||||
animated_splash_screen: ^1.3.0
|
device_info_plus: ^9.0.3
|
||||||
|
better_open_file: ^3.6.4
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
intl: ^0.18.0
|
intl: ^0.18.0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue