mirror of
https://github.com/darkmoonight/Rain.git
synced 2026-03-13 10:31:53 +08:00
Minor fix
This commit is contained in:
@@ -7,10 +7,11 @@
|
||||
|
||||
# The following line activates a set of recommended lints for Flutter apps,
|
||||
# packages, and plugins designed to encourage good coding practices.
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
analyzer:
|
||||
errors:
|
||||
invalid_annotation_target: ignore
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
linter:
|
||||
# The lint rules applied to this project can be customized in the
|
||||
|
||||
@@ -75,8 +75,8 @@ flutter {
|
||||
|
||||
dependencies {
|
||||
implementation("androidx.core:core-remoteviews:1.1.0")
|
||||
implementation("com.google.android.material:material:1.12.0")
|
||||
implementation('androidx.work:work-runtime-ktx:2.10.3')
|
||||
implementation("com.google.android.material:material:1.13.0")
|
||||
implementation('androidx.work:work-runtime-ktx:2.10.4')
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ pluginManagement {
|
||||
|
||||
plugins {
|
||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||
id "com.android.application" version '8.12.0' apply false
|
||||
id "org.jetbrains.kotlin.android" version "2.2.0" apply false
|
||||
id "com.android.application" version '8.13.0' apply false
|
||||
id "org.jetbrains.kotlin.android" version "2.2.20" apply false
|
||||
}
|
||||
|
||||
include ":app"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'dart:io';
|
||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
import 'package:display_mode/display_mode.dart';
|
||||
import 'package:dynamic_color/dynamic_color.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_displaymode/flutter_displaymode.dart';
|
||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:flutter_timezone/flutter_timezone.dart';
|
||||
@@ -112,7 +112,7 @@ void setupConnectivityListener() {
|
||||
}
|
||||
|
||||
Future<void> initializeTimeZone() async {
|
||||
final timeZoneName = await FlutterTimezone.getLocalTimezone();
|
||||
final String timeZoneName = await FlutterTimezone.getLocalTimezone();
|
||||
tz.initializeTimeZones();
|
||||
tz.setLocalLocation(tz.getLocation(timeZoneName));
|
||||
}
|
||||
@@ -149,14 +149,20 @@ Future<void> initializeNotifications() async {
|
||||
}
|
||||
|
||||
Future<void> setOptimalDisplayMode() async {
|
||||
final supported = await FlutterDisplayMode.supported;
|
||||
final active = await FlutterDisplayMode.active;
|
||||
final sameResolution =
|
||||
final List<DisplayModeJson> supported = await FlutterDisplayMode.supported;
|
||||
final DisplayModeJson active = await FlutterDisplayMode.active;
|
||||
final List<DisplayModeJson> sameResolution =
|
||||
supported
|
||||
.where((m) => m.width == active.width && m.height == active.height)
|
||||
.where(
|
||||
(DisplayModeJson m) =>
|
||||
m.width == active.width && m.height == active.height,
|
||||
)
|
||||
.toList()
|
||||
..sort((a, b) => b.refreshRate.compareTo(a.refreshRate));
|
||||
final mostOptimalMode = sameResolution.isNotEmpty
|
||||
..sort(
|
||||
(DisplayModeJson a, DisplayModeJson b) =>
|
||||
b.refreshRate.compareTo(a.refreshRate),
|
||||
);
|
||||
final DisplayModeJson mostOptimalMode = sameResolution.isNotEmpty
|
||||
? sameResolution.first
|
||||
: active;
|
||||
await FlutterDisplayMode.setPreferredMode(mostOptimalMode);
|
||||
@@ -181,7 +187,7 @@ class MyApp extends StatefulWidget {
|
||||
final state = context.findAncestorStateOfType<_MyAppState>()!;
|
||||
|
||||
if (newAmoledTheme != null) state.changeAmoledTheme(newAmoledTheme);
|
||||
if (newMaterialColor != null) state.changeMarerialTheme(newMaterialColor);
|
||||
if (newMaterialColor != null) state.changeMaterialTheme(newMaterialColor);
|
||||
if (newRoundDegree != null) state.changeRoundDegree(newRoundDegree);
|
||||
if (newLargeElement != null) state.changeLargeElement(newLargeElement);
|
||||
if (newLocale != null) state.changeLocale(newLocale);
|
||||
@@ -205,7 +211,7 @@ class _MyAppState extends State<MyApp> {
|
||||
|
||||
void changeAmoledTheme(bool newAmoledTheme) =>
|
||||
setState(() => amoledTheme = newAmoledTheme);
|
||||
void changeMarerialTheme(bool newMaterialColor) =>
|
||||
void changeMaterialTheme(bool newMaterialColor) =>
|
||||
setState(() => materialColor = newMaterialColor);
|
||||
void changeRoundDegree(bool newRoundDegree) =>
|
||||
setState(() => roundDegree = newRoundDegree);
|
||||
|
||||
64
pubspec.lock
64
pubspec.lock
@@ -157,10 +157,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: code_builder
|
||||
sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e"
|
||||
sha256: "11654819532ba94c34de52ff5feb52bd81cba1de00ef2ed622fd50295f9d4243"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.10.1"
|
||||
version: "4.11.0"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -173,10 +173,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: connectivity_plus
|
||||
sha256: b5e72753cf63becce2c61fd04dfe0f1c430cc5278b53a1342dc5ad839eab29ec
|
||||
sha256: "33bae12a398f841c6cda09d1064212957265869104c478e5ad51e2fb26c3973c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.1.5"
|
||||
version: "7.0.0"
|
||||
connectivity_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -253,10 +253,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: device_info_plus
|
||||
sha256: "98f28b42168cc509abc92f88518882fd58061ea372d7999aecc424345c7bff6a"
|
||||
sha256: "49413c8ca514dea7633e8def233b25efdf83ec8522955cc2c0e3ad802927e7c6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "11.5.0"
|
||||
version: "12.1.0"
|
||||
device_info_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -289,6 +289,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
display_mode:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: display_mode
|
||||
sha256: "8a381f3602a09dc4e96140a0df30808631468d6d0dfff7722f67b1f83757a7cc"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.0.2"
|
||||
dynamic_color:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -334,14 +342,6 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_displaymode:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_displaymode
|
||||
sha256: "42c5e9abd13d28ed74f701b60529d7f8416947e58256e6659c5550db719c57ef"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.0"
|
||||
flutter_expandable_fab:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -378,10 +378,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_local_notifications
|
||||
sha256: a9966c850de5e445331b854fa42df96a8020066d67f125a5964cbc6556643f68
|
||||
sha256: "7ed76be64e8a7d01dfdf250b8434618e2a028c9dfa2a3c41dc9b531d4b3fc8a5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "19.4.1"
|
||||
version: "19.4.2"
|
||||
flutter_local_notifications_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -402,10 +402,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_local_notifications_windows
|
||||
sha256: ed46d7ae4ec9d19e4c8fa2badac5fe27ba87a3fe387343ce726f927af074ec98
|
||||
sha256: "8d658f0d367c48bd420e7cf2d26655e2d1130147bca1eea917e576ca76668aaf"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
version: "1.0.3"
|
||||
flutter_localizations:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@@ -415,10 +415,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_map
|
||||
sha256: df33e784b09fae857c6261a5521dd42bd4d3342cb6200884bb70730638af5fd5
|
||||
sha256: "391e7dc95cc3f5190748210a69d4cfeb5d8f84dcdfa9c3235d0a9d7742ccb3f8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.2.1"
|
||||
version: "8.2.2"
|
||||
flutter_map_animations:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -465,10 +465,10 @@ packages:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: freezed
|
||||
sha256: da32f8ba8cfcd4ec71d9decc8cbf28bd2c31b5283d9887eb51eb4a0659d8110c
|
||||
sha256: "13065f10e135263a4f5a4391b79a8efc5fb8106f8dd555a9e49b750b45393d77"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.0"
|
||||
version: "3.2.3"
|
||||
freezed_annotation:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -705,10 +705,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: internet_connection_checker_plus
|
||||
sha256: "5aea4a1ee0fcca736980a7d04d96fe8c0b53dea330690053305a5c5392230112"
|
||||
sha256: f0a1a9f336e9fb093f30e6cfd8915ad98243f171be5863824a19e658b13c1a9d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.7.2"
|
||||
version: "2.8.0"
|
||||
intl:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -793,10 +793,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker
|
||||
sha256: "8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0"
|
||||
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "11.0.1"
|
||||
version: "11.0.2"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1009,10 +1009,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pool
|
||||
sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
|
||||
sha256: "978783255c543aa3586a1b3c21f6e9d720eb315376a915872c61ef8b5c20177d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.1"
|
||||
version: "1.5.2"
|
||||
posix:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1238,10 +1238,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_android
|
||||
sha256: "69ee86740f2847b9a4ba6cffa74ed12ce500bbe2b07f3dc1e643439da60637b7"
|
||||
sha256: "199bc33e746088546a39cc5f36bac5a278c5e53b40cb3196f99e7345fdcfae6b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.3.18"
|
||||
version: "6.3.22"
|
||||
url_launcher_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1435,5 +1435,5 @@ packages:
|
||||
source: hosted
|
||||
version: "3.1.3"
|
||||
sdks:
|
||||
dart: ">=3.8.1 <4.0.0"
|
||||
flutter: ">=3.32.0"
|
||||
dart: ">=3.9.2 <4.0.0"
|
||||
flutter: ">=3.35.0"
|
||||
|
||||
16
pubspec.yaml
16
pubspec.yaml
@@ -6,7 +6,7 @@ publish_to: "none"
|
||||
version: 1.3.8+41
|
||||
|
||||
environment:
|
||||
sdk: ">=3.8.1 <4.0.0"
|
||||
sdk: ">=3.9.2 <4.0.0"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
@@ -24,7 +24,8 @@ dependencies:
|
||||
geolocator: ^14.0.2
|
||||
home_widget: ^0.8.0
|
||||
restart_app: ^1.3.2
|
||||
flutter_map: ^8.2.1
|
||||
flutter_map: ^8.2.2
|
||||
display_mode: ^0.0.2
|
||||
workmanager: ^0.9.0+3
|
||||
google_fonts: ^6.3.1
|
||||
url_launcher: ^6.3.2
|
||||
@@ -33,12 +34,11 @@ dependencies:
|
||||
path_provider: ^2.1.5
|
||||
json_annotation: ^4.9.0
|
||||
flutter_timezone: ^4.1.1
|
||||
device_info_plus: ^11.5.0
|
||||
device_info_plus: ^12.1.0
|
||||
package_info_plus: ^8.3.1
|
||||
connectivity_plus: ^6.1.5
|
||||
connectivity_plus: ^7.0.0
|
||||
freezed_annotation: ^3.1.0
|
||||
flutter_map_cache: ^2.0.0+1
|
||||
flutter_displaymode: ^0.6.0
|
||||
lat_lng_to_timezone: ^0.2.0
|
||||
line_awesome_flutter: ^3.0.1
|
||||
dio_cache_interceptor: ^4.0.3
|
||||
@@ -47,8 +47,8 @@ dependencies:
|
||||
flutter_expandable_fab: ^2.5.2
|
||||
flutter_hsvcolor_picker: ^1.5.1
|
||||
scrollable_positioned_list: ^0.3.8
|
||||
flutter_local_notifications: ^19.4.1
|
||||
internet_connection_checker_plus: ^2.7.2
|
||||
flutter_local_notifications: ^19.4.2
|
||||
internet_connection_checker_plus: ^2.8.0
|
||||
isar_community: ^3.3.0-dev.2
|
||||
isar_community_flutter_libs: ^3.3.0-dev.2
|
||||
|
||||
@@ -63,7 +63,7 @@ dependencies:
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
freezed: ^3.2.0
|
||||
freezed: ^3.2.3
|
||||
build_runner: ^2.7.1
|
||||
flutter_lints: ^6.0.0
|
||||
json_serializable: ^6.11.1
|
||||
|
||||
Reference in New Issue
Block a user