commit before upgrade

feature/passo/PASSO-#1-Sync-data-from-device-to-postgre-and-vice-versa
PGAN-MIS 2023-09-25 09:43:03 +08:00
parent b560340ebc
commit fdd2354320
9 changed files with 27 additions and 34 deletions

View File

@ -40,8 +40,6 @@ class UserBloc extends Bloc<UserEvent, UserState> {
final String? saved = CREDENTIALS?.get('saved');
username = CREDENTIALS?.get('username');
password = CREDENTIALS?.get('password');
print(username);
print(password);
if (saved != null) {
save = true;
add(UserLogin(username: username, password: password));

View File

@ -1,6 +1,6 @@
class VersionInfo {
VersionInfo({
this.version,
this.id,
this.versionInfo,
this.dateReleased,
this.development,
@ -11,7 +11,7 @@ class VersionInfo {
this.x8664DownloadUrl,
});
String? version;
String? id;
String? versionInfo;
DateTime? dateReleased;
bool? development;
@ -22,7 +22,7 @@ class VersionInfo {
String? x8664DownloadUrl;
factory VersionInfo.fromJson(Map<String, dynamic> json) => VersionInfo(
version: json["version"],
id: json["id"],
versionInfo: json["version_info"],
dateReleased: DateTime.parse(json["date_released"]),
development: json["development"],
@ -34,7 +34,7 @@ class VersionInfo {
);
Map<String, dynamic> toJson() => {
"version": version,
"version": id,
"version_info": versionInfo,
"date_released":
"${dateReleased!.year.toString().padLeft(4, '0')}-${dateReleased!.month.toString().padLeft(2, '0')}-${dateReleased!.day.toString().padLeft(2, '0')}",

View File

@ -168,9 +168,9 @@ class _UpdateState extends State<Update> {
Future<void> openFile() async {
try {
final filePath = await downloadFile();
await openAPK(filePath);
await OpenFile.open(filePath);
} catch (e) {
print(e.toString());
throw e.toString();
}
}

View File

@ -108,7 +108,7 @@ class _UniT2LoginState extends State<UniT2Login> {
}, builder: (context, state) {
if (state is VersionLoaded) {
return Builder(builder: (context) {
if (state.versionInfo?.version != state.apkVersion) {
if (state.versionInfo?.id == state.apkVersion) {
return SizedBox(
child: SingleChildScrollView(
child: Stack(
@ -355,7 +355,7 @@ class _UniT2LoginState extends State<UniT2Login> {
//New update available
return Update(
apkVersion: state.apkVersion!,
currenVersion: state.versionInfo!.version!,
currenVersion: state.versionInfo!.id!,
);
}
});

View File

@ -20,6 +20,18 @@ const xClientSecret = "unitcYqAN7GGalyz";
String? globalSex;
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
Box? CREDENTIALS;
Box? SOS;

View File

@ -2,7 +2,6 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:http/http.dart';
import 'package:unit2/utils/text_container.dart';
import 'package:unit2/utils/urls.dart';

View File

@ -5,8 +5,8 @@ class Url {
String host() {
// return '192.168.10.183:3000';
return 'agusandelnorte.gov.ph';
// return "192.168.10.219:3000";
// return 'agusandelnorte.gov.ph';
return "192.168.10.219:3000";
// return "192.168.10.241";
// return "192.168.10.221:3004";
// return "playweb.agusandelnorte.gov.ph";

View File

@ -25,14 +25,6 @@ packages:
url: "https://pub.dev"
source: hosted
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:
dependency: "direct main"
description:
@ -981,14 +973,6 @@ packages:
url: "https://pub.dev"
source: hosted
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:
dependency: transitive
description:
@ -1603,7 +1587,7 @@ packages:
source: hosted
version: "6.1.11"
url_launcher_android:
dependency: "direct main"
dependency: transitive
description:
name: url_launcher_android
sha256: b04af59516ab45762b2ca6da40fa830d72d0f6045cd97744450b73493fa76330

View File

@ -79,7 +79,7 @@ dependencies:
platform_device_id: ^1.0.1
multi_dropdown: ^1.0.9
searchable_paginated_dropdown: ^1.2.0
audioplayers: ^4.1.0
audioplayers: ^5.1.0
assets_audio_player: ^3.0.6
flutter_speed_dial: ^6.2.0
im_stepper: ^1.0.1+1
@ -93,11 +93,11 @@ dependencies:
file_picker: ^5.3.1
expandable: ^5.0.1
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_android: ^6.0.38
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:
intl: ^0.18.0