Skip to main content
Infidec Marketplace logo
v1.0.0

Type to search pages and sections, e.g. “razorpay”, “package name”, “SHA”.

Search, Categories & Nearby

How users find ads in the app with the search screen and its filters, the category list and category pages, saved searches and the Nearby Ads screen.

Search
Search with filters
Categories
All categories
Category
Category page
Nearby
Nearby Ads

All these screens are open to guests. They read the categories you manage in Ads Listing → Categories (Categories) and only list approved ads.

Route /search, file lib/features/ads/screens/search_screen.dart. It opens from the search bar on Home (empty query) or from a category's All in … row (with category_slug).

ElementBehaviour
Search field (app bar)Search…. Press the keyboard's search key to run the query
Filter icon (tune)Opens the Filters sheet
ResultsGrid of ad cards. Empty result: No listings found

Each search calls GET /ads with up to 30 results (per_page=30):

ParameterFrom
qThe search text. The API matches all words against the title and description
category_slugSet when the search was opened from a category
conditionFilter sheet
price_min, price_maxFilter sheet, in normal currency units (the API converts to minor units)
sortFilter sheet

Filters sheet

GroupOptions
Sort byRelevance, Newest, Price ↑ (price_asc), Price ↓ (price_desc), Most viewed (most_viewed)
ConditionAny, new, used, refurbished
PriceMin price, Max price

Apply filters closes the sheet and runs the search again. Relevance and Newest both use the API's default order: featured ads first, then the newest.

Categories

All categories

Route /categories, opened by View all next to Popular Categories on Home. It shows the root categories from GET /home with their icons. Tap a category to open it. If there are none: No categories yet.

Category page

Route /category/:slug, file lib/features/ads/screens/category_screen.dart. It loads GET /categories/:slug:

Category typeWhat the page shows
Has subcategoriesA breadcrumb, an All in … (for example All in Vehicles) row (opens Search filtered by that category) and one row per subcategory
Leaf (no subcategories)A breadcrumb and a grid of the category's ads (GET /ads?category_slug=…&per_page=30). Empty: No listings in this category yet

The breadcrumb's home link returns to Home.

Saved searches

Profile → Saved Searches (/saved-searches, login required) lists the searches saved by the user with GET /saved-searches. Each row shows the name and the stored filters.

ActionResult
Search iconOpens the search screen with the saved keyword (q)
Delete iconDELETE /saved-searches/:id

The app can list and delete saved searches, but it has no button to create one. Users save searches on the website.

Nearby Ads

Route /nearby, opened from the location card at the top of Home.

ElementBehaviour
Location iconFilled when the phone's position is used, crossed out when the fallback point is used
Within N km slider5–200 km in 5 km steps, default 25 km. The search runs when you release the slider
ResultsGrid of ad cards with a distance badge (for example 3.4 km). Empty: No ads nearby

It calls GET /ads/nearby with latitude, longitude and radius. Only ads that have coordinates can appear. When the position cannot be read (permission denied, GPS off) the screen searches around a fixed point and says "Location unavailable — showing results around Mumbai." Change the fallback in nearby_screen.dart (Google Maps & Location).

Next: Ad Details, Favorites & Sharing →

Something unclear or out of date? Tell us. contact@infidec.com