mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-10-03 16:52:53 +00:00
chore: Upgrade flutter and dependencies
This commit is contained in:
parent
1684d60a54
commit
d3b7f31c65
|
@ -52,8 +52,8 @@ android {
|
|||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "org.selfprivacy.app"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 33
|
||||
compileSdkVersion 33
|
||||
targetSdkVersion 34
|
||||
compileSdkVersion 34
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
|
|
|
@ -24,8 +24,10 @@ abstract class AppThemeFactory {
|
|||
final ColorScheme? dynamicColorsScheme =
|
||||
await _getDynamicColors(brightness);
|
||||
|
||||
final Color? accentColor = await _getAccentColor();
|
||||
|
||||
final ColorScheme fallbackColorScheme = ColorScheme.fromSeed(
|
||||
seedColor: fallbackColor,
|
||||
seedColor: accentColor ?? fallbackColor,
|
||||
brightness: brightness,
|
||||
);
|
||||
|
||||
|
@ -55,6 +57,14 @@ abstract class AppThemeFactory {
|
|||
}
|
||||
}
|
||||
|
||||
static Future<Color?> _getAccentColor() {
|
||||
try {
|
||||
return DynamicColorPlugin.getAccentColor();
|
||||
} on PlatformException {
|
||||
return Future.value(null);
|
||||
}
|
||||
}
|
||||
|
||||
static Future<CorePalette?> getCorePalette() async {
|
||||
try {
|
||||
return await DynamicColorPlugin.getCorePalette();
|
||||
|
|
|
@ -100,7 +100,7 @@ class _RootAppBar extends StatelessWidget {
|
|||
leading: context.router.pageCount > 1
|
||||
? IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () => context.router.pop(),
|
||||
onPressed: () => context.router.maybePop(),
|
||||
)
|
||||
: null,
|
||||
actions: const [
|
||||
|
|
|
@ -35,7 +35,8 @@ class CpuChart extends StatelessWidget {
|
|||
lineTouchData: LineTouchData(
|
||||
enabled: true,
|
||||
touchTooltipData: LineTouchTooltipData(
|
||||
tooltipBgColor: Theme.of(context).colorScheme.surface,
|
||||
getTooltipColor: (final LineBarSpot _) =>
|
||||
Theme.of(context).colorScheme.surface,
|
||||
tooltipPadding: const EdgeInsets.all(8),
|
||||
getTooltipItems: (final List<LineBarSpot> touchedBarSpots) {
|
||||
final List<LineTooltipItem> res = [];
|
||||
|
|
|
@ -38,7 +38,8 @@ class NetworkChart extends StatelessWidget {
|
|||
lineTouchData: LineTouchData(
|
||||
enabled: true,
|
||||
touchTooltipData: LineTouchTooltipData(
|
||||
tooltipBgColor: Theme.of(context).colorScheme.surface,
|
||||
getTooltipColor: (final LineBarSpot _) =>
|
||||
Theme.of(context).colorScheme.surface,
|
||||
tooltipPadding: const EdgeInsets.all(8),
|
||||
getTooltipItems: (final List<LineBarSpot> touchedBarSpots) {
|
||||
final List<LineTooltipItem> res = [];
|
||||
|
|
|
@ -38,7 +38,7 @@ class NewUserPage extends StatelessWidget {
|
|||
return BlocListener<UserFormCubit, FormCubitState>(
|
||||
listener: (final BuildContext context, final FormCubitState state) {
|
||||
if (state.isSubmitted) {
|
||||
context.router.pop();
|
||||
context.router.maybePop();
|
||||
}
|
||||
},
|
||||
child: BrandHeroScreen(
|
||||
|
|
|
@ -103,7 +103,7 @@ class _DeleteUserTile extends StatelessWidget {
|
|||
TextButton(
|
||||
child: Text('basis.cancel'.tr()),
|
||||
onPressed: () {
|
||||
context.router.pop();
|
||||
context.router.maybePop();
|
||||
},
|
||||
),
|
||||
TextButton(
|
||||
|
@ -115,8 +115,8 @@ class _DeleteUserTile extends StatelessWidget {
|
|||
),
|
||||
onPressed: () {
|
||||
context.read<JobsCubit>().addJob(DeleteUserJob(user: user));
|
||||
context.router.childControllers.first.pop();
|
||||
context.router.pop();
|
||||
context.router.childControllers.first.maybePop();
|
||||
context.router.maybePop();
|
||||
},
|
||||
),
|
||||
],
|
||||
|
@ -244,7 +244,7 @@ class _SshKeysCard extends StatelessWidget {
|
|||
publicKey: key,
|
||||
),
|
||||
);
|
||||
context.popRoute();
|
||||
context.maybePop();
|
||||
},
|
||||
),
|
||||
],
|
||||
|
|
444
pubspec.lock
444
pubspec.lock
File diff suppressed because it is too large
Load diff
38
pubspec.yaml
38
pubspec.yaml
|
@ -5,30 +5,29 @@ version: 0.11.0+22
|
|||
|
||||
environment:
|
||||
sdk: '>=3.2.1 <4.0.0'
|
||||
flutter: ">=3.16.1"
|
||||
flutter: ">=3.19.5"
|
||||
|
||||
dependencies:
|
||||
animations: ^2.0.8
|
||||
auto_route: ^7.8.4
|
||||
animations: ^2.0.11
|
||||
auto_route: ^8.0.3
|
||||
auto_size_text: ^3.0.0
|
||||
bloc_concurrency: ^0.2.3
|
||||
bloc_concurrency: ^0.2.5
|
||||
crypt: ^4.3.1
|
||||
collection: ^1.18.0
|
||||
cubit_form: ^2.0.1
|
||||
device_info_plus: ^9.1.1
|
||||
dio: ^5.4.0
|
||||
device_info_plus: ^10.0.1
|
||||
dio: ^5.4.2+1
|
||||
duration: ^3.0.13
|
||||
dynamic_color: ^1.6.8
|
||||
easy_localization: ^3.0.3
|
||||
either_option: ^2.0.1-dev.1
|
||||
dynamic_color: ^1.7.0
|
||||
easy_localization: ^3.0.5
|
||||
equatable: ^2.0.5
|
||||
fl_chart: ^0.65.0
|
||||
fl_chart: ^0.67.0
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_bloc: ^8.1.3
|
||||
flutter_markdown: ^0.6.18+2
|
||||
flutter_bloc: ^8.1.5
|
||||
flutter_markdown: ^0.6.22
|
||||
flutter_secure_storage: ^9.0.0
|
||||
flutter_svg: ^2.0.9
|
||||
flutter_svg: ^2.0.10+1
|
||||
gap: ^3.0.1
|
||||
get_it: ^7.6.4
|
||||
gql: ^1.0.0
|
||||
|
@ -38,12 +37,11 @@ dependencies:
|
|||
hive: ^2.2.3
|
||||
hive_flutter: ^1.1.0
|
||||
http: ^1.1.2
|
||||
intl: ^0.18.0
|
||||
intl: ^0.18.1
|
||||
ionicons: ^0.2.2
|
||||
json_annotation: ^4.8.1
|
||||
local_auth: ^2.1.7
|
||||
material_color_utilities: ^0.5.0
|
||||
modal_bottom_sheet: ^3.0.0-pre
|
||||
material_color_utilities: ^0.8.0
|
||||
modal_bottom_sheet: ^3.0.0
|
||||
nanoid: ^1.0.0
|
||||
package_info: ^2.0.2
|
||||
pretty_dio_logger: ^1.3.1
|
||||
|
@ -55,14 +53,14 @@ dependencies:
|
|||
# wakelock: ^0.6.2
|
||||
|
||||
dev_dependencies:
|
||||
auto_route_generator: ^7.3.2
|
||||
auto_route_generator: ^8.0.0
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
build_runner: ^2.4.7
|
||||
build_runner: ^2.4.9
|
||||
flutter_launcher_icons: ^0.13.1
|
||||
hive_generator: ^2.0.1
|
||||
json_serializable: ^6.7.1
|
||||
flutter_lints: ^3.0.1
|
||||
flutter_lints: ^3.0.2
|
||||
|
||||
flutter_icons:
|
||||
android: "launcher_icon"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
|
||||
#include <dynamic_color/dynamic_color_plugin_c_api.h>
|
||||
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
|
||||
#include <local_auth_windows/local_auth_plugin.h>
|
||||
#include <url_launcher_windows/url_launcher_windows.h>
|
||||
|
||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
|
@ -19,8 +18,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
|||
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
|
||||
FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
|
||||
LocalAuthPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("LocalAuthPlugin"));
|
||||
UrlLauncherWindowsRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
|||
connectivity_plus
|
||||
dynamic_color
|
||||
flutter_secure_storage_windows
|
||||
local_auth_windows
|
||||
url_launcher_windows
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue