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,50 @@
/*
* 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/geckoview/features/browser/domain/entities/sheet.dart';
part 'bottom_sheet.g.dart';
@Riverpod(keepAlive: true)
class BottomSheetController extends _$BottomSheetController {
@override
Sheet? build() {
return null;
}
///We depend on a listener that updates/syncs UI to open the sheet
// ignore: use_setters_to_change_properties api decision
void show(Sheet sheet) {
state = sheet;
}
///We depend on a listener that updates/syncs UI to close the sheet
void requestDismiss() {
state = null;
}
///This is called by UI when the sheet gets closed
void closed(Sheet sheet) {
if (sheet == stateOrNull) {
state = null;
}
}
}
@@ -0,0 +1,63 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'bottom_sheet.dart';
// **************************************************************************
// RiverpodGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
@ProviderFor(BottomSheetController)
final bottomSheetControllerProvider = BottomSheetControllerProvider._();
final class BottomSheetControllerProvider
extends $NotifierProvider<BottomSheetController, Sheet?> {
BottomSheetControllerProvider._()
: super(
from: null,
argument: null,
retry: null,
name: r'bottomSheetControllerProvider',
isAutoDispose: false,
dependencies: null,
$allTransitiveDependencies: null,
);
@override
String debugGetCreateSourceHash() => _$bottomSheetControllerHash();
@$internal
@override
BottomSheetController create() => BottomSheetController();
/// {@macro riverpod.override_with_value}
Override overrideWithValue(Sheet? value) {
return $ProviderOverride(
origin: this,
providerOverride: $SyncValueProvider<Sheet?>(value),
);
}
}
String _$bottomSheetControllerHash() =>
r'54112ccef72ad7777c746b9f2dc02da1e383c127';
abstract class _$BottomSheetController extends $Notifier<Sheet?> {
Sheet? build();
@$mustCallSuper
@override
void runBuild() {
final ref = this.ref as $Ref<Sheet?, Sheet?>;
final element =
ref.element
as $ClassProviderElement<
AnyNotifier<Sheet?, Sheet?>,
Sheet?,
Object?,
Object?
>;
element.handleCreate(ref, build);
}
}
@@ -0,0 +1,40 @@
/*
* 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:flutter/widgets.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
part 'overlay.g.dart';
@Riverpod(keepAlive: true)
class OverlayController extends _$OverlayController {
@override
WidgetBuilder? build() {
return null;
}
// ignore: use_setters_to_change_properties api decision
void show(WidgetBuilder builder) {
state = builder;
}
void dismiss() {
state = null;
}
}
@@ -0,0 +1,62 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'overlay.dart';
// **************************************************************************
// RiverpodGenerator
// **************************************************************************
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
@ProviderFor(OverlayController)
final overlayControllerProvider = OverlayControllerProvider._();
final class OverlayControllerProvider
extends $NotifierProvider<OverlayController, WidgetBuilder?> {
OverlayControllerProvider._()
: super(
from: null,
argument: null,
retry: null,
name: r'overlayControllerProvider',
isAutoDispose: false,
dependencies: null,
$allTransitiveDependencies: null,
);
@override
String debugGetCreateSourceHash() => _$overlayControllerHash();
@$internal
@override
OverlayController create() => OverlayController();
/// {@macro riverpod.override_with_value}
Override overrideWithValue(WidgetBuilder? value) {
return $ProviderOverride(
origin: this,
providerOverride: $SyncValueProvider<WidgetBuilder?>(value),
);
}
}
String _$overlayControllerHash() => r'd0cd7c4cf867397f10f801ec2f7733be56520fb3';
abstract class _$OverlayController extends $Notifier<WidgetBuilder?> {
WidgetBuilder? build();
@$mustCallSuper
@override
void runBuild() {
final ref = this.ref as $Ref<WidgetBuilder?, WidgetBuilder?>;
final element =
ref.element
as $ClassProviderElement<
AnyNotifier<WidgetBuilder?, WidgetBuilder?>,
WidgetBuilder?,
Object?,
Object?
>;
element.handleCreate(ref, build);
}
}