From 77ef22204e3f3d6e3e1016f7e2d7d1222225765d Mon Sep 17 00:00:00 2001 From: Guy Luz Date: Tue, 28 May 2024 15:00:33 +0300 Subject: [PATCH] Small changes for new version --- codemagic.yaml | 7 --- lib/domain/preferences_controller.dart | 62 ------------------- .../preferences_repository.dart | 4 +- lib/infrastructure/vibration_repository.dart | 4 +- lib/presentation/atoms/button_atom.dart | 3 - 5 files changed, 2 insertions(+), 78 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 8367510..ad19112 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -1,6 +1,5 @@ workflows: android-workflow: - instance_type: linux triggering: events: - push @@ -77,13 +76,7 @@ workflows: publishing: app_store_connect: - # Use referenced App Store Connect API key to authenticate binary upload auth: integration - - # Whether or not to submit the uploaded - # build to App Store review. submit_to_app_store: true - cancel_previous_submissions: true - release_type: AFTER_APPROVAL diff --git a/lib/domain/preferences_controller.dart b/lib/domain/preferences_controller.dart index e7bda66..2aead91 100644 --- a/lib/domain/preferences_controller.dart +++ b/lib/domain/preferences_controller.dart @@ -16,65 +16,3 @@ abstract class PreferencesController { void setString(String key, String value); } - -// class PreferencesController extends PreferencesController { -// late SharedPreferences preferences; -// -// init() async { -// preferences = await SharedPreferences.getInstance(); -// PreferencesController.instance = this; -// } -// -// @override -// String? getString(String key) { -// return preferences.getString(key); -// } -// -// @override -// bool? getBool(String key) { -// return preferences.getBool(key); -// } -// -// @override -// int? getInt(String key) { -// try { -// return preferences.getInt(key); -// } catch (e) { -// return null; -// } -// } -// -// @override -// Iterable? getIntIterator(String key) { -// try { -// return preferences.getStringList(key)?.map((e) => int.parse(e)); -// } catch (e) { -// return null; -// } -// } -// -// @override -// void remove(String key) { -// preferences.remove(key); -// } -// -// @override -// void setString(String key, String value) { -// preferences.setString(key, value); -// } -// -// @override -// void setBool(String key, bool value) { -// preferences.setBool(key, value); -// } -// -// @override -// void setInt(String key, int value) { -// preferences.setInt(key, value); -// } -// -// @override -// void setIntIterator(String key, Iterable value) { -// preferences.setStringList(key, List.from(value.map((e) => e.toString()))); -// } -// } diff --git a/lib/infrastructure/preferences_repository.dart b/lib/infrastructure/preferences_repository.dart index ebcadbb..ce69b68 100644 --- a/lib/infrastructure/preferences_repository.dart +++ b/lib/infrastructure/preferences_repository.dart @@ -4,9 +4,7 @@ class _PreferencesRepository extends PreferencesController { late SharedPreferences preferences; @override - Future init() async { - preferences = await SharedPreferences.getInstance(); - } + Future init() async => preferences = await SharedPreferences.getInstance(); @override String? getString(String key) => preferences.getString(key); diff --git a/lib/infrastructure/vibration_repository.dart b/lib/infrastructure/vibration_repository.dart index dc49690..fc9ad73 100644 --- a/lib/infrastructure/vibration_repository.dart +++ b/lib/infrastructure/vibration_repository.dart @@ -2,9 +2,7 @@ part of 'package:infinite_horizons/domain/vibration_controller.dart'; class _VibrationRepository extends VibrationController { @override - Future init() async { - canVibrate = Platform.isAndroid || Platform.isIOS; - } + Future init() async => canVibrate = Platform.isAndroid || Platform.isIOS; late bool canVibrate; diff --git a/lib/presentation/atoms/button_atom.dart b/lib/presentation/atoms/button_atom.dart index d7ba61f..c279faf 100644 --- a/lib/presentation/atoms/button_atom.dart +++ b/lib/presentation/atoms/button_atom.dart @@ -153,7 +153,4 @@ enum ButtonVariant { /// No borders iconButton, - // action, - // actionToggled, - // back, }