62 lines
2.2 KiB
Dart
62 lines
2.2 KiB
Dart
/*
|
|
* 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:fading_scroll/fading_scroll.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:weblibre/features/settings/presentation/widgets/toolbar_layout_content.dart';
|
|
import 'package:weblibre/features/settings/presentation/widgets/toolbar_preview.dart';
|
|
import 'package:weblibre/features/user/domain/repositories/general_settings.dart';
|
|
|
|
class ToolbarLayoutSettingsScreen extends HookConsumerWidget {
|
|
const ToolbarLayoutSettingsScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final settings = ref.watch(generalSettingsWithDefaultsProvider);
|
|
|
|
return Scaffold(
|
|
appBar: AppBar(title: const Text('Toolbar & Layout')),
|
|
body: SafeArea(
|
|
child: FadingScroll(
|
|
fadingSize: 25,
|
|
builder: (context, controller) {
|
|
return CustomScrollView(
|
|
controller: controller,
|
|
slivers: [
|
|
SliverPersistentHeader(
|
|
pinned: true,
|
|
delegate: TabBarPreviewHeaderDelegate(
|
|
settings: settings,
|
|
compact: true,
|
|
),
|
|
),
|
|
const SliverPadding(
|
|
padding: EdgeInsets.symmetric(horizontal: 12.0),
|
|
sliver: SliverToBoxAdapter(child: ToolbarLayoutContent()),
|
|
),
|
|
],
|
|
);
|
|
},
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|