更新firebase版本

This commit is contained in:
fengshengxiong 2024-05-31 17:37:06 +08:00
parent 016ff82fce
commit 6875ded842
3 changed files with 42 additions and 28 deletions

View File

@ -202,7 +202,7 @@
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
39CCEDF39CF579238AE308F0 /* [CP] Embed Pods Frameworks */,
405E88F0300BCE9602B4DA07 /* [CP] Copy Pods Resources */,
456CF4E894A8BC296C35D84E /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
11551C2B5E159DE061202726 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
);
buildRules = (
);
@ -275,6 +275,24 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
11551C2B5E159DE061202726 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\"";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --platform=ios --apple-project-path=${SRCROOT} --env-platform-name=${PLATFORM_NAME} --env-configuration=${CONFIGURATION} --env-project-dir=${PROJECT_DIR} --env-built-products-dir=${BUILT_PRODUCTS_DIR} --env-dwarf-dsym-folder-path=${DWARF_DSYM_FOLDER_PATH} --env-dwarf-dsym-file-name=${DWARF_DSYM_FILE_NAME} --env-infoplist-path=${INFOPLIST_PATH} --default-config=default\n";
};
34C811B39ECD78862B33AD2D /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -347,24 +365,6 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
456CF4E894A8BC296C35D84E /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\"";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --platform=ios --apple-project-path=${SRCROOT} --env-platform-name=${PLATFORM_NAME} --env-configuration=${CONFIGURATION} --env-project-dir=${PROJECT_DIR} --env-built-products-dir=${BUILT_PRODUCTS_DIR} --env-dwarf-dsym-folder-path=${DWARF_DSYM_FOLDER_PATH} --env-dwarf-dsym-file-name=${DWARF_DSYM_FILE_NAME} --env-infoplist-path=${INFOPLIST_PATH} --default-config=default\n";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;

View File

@ -1,3 +1,6 @@
import 'dart:async';
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:easy_refresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:hello_wallpaper/common/components/view_state_widget.dart';
@ -8,6 +11,7 @@ import 'package:hello_wallpaper/routes/app_pages.dart';
class DiscoverController extends GetxController {
static DiscoverController get to => Get.find<DiscoverController>();
late StreamSubscription<List<ConnectivityResult>> _connectivitySubscription;
late final EasyRefreshController refreshController;
late ViewState viewState;
var allWallpaper = <WallpaperData>[];
@ -25,24 +29,31 @@ class DiscoverController extends GetxController {
@override
void onInit() {
super.onInit();
_connectivitySubscription = Connectivity().onConnectivityChanged.listen((List<ConnectivityResult> result) {
if (result.contains(ConnectivityResult.none)) {
getData();
}
});
refreshController = EasyRefreshController(controlFinishLoad: true);
getData();
}
@override
void onClose() {
_connectivitySubscription.cancel();
super.onClose();
}
void getData() {
todayNewestData = HomeController.to.getRandomCls();
if (todayNewestData != null &&
todayNewestData!.data != null &&
todayNewestData!.data!.length >= 3) {
if (todayNewestData != null && todayNewestData!.data != null && todayNewestData!.data!.length >= 3) {
clsName = ObjUtil.getStr(todayNewestData!.name);
var flatList = todayNewestData!.data!.map((e) => e).toList();
// 3
todayNewestList = (flatList..shuffle()).take(3).toList();
}
viewState = HomeController.to.viewState;
allWallpaper = HomeController.to.wallpaperModelList
.expand((element) => element.data ?? <WallpaperData>[])
.toList();
allWallpaper = HomeController.to.wallpaperModelList.expand((element) => element.data ?? <WallpaperData>[]).toList();
// List顺序
allWallpaper.shuffle();
_getDataToShow();

View File

@ -95,10 +95,13 @@ dependencies:
# AppLovin
applovin_max: ^3.10.0
# 网络状态监听
connectivity_plus: ^6.0.3
# Firebase
firebase_core: ^2.31.1
firebase_analytics: ^10.10.6
firebase_crashlytics: ^3.5.6
firebase_core: ^2.32.0
firebase_analytics: ^10.10.7
firebase_crashlytics: ^3.5.7
flutter_launcher_icons:
android: "launcher_icon"