tab trees

This commit is contained in:
Fabian Freund
2025-06-23 19:43:36 +02:00
parent 8445b768f0
commit 4f682744da
28 changed files with 2687 additions and 2256 deletions
@@ -16,6 +16,8 @@ class TabState extends WebPageInfo {
@CopyWithField(immutable: true)
final String id;
final String? parentId;
final String? contextId;
@override
@@ -47,6 +49,7 @@ class TabState extends WebPageInfo {
TabState({
required this.id,
required this.parentId,
required this.contextId,
required super.url,
required String title,
@@ -64,6 +67,7 @@ class TabState extends WebPageInfo {
factory TabState.$default(String tabId) => TabState(
id: tabId,
parentId: null,
contextId: null,
url: Uri.parse('about:blank'),
title: "",
@@ -83,6 +87,7 @@ class TabState extends WebPageInfo {
List<Object?> get hashParameters => [
...super.hashParameters,
id,
parentId,
contextId,
icon,
thumbnail,
@@ -7,6 +7,8 @@ part of 'tab.dart';
// **************************************************************************
abstract class _$TabStateCWProxy {
TabState parentId(String? parentId);
TabState contextId(String? contextId);
TabState url(Uri url);
@@ -40,6 +42,7 @@ abstract class _$TabStateCWProxy {
/// TabState(...).copyWith(id: 12, name: "My name")
/// ````
TabState call({
String? parentId,
String? contextId,
Uri url,
String title,
@@ -62,6 +65,9 @@ class _$TabStateCWProxyImpl implements _$TabStateCWProxy {
final TabState _value;
@override
TabState parentId(String? parentId) => this(parentId: parentId);
@override
TabState contextId(String? contextId) => this(contextId: contextId);
@@ -113,6 +119,7 @@ class _$TabStateCWProxyImpl implements _$TabStateCWProxy {
/// TabState(...).copyWith(id: 12, name: "My name")
/// ````
TabState call({
Object? parentId = const $CopyWithPlaceholder(),
Object? contextId = const $CopyWithPlaceholder(),
Object? url = const $CopyWithPlaceholder(),
Object? title = const $CopyWithPlaceholder(),
@@ -129,6 +136,10 @@ class _$TabStateCWProxyImpl implements _$TabStateCWProxy {
}) {
return TabState(
id: _value.id,
parentId: parentId == const $CopyWithPlaceholder()
? _value.parentId
// ignore: cast_nullable_to_non_nullable
: parentId as String?,
contextId: contextId == const $CopyWithPlaceholder()
? _value.contextId
// ignore: cast_nullable_to_non_nullable