Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
小滋润 committed Sep 18, 2024
1 parent 8154a62 commit 04ffbf6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/develop_APK_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@ jobs:
file: build/app/outputs/flutter-apk/app-release.apk
asset_name: app-release.apk
tag: develop
overwrite: true
overwrite: true

- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: app-release
path: app/build/outputs/apk/release/app-release.apk
9 changes: 0 additions & 9 deletions lib/common/current.dart
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
import 'dart:io';

import 'package:leap_ledger_app/common/global.dart';
import 'package:device_info_plus/device_info_plus.dart';

enum ENV { dev, release }

class Current {
static const String cacheKey = 'current';
static late String token;
static late int accountId;
static late String peratingSystem; //android ios window
static late final String? deviceId;
static init() async {
_initDeviceId();

peratingSystem = Platform.operatingSystem;
Map<String, dynamic> prefsData = Global.cache.getData(cacheKey);
token = '';
accountId = prefsData['accountId'] ?? 0;
}

static saveToCache() => Global.cache.save(cacheKey, {'token': token, 'accountId': accountId});

static Future<void> _initDeviceId() async {
var deviceInfo = DeviceInfoPlugin();

Expand Down

0 comments on commit 04ffbf6

Please sign in to comment.