remove unused provider

This commit is contained in:
Fabian Freund
2025-10-03 07:06:13 +02:00
parent 1716219055
commit 6421901505
3 changed files with 0 additions and 75 deletions
@@ -17,10 +17,8 @@
* 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 'dart:async';
import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:rxdart/rxdart.dart';
import 'package:weblibre/features/geckoview/features/browser/domain/entities/sheet.dart';
part 'bottom_sheet.g.dart';
@@ -41,27 +39,3 @@ class BottomSheetController extends _$BottomSheetController {
state = null;
}
}
@Riverpod()
class BottomSheetExtend extends _$BottomSheetExtend {
late StreamController<double> _extentStreamController;
void add(double extent) {
if (!_extentStreamController.isClosed) {
_extentStreamController.add(extent);
}
}
@override
Stream<double> build() {
_extentStreamController = StreamController();
ref.onDispose(() async {
await _extentStreamController.close();
});
return _extentStreamController.stream.sampleTime(
const Duration(milliseconds: 50),
);
}
}
@@ -62,48 +62,3 @@ abstract class _$BottomSheetController extends $Notifier<Sheet?> {
element.handleValue(ref, created);
}
}
@ProviderFor(BottomSheetExtend)
const bottomSheetExtendProvider = BottomSheetExtendProvider._();
final class BottomSheetExtendProvider
extends $StreamNotifierProvider<BottomSheetExtend, double> {
const BottomSheetExtendProvider._()
: super(
from: null,
argument: null,
retry: null,
name: r'bottomSheetExtendProvider',
isAutoDispose: true,
dependencies: null,
$allTransitiveDependencies: null,
);
@override
String debugGetCreateSourceHash() => _$bottomSheetExtendHash();
@$internal
@override
BottomSheetExtend create() => BottomSheetExtend();
}
String _$bottomSheetExtendHash() => r'fbefffbad011502d7ed6ec3bd2fdcdb03995f149';
abstract class _$BottomSheetExtend extends $StreamNotifier<double> {
Stream<double> build();
@$mustCallSuper
@override
void runBuild() {
final created = build();
final ref = this.ref as $Ref<AsyncValue<double>, double>;
final element =
ref.element
as $ClassProviderElement<
AnyNotifier<AsyncValue<double>, double>,
AsyncValue<double>,
Object?,
Object?
>;
element.handleValue(ref, created);
}
}
@@ -400,10 +400,6 @@ class BrowserScreen extends HookConsumerWidget {
.read(bottomSheetControllerProvider.notifier)
.dismiss();
return true;
} else {
ref
.read(bottomSheetExtendProvider.notifier)
.add(notification.extent);
}
return false;