dart format

This commit is contained in:
Fabian Freund
2026-02-22 18:55:47 +01:00
parent ac80632eeb
commit 3094f68607
15 changed files with 55 additions and 84 deletions
@@ -64,9 +64,7 @@ class BrowserFab extends HookConsumerWidget {
heroTag: 'dock_fab',
onPressed: () {
ref
.read(
toolbarVisibilityControllerProvider(selectedTabId).notifier,
)
.read(toolbarVisibilityControllerProvider(selectedTabId).notifier)
.forceShow();
},
child: const Icon(MdiIcons.dockBottom),
@@ -68,7 +68,8 @@ class BrowserView extends StatefulHookConsumerWidget {
final Future<void> Function()? postInitializationStep;
final StreamSink<Offset>? pointerMoveEventSink;
const BrowserView({super.key,
const BrowserView({
super.key,
this.screenshotPeriod = const Duration(seconds: 10),
this.suggestionTimeout = const Duration(seconds: 30),
this.postInitializationStep,
@@ -52,7 +52,8 @@ class ViewTabSheetWidget extends HookConsumerWidget {
final double bottomAppBarHeight;
final ValueChanged<bool>? onClearSiteDataExpandedChanged;
const ViewTabSheetWidget({super.key,
const ViewTabSheetWidget({
super.key,
required this.initialTabState,
required this.sheetScrollController,
required this.draggableScrollableController,
@@ -70,15 +70,9 @@ bool isManifestInstallable(PwaManifest manifest) {
_validDisplayModes.contains(manifest.display!.toLowerCase());
// Check that start_url is within scope
final isInScope = _isStartUrlInScope(
manifest.startUrl,
manifest.scope,
);
final isInScope = _isStartUrlInScope(manifest.startUrl, manifest.scope);
return hasValidName &&
hasValidStartUrl &&
hasValidDisplay &&
isInScope;
return hasValidName && hasValidStartUrl && hasValidDisplay && isInScope;
}
/// Returns true if two URLs share the same origin (scheme + host + port).
@@ -120,10 +114,12 @@ bool _isStartUrlInScope(String startUrl, String? scope) {
// Path containment: scope path must be a prefix of start_url path
// on a `/` boundary to avoid "/app" matching "/application"
final scopePath =
scopeUri.path.endsWith('/') ? scopeUri.path : '${scopeUri.path}/';
final startPath =
startUri.path.endsWith('/') ? startUri.path : '${startUri.path}/';
final scopePath = scopeUri.path.endsWith('/')
? scopeUri.path
: '${scopeUri.path}/';
final startPath = startUri.path.endsWith('/')
? startUri.path
: '${startUri.path}/';
return startPath.startsWith(scopePath) || startUri.path == scopeUri.path;
} catch (e) {
@@ -59,7 +59,8 @@ class SearchScreen extends HookConsumerWidget {
/// When null, a new tab will be created.
final String? tabId;
const SearchScreen({super.key,
const SearchScreen({
super.key,
required this.initialSearchText,
required this.tabType,
this.launchedFromIntent = false,
@@ -178,7 +178,8 @@ class ContainerChips extends HookConsumerWidget {
final ValueListenable<TextEditingValue>? searchTextListenable;
const ContainerChips({super.key,
const ContainerChips({
super.key,
required this.selectedContainer,
required this.onSelected,
required this.onDeleted,
@@ -4,11 +4,7 @@ import 'package:flutter_mozilla_components/flutter_mozilla_components.dart';
part 'sync_repository_state.g.dart';
enum SyncEvent {
started,
completed,
error;
}
enum SyncEvent { started, completed, error }
@CopyWith()
class SyncRepositoryState with FastEquatable {
@@ -29,6 +25,12 @@ class SyncRepositoryState with FastEquatable {
});
@override
List<Object?> get hashParameters =>
[account, remoteTabs, devices, deviceName, lastSyncEvent, lastSyncError];
List<Object?> get hashParameters => [
account,
remoteTabs,
devices,
deviceName,
lastSyncEvent,
lastSyncError,
];
}
@@ -148,9 +148,7 @@ class UserBackupService extends _$UserBackupService {
outputDirectory,
);
if (existingProfile == null) {
throw Exception(
'Backup does not contain valid profile metadata',
);
throw Exception('Backup does not contain valid profile metadata');
}
if (existingProfile.uuidValue == filesystem.selectedProfile) {
@@ -159,9 +157,7 @@ class UserBackupService extends _$UserBackupService {
);
}
final profileDir = filesystem.getProfileDir(
existingProfile.uuidValue,
);
final profileDir = filesystem.getProfileDir(existingProfile.uuidValue);
if (await profileDir.exists()) {
final result = await confirmOverrideCallback();
@@ -25,7 +25,8 @@ import 'package:weblibre/features/web_feed/data/models/feed_author.dart';
class AuthorsHorizontalList extends StatelessWidget {
late final List<Widget> _authors;
AuthorsHorizontalList({super.key,
AuthorsHorizontalList({
super.key,
required List<FeedAuthor> authors,
Set<String> selectedTags = const {},
void Function(String tagId, bool value)? onTagSelected,
@@ -25,7 +25,8 @@ import 'package:weblibre/features/web_feed/data/models/feed_category.dart';
class TagsHorizontalList extends StatelessWidget {
late final List<Widget> _tags;
TagsHorizontalList({super.key,
TagsHorizontalList({
super.key,
required List<FeedCategory> tags,
Set<String> selectedTags = const {},
void Function(String tagId, bool value)? onTagSelected,