Flutter Tutorial - AutoComplete TextField & AutoComplete Search TextField With JSON Data

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ก.พ. 2025

ความคิดเห็น • 82

  • @HeyFlutter
    @HeyFlutter  2 ปีที่แล้ว

    This might help you :)
    👉 12 Week Flutter Training from Newbie to Expert: heyflutter.com
    Source Code: github.com/JohannesMilke/typeahead_example

  • @hoangtri9569
    @hoangtri9569 3 ปีที่แล้ว

    lmao, I searched for "username suggestion" all day long, then I tried changing it to "suggested username". Guess what, I've got a great video here, keep it up Johannes.

  • @agung_laksana
    @agung_laksana 3 ปีที่แล้ว

    Johannes, You are awesome. Thank you very much for all your helpful videos !

  • @waliddjahra5608
    @waliddjahra5608 3 ปีที่แล้ว +2

    Brilliant and very helpful "as always" , keep going on

  • @Hi-tk4he
    @Hi-tk4he 3 ปีที่แล้ว

    Wow! I was waiting for your video and it's really good.

  • @timatikgz5310
    @timatikgz5310 3 ปีที่แล้ว +4

    Do you read my thoughts 😂 ) that's exactly what I looking for 🔥👍

  • @rahulpathak9208
    @rahulpathak9208 2 ปีที่แล้ว

    thanks ur code saved life

  • @juice_67
    @juice_67 3 ปีที่แล้ว

    Amazing tutorial man!

  • @hamzaibrahim895
    @hamzaibrahim895 3 ปีที่แล้ว

    Amazing!
    Thank you man

  • @gumdum6764
    @gumdum6764 3 ปีที่แล้ว +1

    Thank you Johannes for the streighforward and informative explanation. Not only did I learn about Autocomplete package, I learnt about the Faker package! I bet it would go great with pagination_view 😎
    Excellent work and code, thank you for sharing! 🤩🥳

    • @santhoshl3414
      @santhoshl3414 2 ปีที่แล้ว

      Hi, I am trying to get paginated suggestions with the Autocomplete package , Have tried it with pagination_view? Does it work properly? Thanks.

  • @mohamedmahadfarah4057
    @mohamedmahadfarah4057 3 ปีที่แล้ว

    You got +1 Subscriber ❤

  • @achyut_ft
    @achyut_ft 3 ปีที่แล้ว

    Thanks for the tutorial bro

  • @VongsiLoryongpao
    @VongsiLoryongpao 3 ปีที่แล้ว

    Good one, loved it.

  • @Ravigupta-tu8rr
    @Ravigupta-tu8rr 3 ปีที่แล้ว

    Thank you Johannes for your all videos as all's videos are amazing.
    This video is also amazing but please make a video with auto complete google places.
    I hope you will make video and I will wait for your response on it.
    Thank you.

  • @veedextechsolutions
    @veedextechsolutions 3 ปีที่แล้ว

    Many thanks for this tutorial. I wish I knew how to incorporate this in a website.

  • @vipinkrishna131
    @vipinkrishna131 2 ปีที่แล้ว

    really helpful!

  • @namanvaishnav6193
    @namanvaishnav6193 3 ปีที่แล้ว

    Man you're awesome, Thanks

  • @naveedkaimkhami2695
    @naveedkaimkhami2695 2 ปีที่แล้ว

    You man doing great!!!

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว

      Thank you, Naveed Kaimkhami! 🙂

  • @elorjsm2420
    @elorjsm2420 3 ปีที่แล้ว

    Thank you so much Mike. I want you to do a video on how to integrate algolia in flutter and dart

  • @josemiranda7386
    @josemiranda7386 3 ปีที่แล้ว

    THANK YOU SOOOOOOOOOOOOOOO MUCH

  • @jiren8991
    @jiren8991 3 ปีที่แล้ว

    Thanks a lot, it helped me in project

  • @DanVanDamme
    @DanVanDamme 3 ปีที่แล้ว +1

    Great tutorial Johannes! Thank you! Can this plugin also be used to autocomplete from a firebase database?

  • @sumanmanna6297
    @sumanmanna6297 3 ปีที่แล้ว

    Excellent 😎..

  • @danieloliveira4744
    @danieloliveira4744 2 ปีที่แล้ว

    Great video!!!
    It is possible to do something like:
    Suggestions:
    ...
    List of suggestions here
    ...
    I'm trying, but because its itemBuilder, the "Suggestions:" also enter in the loop

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว +1

      Thank you, Daniel Oliveira! 🙂. Try to proovide enough detail with your question whenever you have any question.

    • @danieloliveira4744
      @danieloliveira4744 2 ปีที่แล้ว

      @@HeyFlutter
      Sorry.
      I'm have to do a OpenSearch that the box widget with de the infos has something like that:
      TOP SUGGESTIONS:
      ***here the callback return with the top suggestions list that come from the API***
      SUGGESTIONS:
      **here the callback return with the suggestions list that come from the API**
      But, the TypeAhead use itemBuilder to build the corresponding Widget. There anyway to do something like the example above ?
      English is not my first language, I'm sorry

  • @NajeebAslan
    @NajeebAslan 3 ปีที่แล้ว

    You are greate

  • @painfulmemories168
    @painfulmemories168 3 ปีที่แล้ว

    Thanks a lot,

  • @haiderjaafer8164
    @haiderjaafer8164 3 ปีที่แล้ว

    As always brilliant ... would you make a signup, login emaillink firebase

  • @erictiobo9187
    @erictiobo9187 2 ปีที่แล้ว

    hello sir and really thank you for everything you do!!.. I am currently working on a form and I would like after a period of time to automatically send the user's information without having to click on a button, would you have an idea or a course that I could consult?? please!! thank you and have a good day

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว

      Thank You eric tiobo! Follow this link: stackoverflow.com/questions/65191777/in-flutter-how-to-automate-button-without-clicking-after-a-period-of-time
      I hope you will get your answer 🙂

  • @melomanzer5508
    @melomanzer5508 3 ปีที่แล้ว

    Hola, Does it work on web too ?

  • @aliounesakho8582
    @aliounesakho8582 2 ปีที่แล้ว

    Hi johannes thanks u. I struggle on trying to hide suggestions by pressing an arrow back iconbutton with prefixIcon textfield property but want to maintain the hidesuggestiononkeyboardhide : false . I tried suggestionboxcontroller.close(); when pressing prefixIcon but nothing happened. I you can help me on this please 🙏 😥

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว

      Thank You Alioune Sakho! Follow this link: stackoverflow.com/questions/62572312/flutter-typeahead-suggestionbox-doesnt-hide
      I hope you will get your answer 🙂

  • @hadikhan1813
    @hadikhan1813 3 ปีที่แล้ว

    Nice video. Although you're going very fast at it. These kind of video require explanation. Great work keep it up.

  • @rizalfahlevi5720
    @rizalfahlevi5720 2 ปีที่แล้ว

    hello Johannes. i'm use TypeAhead and working normal when I input manual from keyboard , but when try scan value from barcode scanner its not working (value scanner not display on textfield and out focus). please help me

  • @faisalahmad1934
    @faisalahmad1934 3 ปีที่แล้ว

    Awesome tutorial I was just thinking about it, Johannes can you please make a new tutorial for push notifications using firebase cloud functions and cloud messaging, your old tutorial uses some functions which have been deprecated. and the documentation on flutter fire site is just plain horrible.
    Thanks for saving our careers.

  • @dennyraymond7505
    @dennyraymond7505 3 ปีที่แล้ว

    I have a problem when using this package for flutter web in mobile view, when i tapped the textfield the keyboard showed and got dismissed, do you know what can cause this problem?

  • @benammarraouf3363
    @benammarraouf3363 3 ปีที่แล้ว

    how can i show the suggestion box above the textfield ?

  • @MisterNorthernCanuck
    @MisterNorthernCanuck 3 ปีที่แล้ว +2

    Your content is stellar. Just curious, any way you can add secton headers for sorting? Let's say I want to order the suggestions and display
    A
    ---
    Alex
    Abby
    B
    ---
    Bob
    Ben
    I know this is supported out of the box in React with Material components, but I'm not convinced with Flutter.

  • @lakshminarayananm8764
    @lakshminarayananm8764 3 ปีที่แล้ว +1

    In flutter, how to create caption box like instagram (include #hashtags search function + normal textfeild)

  • @Emir-nn1xc
    @Emir-nn1xc 2 ปีที่แล้ว

    I am using the flutter_typeahead package. When I use this package to search for something, it shows me some results related to what I searched for. However, when using this package on physical devices, the last option that appears is not being clicked. For example, if I search for "A", the results that appear are "A", "AA", "AAA", but when I try to click on "AAA" on my physical device, it is not being clicked, but it can be clicked on the emulator. Also, even when there is only one result, the problem of not being able to click on the last content still occurs.

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว

      Hey, @user-rv8bi1yk7b 🙂 please go ahead and file your issue here: github.com/AbdulRahmanAlHamali/flutter_typeahead/issues

  • @GauthierAbdala
    @GauthierAbdala 3 ปีที่แล้ว

    Very instructive video, thanks. I was wondering, is it possible to actually update the pattern with the suggestion clicked by the user? I have been trying that out with no luck

    • @GauthierAbdala
      @GauthierAbdala 3 ปีที่แล้ว

      @@HeyFlutter I actually found a way using the controller in the textFieldConfiguration. And it is working like a charm :)

  • @shazeemashar9869
    @shazeemashar9869 3 ปีที่แล้ว

    Hey Milke, its a great video i was looking for. But how can we handle it if the data is coming from firebase firestore.

    • @shazeemashar9869
      @shazeemashar9869 3 ปีที่แล้ว

      @@HeyFlutter Thank you so much :) It was really helpful.

  • @johnrm9
    @johnrm9 3 ปีที่แล้ว

    Fun lesson! I found a slighty different way to setup device orientations in main function of main.dart:
    Future main() async {
    WidgetsFlutterBinding.ensureInitialized();
    await SystemChrome.setPreferredOrientations([
    DeviceOrientation.portraitUp,
    DeviceOrientation.portraitDown
    ]).then((_) => runApp(MyApp())); //await setup before runApp...
    }

  • @akashperera8104
    @akashperera8104 3 ปีที่แล้ว +1

    Can you give a video for playstore subscription , there is no video on youtube about it

  • @bestmindcoolingrelaxationm1084
    @bestmindcoolingrelaxationm1084 ปีที่แล้ว

    Hello brother please help me to query data from mysql table based on substring input by a user for example if he type 'joh' and in the table we have ''johannes mike'' it should retrieve that row only.

    • @HeyFlutter
      @HeyFlutter  ปีที่แล้ว

      Thank You Best mind cooling & relaxation music! Follow this link: stackoverflow.com/questions/66645238/flutter-get-mysql-database-value
      I hope you will get your answer 🙂

  • @Detective_Khalifah
    @Detective_Khalifah 3 ปีที่แล้ว

    How can I handle querying the text entered by user in first_name, last_name & user_name altogether? I'd like to search after the user types @, so the logic can work in chat applications, when I want to tag users. Thanks!

  • @codecraftmanisha_official
    @codecraftmanisha_official ปีที่แล้ว

    Only first time when opening app or after installing it is working and 2nd time it' is not showing list is there where to apply set state or anything plz help me

    • @HeyFlutter
      @HeyFlutter  ปีที่แล้ว

      Thank You Manisha Dharmik! Follow this link: stackoverflow.com/questions/59848513/autocomplete-not-working-correctly-in-android-studio-with-flutter-first-sugges
      I hope you will get your answer 🙂

  • @chomanthapa
    @chomanthapa 3 ปีที่แล้ว

    Great! I want to do the same with photon.komoot.io/ . The API is there what changes do I need to make any idea ? I don't know how to use the api.

  • @immunemart484
    @immunemart484 3 ปีที่แล้ว

    Please add on ur idea list : login and signup with using Firestore and also fetch that data and show on textfield as a initial value to update later.

    • @immunemart484
      @immunemart484 3 ปีที่แล้ว

      @@HeyFlutter thanks hope i learn something new.

  • @kentthomas1045
    @kentthomas1045 3 ปีที่แล้ว

    what if the user inputs something that isn't in the autocomplete suggestions?

    • @kentthomas1045
      @kentthomas1045 3 ปีที่แล้ว

      @@HeyFlutter but does it save?

  • @uududududf3880
    @uududududf3880 3 ปีที่แล้ว

    not working my sdk is 2.7.0 do i really need to upgrade to 2.12? i got so many errors when i try updating my sdk

  • @nhatlevuminh7031
    @nhatlevuminh7031 2 ปีที่แล้ว

    Flutter has itself Autocomplete widget. Can you make a video about it?

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว +2

      Thanks for the idea, Nhật Lê Vũ Minh! 🙂 I have added it to my list of ideas for future videos!

  • @johnrm9
    @johnrm9 3 ปีที่แล้ว

    I have noticed in the BottomNavigationBarItem that the title parm is deprecated and uses a String instead of a Text widget...
    class _MainPageState extends State {
    int index = 0;
    @override
    Widget build(BuildContext context) => Scaffold(
    bottomNavigationBar: _buildBottomBar(),
    body: _buildPages(),
    );
    Widget _buildBottomBar() => BottomNavigationBar(
    backgroundColor: Theme.of(context).primaryColor,
    // See bottomNavigationBarTheme in MyApp
    // theme: ThemeData(
    // primarySwatch: Colors.pink,
    // bottomNavigationBarTheme: const BottomNavigationBarThemeData(
    // selectedItemColor: Colors.white,
    // unselectedItemColor: Colors.white70,
    // ),
    // ),
    // selectedItemColor: Colors.white,
    // unselectedItemColor: Colors.white70,
    currentIndex: index,
    items: [
    BottomNavigationBarItem(
    icon: _buildTextIcon(),
    label: 'Network', // title parm is deprecated now uses label parm
    ),
    BottomNavigationBarItem(
    icon: _buildTextIcon(),
    label: 'Local',
    ),
    ],
    onTap: (int index) => setState(() => this.index = index),
    );
    Widget _buildTextIcon({String text = 'TypeAhead'}) =>
    Text(text, style: const TextStyle(color: Colors.white));
    ...

  • @goldenlife6166
    @goldenlife6166 3 ปีที่แล้ว

    Awsom

  • @fajar2742
    @fajar2742 3 ปีที่แล้ว

    bro, can you help me ?
    how to show the loading progress everytime the user is typing ? i want user to know if they're typing the app send request to server .
    edited :
    i just found out how to do this haha.
    keepSuggestionsOnLoading: false
    great tutorial broo . thanks btw

  • @001Debjeet
    @001Debjeet 2 ปีที่แล้ว

    typeahead still doesnot support web :(

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว

      Thanks for your feedback, Debjeet Debnath! 🙂

  • @antonioguilherme1844
    @antonioguilherme1844 2 ปีที่แล้ว

    tooppp

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว

      Thanks, Antônio Guilherme! 🙂

  • @janammaharjan2699
    @janammaharjan2699 3 ปีที่แล้ว

    I got one error : Error:XMLHttpRequest error.

    • @janammaharjan2699
      @janammaharjan2699 3 ปีที่แล้ว

      I want to fetch data from firebase firestore

    • @janammaharjan2699
      @janammaharjan2699 3 ปีที่แล้ว

      Thank you so much for the video. Ragards Janam

    • @janammaharjan2699
      @janammaharjan2699 3 ปีที่แล้ว

      @@HeyFlutter Thank you so much The error is solved.

  • @gnrslashsp6501
    @gnrslashsp6501 3 ปีที่แล้ว

    Hey Johannes, nice one but I have a little question.
    The difference from this tutorial and this: th-cam.com/video/oFZIwBudIj0/w-d-xo.html
    From what I could understand, both do the same filter feature, but using TypeAheadField you get more tools like empty list, debounce, etc and if you do not use TypeAheadField you will need to implement all these things manually, Am I right?

  • @RandalLSchwartz
    @RandalLSchwartz 3 ปีที่แล้ว +1

    It's a missed opportunity that you didn't explain that the "TypeAhead" package is misnamed. You're talking properly about Autocomplete (provide possible additional characters based on a search space to permit abbreviations for common input text). Typeahead is a system that accepts characters from the keyboard ahead of them being able to be processed, and is such a natural flow these days that it's not seen as something that even needs a name, but clearly "TypeAhead" is nothing like "Autocomplete".

    • @theGoldyMan
      @theGoldyMan 3 ปีที่แล้ว

      @@HeyFlutter Actually, it seems pretty easy to imeplement the same thing with Flutter Autocomplete - you have textEditingController so you can hook to changes, then make a request and update a state variable for the results.