MapBox Search Widget

Overview

Pub HitCount Awesome Flutter

About

This package provides some widgets to use in conjunction to mapbox_search library.

Also, it contains an static map image generator 😆 .

Installing

Add the following to your pubspec.yaml file:

dependencies:
  mapbox_search_flutter: any

Example

MapBoxPlaceSearchWidget(
        popOnSelect: true,
        apiKey: "API KEY",
        limit: 10,
        searchHint: 'Your Hint here',
        onSelected: (place) {},
        context: context,
    )

Screenshots

Search Widget

Demo

Demo

Comments
  • Issues with your example

    Issues with your example

    Hello, I'm encuntering issues when trying your library

    In your example : https://pub.dev/packages/mapbox_search_flutter/example

    • MapBoxStaticImage can't be defined
    • There is Error messages in 'MapBoxPlaceSearchWidget'.

    Error: The getter 'country' isn't defined for the class 'MapBoxPlaceSearchWidget'. Error: The getter 'location' isn't defined for the class 'MapBoxPlaceSearchWidget'.

    I've imported both libraries

    mapbox_search_flutter: ^1.0.6 mapbox_search: ^2.0.1+1

    opened by AdinhLux 4
  • Font size grows too large in MapBoxPlaceSearchWidget

    Font size grows too large in MapBoxPlaceSearchWidget

    The font size in this widget is dependent on the screen width as we can see in the following code. This cause the font to grow so large that its heigth overflows the edit text on web browsers.

    Here is the code cause the problem:

    `child: TextField(

              decoration: _inputStyle(),
    
              controller: _textEditingController,
    
              style: TextStyle(
    
                fontSize: MediaQuery.of(context).size.width * 0.04,
    
              ),`
    

    Maybe set a maximum fontsize, or do not overwrite the Theme fontsize.

    bug 
    opened by gseront 4
  • mapbox_search dependecy

    mapbox_search dependecy

    Is this plugin (mapbox_search_flutter) dependent on the other plugin (mapbox_search) or it is enough in terms of getting search datas and its geocoords for map placement

    opened by mtgperales 2
  • The following NoSuchMethodError was thrown while finalizing the widget tree: The method 'cancel' was called on null.

    The following NoSuchMethodError was thrown while finalizing the widget tree: The method 'cancel' was called on null.

    Hey, I found an issue which exist when I'm opening a separate window with search_bar, don't search for anything and close the page with Navigator.pop(context);

    ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
    The following NoSuchMethodError was thrown while finalizing the widget tree:
    The method 'cancel' was called on null.
    Receiver: null
    Tried calling: cancel()
    
    When the exception was thrown, this was the stack: 
    #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
    #1      _MapBoxPlaceSearchWidgetState.dispose (package:mapbox_search_flutter/src/map_box_place_search_widget.dart:106:20)
    #2      StatefulElement.unmount (package:flutter/src/widgets/framework.dart:4738:12)
    #3      _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1927:13)
    #4      _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1925:7)
    ...
    ═════════════════════════════════════════════════════════════
    
    
    opened by devzom 2
  • _MapBoxPlaceSearchWidgetState.dispose

    _MapBoxPlaceSearchWidgetState.dispose

    Hey, there is a issue with canceling rebuiliding.

    ════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
    The following NoSuchMethodError was thrown while finalizing the widget tree:
    The method 'cancel' was called on null.
    Receiver: null
    Tried calling: cancel()
    
    When the exception was thrown, this was the stack: 
    #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
    #1      _MapBoxPlaceSearchWidgetState.dispose (package:mapbox_search_flutter/src/map_box_place_search_widget.dart:106:20)
    #2      StatefulElement.unmount (package:flutter/src/widgets/framework.dart:4733:12)
    #3      _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1922:13)
    #4      _InactiveElements._unmount.<anonymous closure> (package:flutter/src/widgets/framework.dart:1920:7)
    ...
    ════════════════════════════════════════════════════════════════════════════════════════════════════
    
    
    opened by devzom 2
  • Widget _searchInput returns a future inside setstate

    Widget _searchInput returns a future inside setstate

    in file map_box_place_search_widget.dart line 170 it calls setState(() => _autocompletePlace(value));

    _autocompletePlace is a async function so it complains during runtime that a Future is returned during setState.

    opened by EsbenSoeltoft 2
  • map_box_place_search_widget: Do not call on null

    map_box_place_search_widget: Do not call on null

    _debounceTimer has the value null when the search bar was not clicked. When you call Navigator.of(context).pop() (for example with a BackButton on an AppBar) and the dispose() function tries to cancel the timer, it will show an error in the logs.

    opened by dariotrombello 0
  • AnimationControlled must be disposed

    AnimationControlled must be disposed

    _MapBoxPlaceSearchWidgetState created a Ticker via its SingleTickerProviderStateMixin, but at the time dispose() was called on the mixin, that Ticker was still active. The Ticker must be disposed before calling super.dispose().

    Tickers used by AnimationControllers should be disposed by calling dispose() on the AnimationController itself. Otherwise, the ticker will leak.

    opened by pMertDogan 0
  • Many things!

    Many things!

    • Added back the sample
    • Fixed some naming conventions for dart files.
    • Added a 750ms debounce time to the map_box_place_search_widget to prevent multiple unnecessary calls.
    opened by shinayser 0
  • MapBoxPlaceSearchWidget doesn't have the limit attribute

    MapBoxPlaceSearchWidget doesn't have the limit attribute

    I'm currently using mapbox_search_flutter: ^1.0.6+1 but the limit attribute is still missing even though it should be there according to the documentation.

    limit_missing .

    opened by juliaguilar 0
  • Configure Renovate

    Configure Renovate

    WhiteSource Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    :vertical_traffic_light: To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • .devcontainer/Dockerfile (dockerfile)
    • .github/workflows/dart.yml (github-actions)
    • example/android/gradle/wrapper/gradle-wrapper.properties (gradle-wrapper)
    • example/pubspec.yaml (pub)
    • pubspec.yaml (pub)

    Configuration Summary

    Based on the default config's presets, Renovate will:

    • Start dependency updates only once this onboarding PR is merged
    • Separate major versions of dependencies into individual branches/PRs
    • Do not separate patch and minor upgrades into separate PRs for the same dependency
    • Upgrade to unstable versions only if the existing version is unstable
    • Raise PRs immediately (after branch is created)
    • If semantic commits detected, use semantic commit type fix for dependencies and chore for all others
    • Keep existing branches updated even when not scheduled
    • Disable automerging feature - wait for humans to merge all PRs
    • Ignore node_modules, bower_components, vendor and various test/tests directories
    • Autodetect whether to pin dependencies or maintain ranges
    • Rate limit PR creation to a maximum of two per hour
    • Limit to maximum 20 open PRs at any time
    • Group known monorepo packages together
    • Use curated list of recommended non-monorepo package groupings
    • Ignore spring cloud 1.x releases
    • Ignore http4s digest-based 1.x milestones

    :abcd: Would you like to change the way Renovate is upgrading your dependencies? Simply edit the renovate.json in this branch with your custom config and the list of Pull Requests in the "What to Expect" section below will be updated the next time Renovate runs.


    What to Expect

    With your current configuration, Renovate will create 4 Pull Requests:

    Update actions/checkout action to v2
    • Schedule: ["at any time"]
    • Branch name: renovate/actions-checkout-2.x
    • Merge into: master
    • Upgrade actions/checkout to v2
    Update dependency gradle to v4.10.3
    • Schedule: ["at any time"]
    • Branch name: renovate/gradle-4.x
    • Merge into: master
    • Upgrade gradle to 4.10.3
    Update dependency cupertino_icons to v1
    • Schedule: ["at any time"]
    • Branch name: renovate/cupertino_icons-1.x
    • Merge into: master
    • Upgrade cupertino_icons to ^1.0.0
    Update dependency gradle to v6
    • Schedule: ["at any time"]
    • Branch name: renovate/gradle-6.x
    • Merge into: master
    • Upgrade gradle to 6.8.3

    :children_crossing: Branch creation will be limited to maximum 2 per hour, so it doesn't swamp any CI resources or spam the project. See docs for prhourlylimit for details.


    :question: Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    This PR has been generated by WhiteSource Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Parameter fontSize causes widget to crash

    Parameter fontSize causes widget to crash

    Parameter fontSize of MapBoxPlaceSearchWidget is a String but is used in a context where a double is expected. This causes a crash of the widget if the parameter is used:

    type 'String' is not a subtype of type 'double?'

    When the exception was thrown, this was the stack: #0 _MapBoxPlaceSearchWidgetState._searchInput (package:mapbox_search_flutter/src/map_box_place_search_widget.dart:160:37) #1 _MapBoxPlaceSearchWidgetState.build (package:mapbox_search_flutter/src/map_box_place_search_widget.dart:110:18) #2 StatefulElement.build (package:flutter/src/widgets/framework.dart:4792:27) #3 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4675:15) #4 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4847:11) ...

    opened by gseront 1
  • Add theme support

    Add theme support

    Yesterday I put Brightness.dark in my app to enable dark mode, but the TextField keeps displaying in white like this

    image

    It will also be cool if the padding around the TextField can be adjusted.

    feature_request 
    opened by SaltySpaghetti 2
