Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix jmap request to server is called when query string is empty in quick search web #3276

Merged
merged 4 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions contact/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.10.1"
debounce_throttle:
dependency: transitive
description:
name: debounce_throttle
sha256: c95cf47afda975fc507794a52040a16756fb2f31ad3027d4e691c41862ff5692
url: "https://pub.dev"
source: hosted
version: "2.0.0"
device_info_plus:
dependency: transitive
description:
Expand Down Expand Up @@ -1017,6 +1025,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.4"
simple_observable:
dependency: transitive
description:
name: simple_observable
sha256: b392795c48f8b5f301b4c8f73e15f56e38fe70f42278c649d8325e859a783301
url: "https://pub.dev"
source: hosted
version: "2.0.0"
sky_engine:
dependency: transitive
description: flutter
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import 'dart:async';

import 'package:core/presentation/views/quick_search/quick_search_suggestion_list.dart';
import 'package:core/utils/platform_info.dart';
import 'package:flutter/material.dart';

typedef SuggestionsCallback<T> = FutureOr<List<T>> Function(String pattern);

typedef FetchRecentActionCallback<R> = FutureOr<List<R>> Function(
String pattern,
);

typedef ItemBuilder<T> = Widget Function(BuildContext context, T itemData);

typedef SuggestionSelectionCallback<T> = void Function(T suggestion);

typedef RecentSelectionCallback<R> = void Function(R recent);

typedef ErrorBuilder = Widget Function(BuildContext context, Object? error);

typedef ButtonActionBuilder = Widget Function(
BuildContext context,
dynamic action,
QuickSearchSuggestionListState suggestionsListState,
);

typedef ButtonActionCallback = void Function(dynamic action);

typedef AnimationTransitionBuilder = Widget Function(
BuildContext context,
Widget child,
AnimationController? controller,
);

final supportedPlatform =
(PlatformInfo.isWeb || PlatformInfo.isAndroid || PlatformInfo.isIOS);
Loading
Loading