prepare for multiple apps

This commit is contained in:
Fabian Freund
2026-04-06 12:23:11 +02:00
parent bd1600e8dc
commit 5afc323f04
904 changed files with 29 additions and 29 deletions
@@ -0,0 +1,21 @@
/*
* Copyright (c) 2024-2026 Fabian Freund.
*
* This file is part of WebLibre
* (see https://weblibre.eu).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
enum OnboardingMode { express, detailed }
@@ -0,0 +1,45 @@
/*
* Copyright (c) 2024-2026 Fabian Freund.
*
* This file is part of WebLibre
* (see https://weblibre.eu).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:weblibre/features/onboarding/domain/entities/onboarding_mode.dart';
part 'providers.g.dart';
@Riverpod()
class OnboardingModeNotifier extends _$OnboardingModeNotifier {
@override
OnboardingMode build() => OnboardingMode.detailed;
// ignore: use_setters_to_change_properties
void select(OnboardingMode mode) {
state = mode;
}
}
@Riverpod()
class EulaAcceptedNotifier extends _$EulaAcceptedNotifier {
@override
bool build() => false;
// ignore: use_setters_to_change_properties
void accept(bool value) {
state = value;
}
}
@@ -0,0 +1,116 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'providers.dart';
// **************************************************************************
// RiverpodGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
@ProviderFor(OnboardingModeNotifier)
final onboardingModeProvider = OnboardingModeNotifierProvider._();
final class OnboardingModeNotifierProvider
extends $NotifierProvider<OnboardingModeNotifier, OnboardingMode> {
OnboardingModeNotifierProvider._()
: super(
from: null,
argument: null,
retry: null,
name: r'onboardingModeProvider',
isAutoDispose: true,
dependencies: null,
$allTransitiveDependencies: null,
);
@override
String debugGetCreateSourceHash() => _$onboardingModeNotifierHash();
@$internal
@override
OnboardingModeNotifier create() => OnboardingModeNotifier();
/// {@macro riverpod.override_with_value}
Override overrideWithValue(OnboardingMode value) {
return $ProviderOverride(
origin: this,
providerOverride: $SyncValueProvider<OnboardingMode>(value),
);
}
}
String _$onboardingModeNotifierHash() =>
r'84cd9a7436fd4ac20972c25ed015c1c6b20f5a00';
abstract class _$OnboardingModeNotifier extends $Notifier<OnboardingMode> {
OnboardingMode build();
@$mustCallSuper
@override
void runBuild() {
final ref = this.ref as $Ref<OnboardingMode, OnboardingMode>;
final element =
ref.element
as $ClassProviderElement<
AnyNotifier<OnboardingMode, OnboardingMode>,
OnboardingMode,
Object?,
Object?
>;
element.handleCreate(ref, build);
}
}
@ProviderFor(EulaAcceptedNotifier)
final eulaAcceptedProvider = EulaAcceptedNotifierProvider._();
final class EulaAcceptedNotifierProvider
extends $NotifierProvider<EulaAcceptedNotifier, bool> {
EulaAcceptedNotifierProvider._()
: super(
from: null,
argument: null,
retry: null,
name: r'eulaAcceptedProvider',
isAutoDispose: true,
dependencies: null,
$allTransitiveDependencies: null,
);
@override
String debugGetCreateSourceHash() => _$eulaAcceptedNotifierHash();
@$internal
@override
EulaAcceptedNotifier create() => EulaAcceptedNotifier();
/// {@macro riverpod.override_with_value}
Override overrideWithValue(bool value) {
return $ProviderOverride(
origin: this,
providerOverride: $SyncValueProvider<bool>(value),
);
}
}
String _$eulaAcceptedNotifierHash() =>
r'dafd708ac5cb586e8ca9cccc6d708598c5daab0e';
abstract class _$EulaAcceptedNotifier extends $Notifier<bool> {
bool build();
@$mustCallSuper
@override
void runBuild() {
final ref = this.ref as $Ref<bool, bool>;
final element =
ref.element
as $ClassProviderElement<
AnyNotifier<bool, bool>,
bool,
Object?,
Object?
>;
element.handleCreate(ref, build);
}
}