Owner
Ketan Choyal
iOS/Android App Developer 📱 Flutter + Native https://sourcerer.io/ketanchoyal
Ketan Choyal
MapBox Search Widget

About This package provides some widgets to use in conjunction to mapbox_search library. Also, it contains an static map image generator ?? . Installi

Ketan Choyal 7 Apr 20, 2021
A Flutter package for place search using MapBox Api and for Static map image

About This package provides easy api calls to MapBox Search API. Also, it contains an static map image generator ?? . Maki Icons can be used now in ma

Ketan Choyal 63 Dec 2, 2022
Moved to https://github.com/tobrun/flutter-mapbox-gl

Please note that this project has moved. Please head to https://github.com/tobrun/flutter-mapbox-gl for updates. Flutter Mapbox GL Native This Flutter

Mapbox 258 Oct 16, 2022
A new flutter plugin for mapbox. You can use it for your map backgrounds inside flutter applications

A new flutter plugin for mapbox. You can use it for your map backgrounds inside flutter applications

Boris Gautier 5 Sep 14, 2022
A Mapbox GL flutter package for creating custom maps

Flutter Mapbox GL Please note that this project is community driven and is not an official Mapbox product. We welcome feedback and contributions. This

flutter-mapbox-gl 917 Dec 31, 2022
Customized google map with widget markers. Enables to show markers with widget code.

