Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/futureware-tech/si…
Browse files Browse the repository at this point in the history
…mulator-action-bde6805eedaeaba7775a9959970edc7d8bf10c4d
  • Loading branch information
nilsreichardt authored Dec 29, 2024
2 parents f0b3a27 + 67694c4 commit 741852c
Show file tree
Hide file tree
Showing 171 changed files with 1,240 additions and 76 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down Expand Up @@ -291,7 +291,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down Expand Up @@ -240,7 +240,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cli_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/console_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integration_tests_app_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down Expand Up @@ -310,7 +310,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/licence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/safe_app_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/safe_console_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/safe_website_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down Expand Up @@ -242,7 +242,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unsafe_app_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unsafe_console_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unsafe_website_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/website_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
id: fvm-config-action
uses: kuhnroyal/flutter-fvm-config-action@60c14af316b09f8819202d845391260cf3b979c9

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ coverage/
.vscode/*
!.vscode/launch.json
!.vscode/settings.json
!.vscode/tasks.json

# FVM will create a relative symlink in your project from .fvm/versions/ to
# the cache of the selected version. We should add this to our .gitignore.
Expand Down
22 changes: 22 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
// This task generates the l10n files for the
// sharezone_localizations.
//
// FVM is required to run this task.
"label": "Generate l10n for sharezone_localizations",
"type": "shell",
// Additionally, we add the license header again (the "flutter
// gen-l10n" always removes the license header).
"command": "fvm flutter gen-l10n && addlicense -c \"Sharezone UG (haftungsbeschränkt)\" -f ../../header_template.txt .",
"options": {
"cwd": "${workspaceFolder}/lib/sharezone_localizations"
},
"problemMatcher": []
}
]
}
20 changes: 20 additions & 0 deletions app/lib/activation_code/src/bloc/enter_activation_code_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import 'package:flutter/material.dart';
import 'package:key_value_store/key_value_store.dart';
import 'package:rxdart/rxdart.dart';
import 'package:helper_functions/helper_functions.dart';
import 'package:sharezone/l10n/feature_flag_l10n.dart';

import '../models/enter_activation_code_result.dart';
import 'enter_activation_code_activator.dart';
Expand All @@ -26,6 +27,7 @@ class EnterActivationCodeBloc extends BlocBase {
final _enterActivationCodeSubject =
BehaviorSubject<EnterActivationCodeResult>();
final KeyValueStore keyValueStore;
final FeatureFlagl10n featureFlagl10n;

String? _lastEnteredValue;

Expand All @@ -34,6 +36,7 @@ class EnterActivationCodeBloc extends BlocBase {
this.crashAnalytics,
this.appFunctions,
this.keyValueStore,
this.featureFlagl10n,
) {
_changeEnterActivationCodeResult(NoDataEnterActivationCodeResult());
}
Expand Down Expand Up @@ -89,6 +92,11 @@ class EnterActivationCodeBloc extends BlocBase {
return;
}

if (_lastEnteredValue?.trim().toLowerCase() == 'l10n') {
_togglel10nFeatureFlag();
return;
}

_changeEnterActivationCodeResult(LoadingEnterActivationCodeResult());

final enterActivationCodeResult = await _runAppFunction(enteredValue);
Expand All @@ -107,6 +115,18 @@ class EnterActivationCodeBloc extends BlocBase {
);
}

void _togglel10nFeatureFlag() {
final currentValue = featureFlagl10n.isl10nEnabled;
featureFlagl10n.toggle();

_changeEnterActivationCodeResult(
SuccessfulEnterActivationCodeResult(
'l10n',
'l10n wurde ${!currentValue ? 'aktiviert' : 'deaktiviert'}. Starte die App neu, um die Änderungen zu sehen.',
),
);
}

Future<void> _clearCache(BuildContext context) async {
await Future.wait([
keyValueStore.clear(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@ import 'package:bloc_base/bloc_base.dart';
import 'package:crash_analytics/crash_analytics.dart';
import 'package:key_value_store/key_value_store.dart';
import 'package:sharezone/activation_code/src/bloc/enter_activation_code_bloc.dart';
import 'package:sharezone/l10n/feature_flag_l10n.dart';

class EnterActivationCodeBlocFactory extends BlocBase {
final CrashAnalytics crashAnalytics;
final Analytics analytics;
final SharezoneAppFunctions appFunctions;
final KeyValueStore keyValueStore;
final FeatureFlagl10n featureFlagl10n;

EnterActivationCodeBlocFactory({
required this.analytics,
required this.crashAnalytics,
required this.appFunctions,
required this.keyValueStore,
required this.featureFlagl10n,
});

EnterActivationCodeBloc createBloc() {
Expand All @@ -32,6 +35,7 @@ class EnterActivationCodeBlocFactory extends BlocBase {
crashAnalytics,
appFunctions,
keyValueStore,
featureFlagl10n,
);
}

Expand Down
Loading

0 comments on commit 741852c

Please sign in to comment.