widget_marker_google_map Google map with widget markers. Set up Follow the steps on google_maps_flutter document. Usage Same as google_maps_flutter ex

Santa Takahashi 8 Dec 4, 2022
A Flutter map widget inspired by Leaflet

flutter_map A Dart implementation of Leaflet for Flutter apps. Installation Add flutter_map to your pubspec: dependencies: flutter_map: any # or the

null 2.2k Dec 28, 2022
A map widget with live position updates for Flutter

Livemap A map widget with live position updates. Based on Flutter map and Geolocator. Provides a controller api to handle map state changes. Example i

null 45 Sep 28, 2022
A Flutter map widget inspired by Leaflet

flutter_map A Dart implementation of Leaflet for Flutter apps. Usage Add flutter_map to your pubspec: dependencies: flutter_map: any # or the latest

AppTree Software, Inc 114 Dec 13, 2022
A Flutter map widget inspired by Leaflet

flutter_map A Dart implementation of Leaflet for Flutter apps. Installation Add flutter_map to your pubspec: dependencies: flutter_map: any # or the

null 2.2k Jan 3, 2023
A Flutter plugin which provides 'Picking Place' using Google Maps widget

Google Maps Places Picker Refractored This is a forked version of google_maps_place_picker package, with added custom styling and features.

Varun 5 Nov 13, 2022
Mapbox-flutter - A repository to demonstrate the use of Mapbox - it's Maps and Navigation SDKs in a Flutter application

MapBox Flutter This repository contains code corresponding to the Youtube video

AB Satyaprakash 39 Dec 30, 2022
MapBox Search Widget

About This package provides some widgets to use in conjunction to mapbox_search library. Also, it contains an static map image generator ?? . Installi

Ketan Choyal 7 Apr 20, 2021
A Flutter package for place search using MapBox Api and for Static map image

About This package provides easy api calls to MapBox Search API. Also, it contains an static map image generator ?? . Maki Icons can be used now in ma

Ketan Choyal 63 Dec 2, 2022
Boris Gautier 1 Jan 31, 2022
Moved to https://github.com/tobrun/flutter-mapbox-gl

Please note that this project has moved. Please head to https://github.com/tobrun/flutter-mapbox-gl for updates. Flutter Mapbox GL Native This Flutter

Mapbox 258 Oct 16, 2022
A new flutter plugin for mapbox. You can use it for your map backgrounds inside flutter applications

A new flutter plugin for mapbox. You can use it for your map backgrounds inside flutter applications

Boris Gautier 5 Sep 14, 2022
A Mapbox GL flutter package for creating custom maps

Flutter Mapbox GL Please note that this project is community driven and is not an official Mapbox product. We welcome feedback and contributions. This

flutter-mapbox-gl 917 Dec 31, 2022
A Flutter implementation of an expandable and animated floating search bar, also known as persistent search.

Material Floating Search Bar A Flutter implementation of an expandable floating search bar, also known as persistent search, similar to the ones used

null 390 Mar 3, 2022
Github-search - Allows users to search users on github Uses flutter

Github Search Github Search is a cross-platform mobile application powered by Flutter Framework and Github API. The application was built with simplic

Saul 3 Sep 13, 2022