Sqflite Tutorial | Flutter plugin for SQLite | CRUD

Поделиться
HTML-код
  • Опубликовано: 30 июл 2024
  • Add Local Database support to your Flutter App using SQlite with the Flutter plugin SQFlite. Using SQFlite I'll show you how to do full CRUD (Create, Read, Update, Delete) functions with SQLite in a simple bare bones app example.
    00:00 Introduction
    01:40 Initial Setup
    03:08 Sqflite Install
    03:57 Grocery Model
    04:55 DatabaseHelper Setup
    07:18 READ process
    09:07 CREATE process
    09:49 DELETE process
    10:42 UPDATE process
    13:06 Bonus Styling
    15:11 End
    Full Source Code and transcript:
    learnflutterwithme.com/sqlite
    #flutter #learnflutter
    Instagram:
    learnflutterwithme
    Stuff I use for this channel (Affiliate Links)
    SanDisk 1TB SSD amzn.to/3j1U8py
    Elgato Cam Link 4K amzn.to/37EyqBK
    Logitech G600 Mouse amzn.to/36DYFYz
    Logitech G Pro Keyboard amzn.to/3saco38
    Macbook Pro M1 13" amzn.to/36GzbKc
    Neewer Mic Arm amzn.to/3z7RvIm
    Davinci Resolve amzn.to/3erEb9I
    Adobe Photoshop Elements amzn.to/3BkPKth

Комментарии • 164

  • @arpro3038
    @arpro3038 6 месяцев назад +1

    I must have viewed over 30 RUclips videos about Flutter until I came across yours. Thank you very much for all your videos. I like the no frills, just the topic and that you always start with a fresh new code from the beginning and you share the completed code. I also like that you explain as you work. Thank you.

  • @ManontheOutside
    @ManontheOutside Год назад

    Great tutorial, Everything you need to get sqflite up and running quickly, all in one place. Brilliant videos and tutorials, look forward to more. Thank you!👍

  • @bharathkumar-ji4if
    @bharathkumar-ji4if 2 года назад +1

    One of best tutorial ever. Its every easy to work on a single page code rather download bundle of files. Thank you so much

  • @mateusfensterseifer4553
    @mateusfensterseifer4553 3 года назад +4

    Awesome Tutorial. The best Flutter Tutorial i've seen! Keep that great work man!

  •  2 года назад +4

    I was watching this topic in the tutorial video recorded in 2019, but the whole syntax has changed and I didn't understand anything, I wrote the same video as the current version and I understood the logic. Thanks ☺

  • @alberthajek9067
    @alberthajek9067 2 года назад +1

    Hi! I juts want ot thank you for making this video! Makes super sense, your explanatory skills are perfect and format is very enjoyable while coding. Helped me a lot, others such as Johannes Milke couldn't do job as great as you did. Awesome video, thank you very much!

  • @averageprogrammingenjoyer2059
    @averageprogrammingenjoyer2059 Год назад +1

    Top notch tutorial, no bs, nothing. Thank you very much. You helped out a lot in my project!

  • @isho7777
    @isho7777 Год назад

    Straight to the point. Only the relevant info on how to use sqlite database and no fancy widgets

  • @BrunaAraujoPinheiro
    @BrunaAraujoPinheiro 2 года назад

    Simple and right to the point, thank you so much for making this video :D

  • @ikmal_is1773
    @ikmal_is1773 2 года назад

    this one is hell easy to understand. Been watching so much tutorial about sqlite. But this one is really easy to understand . Thanks sir

  • @nabil.hamawi
    @nabil.hamawi 2 года назад

    I can't thank you enough... You're the best tutor in the world!

  • @bobbysmith8588
    @bobbysmith8588 2 года назад

    Awesome tutorial, thanks for take your time to create it

  • @user-ec1ch4sx3r
    @user-ec1ch4sx3r Год назад

    Thank you for the tutorial. It's easy enough to follow along!

  • @ammarboro6089
    @ammarboro6089 3 года назад +16

    This is such a simple yet straight-forward tutorial. Loved it and highly recommend for someone that is starting out with flutter like me. You sir, earn a subscribe from me

    • @LearnFlutterwithMe
      @LearnFlutterwithMe  3 года назад +2

      Thank you so much!

    • @infotration2225
      @infotration2225 2 года назад

      @@LearnFlutterwithMe I was searching for tutorials like at least I found you. You earn subscribers not single but many

  • @caiocamargoantonio
    @caiocamargoantonio Год назад +1

    Thank you for the luck and opportunity to have found this excellent tutorial, in which your explanations were perfect and provided in sync with the context being taught following a very pleasant and captivating format during coding (...plagiarizing a message posted by a previous colleague "Sensational video ").
    Thank you very much.

  • @gubukbonsai6005
    @gubukbonsai6005 3 года назад +1

    Clear Straight Quick, no matches, keep it up!!!

  • @amrhaithem7064
    @amrhaithem7064 2 года назад

    thanks for this. Keep moving this will be a great channel

  • @ohenro19
    @ohenro19 2 года назад

    Excellent Tutorial!! Thank you so much

  • @obinnaelviso
    @obinnaelviso Год назад

    Wow. I love this video and the steps. I was able to implement this with an already existing database in my assets folder.

  • @mruduladdipalli5417
    @mruduladdipalli5417 3 года назад

    What an explanation, really amazing

  • @LuisOtavioZimmermann
    @LuisOtavioZimmermann Год назад

    Amazing teaching. Awesome and straight forward video.

  • @jihedbouchnak
    @jihedbouchnak Год назад

    thanks a lot this is even better then documentation keep the good work and make us more videos

  • @ankitchawla8487
    @ankitchawla8487 2 года назад

    This was very helpful, thanks a lot.

  • @gumdum6764
    @gumdum6764 3 года назад +1

    very nice work. I like how you initialized the database only if needed

  • @husseinj7505
    @husseinj7505 Год назад

    Thank you for this great and simple tutorial.👍

  • @ipott8212
    @ipott8212 2 года назад +1

    Wow, this helped me a lot. Thanks!

  • @MithunDuttaIL
    @MithunDuttaIL 2 года назад

    Thank you very much for this tutorial. I was struggling with it for a week now.

  • @andrewshenouda3604
    @andrewshenouda3604 2 года назад +1

    Very easy to follow tutorial and straight to the point - Thank you!
    Subscribed and would like to see more SQLite tutorials like this one and showing different ways to interact with the SQLite database from the UI frontend perspective
    For example, can you return the data from the db to the frontend in different widgets other than List, like DataTable widget?

  • @vaishnavinagrale5429
    @vaishnavinagrale5429 Год назад

    Thank you so much that was so helpful...

  • @shihabhossain4190
    @shihabhossain4190 2 года назад

    Thank you. Your video helped a lot.

  • @sailinhtut5961
    @sailinhtut5961 2 года назад

    Thank Sir ,Super Clear Explanation with relax music

  • @jemmytech5474
    @jemmytech5474 3 года назад

    Thank you so much. I’ve waited a lot

  • @gethsun1
    @gethsun1 Год назад

    Neat Quick job 👍

  • @romeroo98
    @romeroo98 2 года назад

    This channel deserve a lot! Keep itu up!

  • @aunghtet3636
    @aunghtet3636 2 года назад

    Thank you very much sir. You are awesome!

  • @abdelrahmananwar885
    @abdelrahmananwar885 Год назад

    pretty neat, thank you

  • @munaretto_
    @munaretto_ Год назад

    Thank you very much!

  • @antoniomanoel2873
    @antoniomanoel2873 2 года назад

    amazing content I do recommend for anyone who is learning

  • @diamondeagle173
    @diamondeagle173 Год назад

    Thank you Sensei.

  • @mageshkanna
    @mageshkanna Год назад

    you saved my entire day 😇

  • @vijaybabaria3253
    @vijaybabaria3253 3 года назад

    like your cool and relaxed style of teaching - hope to see more flutter videos

    • @LearnFlutterwithMe
      @LearnFlutterwithMe  3 года назад

      Thank you!

    • @vijaybabaria3253
      @vijaybabaria3253 3 года назад

      @@LearnFlutterwithMe Pls let me know if you have any suggestions to sync back local data to a source, may be initialize data thru REST api at start and sync back after some interval and also destroy local data if there is no user activity within x number of days. Trying to figure out efficient way of syncing local storage back to source. Thanks

    • @LearnFlutterwithMe
      @LearnFlutterwithMe  3 года назад

      @@vijaybabaria3253 hmmm... depends on the application I suppose. I would say, using user settings as an example, if they change a setting and you want it to be backed up or available across platform, you would need to write that change on save to a remote source immediately to avoid any delay. Think of this - I come from a web design background. If the server does a nightly backup at 22:00 and the database crashes at 21:00 you've lost a whole days worth of data. My vote would be to just store individual changes remotely on saves to avoid heavy bandwidth usage and loss of data. Hope that made sense! You might ask on one of the flutter communities as well as someone there may have more experience than I do: flutter.dev/community

  • @monobrezel2647
    @monobrezel2647 2 года назад

    just simple and cool !

  • @angelopaligutan1665
    @angelopaligutan1665 2 года назад

    Thank you so much.

  • @kbyo2006
    @kbyo2006 2 года назад

    Thanks for tutorial!!

  • @iasror
    @iasror 2 года назад

    you doing great. thank you

  • @earthrelated
    @earthrelated 2 года назад

    Thank you sir!

  • @dhruvinprajapati4345
    @dhruvinprajapati4345 2 года назад

    thank you so much this video help me

  • @edu28811
    @edu28811 2 года назад

    Very good. Thank you

  • @bongssang
    @bongssang 3 года назад

    Thank you so much! this video big help for me.

  • @d4tto92
    @d4tto92 2 года назад

    it was great sqlite tutorial thank you for this

  • @jae7593
    @jae7593 3 года назад +1

    Thank you :)

  • @ashishu8888
    @ashishu8888 2 года назад +1

    thank you so much sir!

  • @luisnepas3326
    @luisnepas3326 2 года назад

    Thanks. Great tutorial!

  • @BBFTW36
    @BBFTW36 2 года назад

    ty so much sir, very easy explained and helpful

  • @faizanchaudhry8754
    @faizanchaudhry8754 8 месяцев назад

    thankx sir to the point vedio and so easy way and short vedio tutorial thankx sir

  • @sriram4738
    @sriram4738 Год назад

    easy to be followed

  • @luoichannel
    @luoichannel Год назад

    Thanks so much

  • @hasans7370
    @hasans7370 2 года назад +1

    Thank you so much sir! Always clear and straight to the point ❤
    I'd really appreciate it if you can do SQFLite video where you have multiple tables and want to use Foreign Key in CRUD.
    Again Thank you :)

    • @LearnFlutterwithMe
      @LearnFlutterwithMe  2 года назад +1

      Thank you! I'll see what I can do for you! Thanks for watching!

  • @seankiong
    @seankiong Год назад +1

    nice! btw, is there a way to extends the databasehelper if i would like to have a separate file to store individual table models and functions?

  • @chandrasekarchan9386
    @chandrasekarchan9386 2 года назад

    you are great!

  • @usama_khalid
    @usama_khalid 2 года назад

    Thanks . it is really helpful

  • @Hidden_traveler93
    @Hidden_traveler93 2 года назад

    very good tutorial and explanation very good that how can do it easily

  • @deveshojha8748
    @deveshojha8748 Год назад

    I am creating a real time chat application in Flutter using socket and and I have to store messages locally when there is no internet connection. Is Sqflite good for this purpose?

  • @sportKO12
    @sportKO12 2 года назад

    Great ! Respect....

  • @szyszak9424
    @szyszak9424 2 года назад +1

    4:37 what is it that code? this factory from map something?

  • @abdelrahmananwar885
    @abdelrahmananwar885 Год назад

    is there an advantage in using the Future Builder way over the ListViewBuilder Way?

  • @sbasalan
    @sbasalan 2 года назад

    Is there a possibility to query database (sqlite) and get a result that return from databse?

  • @sreejapasupuleti5384
    @sreejapasupuleti5384 2 года назад

    Hello sir, here i am unable to get no groceries in list at 9:00 minute it was showing only loading... thats it any suggestion?

  • @fleshpaghetti
    @fleshpaghetti 2 года назад

    How can I add a new table on existing .db file?

  • @DavidFuto
    @DavidFuto 2 года назад

    I already have a write db file, how can I use it?

  • @sajeentharthavaneswaran8578
    @sajeentharthavaneswaran8578 2 года назад

    I installed sqflite too but it shows an error in 'Database' get the quick fix button it shows to add the package sqflite but I already add that package please guide me regarding this

  • @nilsirl
    @nilsirl Год назад

    Isn't it bad practice to create a future inside of FutureBuilder?

  • @muradhamed2960
    @muradhamed2960 5 месяцев назад

    cool Destiny shirt bro

  • @faizulla5838
    @faizulla5838 2 года назад

    Brooo, Hello! Can you do video Sqflite+GetX and Hive + GetX ... and with more model items ? maybe 4-5 (String, int , bool) ... ???

  • @Aboudimassi
    @Aboudimassi Год назад

    Hey
    thank you for this nice tutorial
    can you help me to understand this code? why you have created an instance of constructor inside the class it self and you also initialize it, it sounds good but really not understand the following code
    DatabaseHelper ._privateConstructor() ;
    static final DatabaseHelper instance = DatabaseHelper ._privateConstructor() ;
    what above code called ? espcially "DatabaseHelper ._privateConstructor() ;"
    I am coming from a Java background 😀

  • @javadmahmoodi2469
    @javadmahmoodi2469 Год назад

    Hello. Thank you for your good teaching. Please publish a tutorial on how to add search to this list. Thanks

  • @xXEazy94EXx
    @xXEazy94EXx Год назад

    somehow when I close my app all the data is deleted after I reopen it. Did the tutorial exactly as in the video...

  • @leoingson
    @leoingson 2 года назад

    Thanks, subscribed. What about github-ing the code?

  • @KK-lr4vx
    @KK-lr4vx 2 года назад

    your videos are simple and easy to understand. could you make one on drift/moor orm for sqlite.

  • @jaylee3270
    @jaylee3270 3 года назад +1

    Many thanks. Such a great tutorial!
    Sir,
    is it possible to put them into categories? For example, Create 'Fruits', 'Meats' and other custom categories and put 'bananas', 'apples' into 'fruits' category. And then CRUD categories and CRUD items in categories.
    Could you please make this tutorial?

  • @Jonas-mi9yj
    @Jonas-mi9yj 3 года назад

    One question are the factories toMap and fromMap the same as toJson and fromJson which can be generated through json_serializable?

    • @LearnFlutterwithMe
      @LearnFlutterwithMe  3 года назад

      This might explain it better than I can atm:
      flutter.dev/docs/development/data-and-backend/json

  • @halilmertdeveli3846
    @halilmertdeveli3846 2 года назад

    the system is adding but name is coming null ı colund't solve

  • @zhujinlu6022
    @zhujinlu6022 2 года назад

    cool

  • @choroguarda
    @choroguarda 3 года назад

    Hi! i have a question, i want to do an app that is synchronized with an web app, so i already have a database created, the database has a lot of tables already so my doubt is, i have to initialize the database in all the places that i want to make a crud? o i can put hte code in a file.dart and call it from there, sorry for my bad English i am from south america, thank you and great video.

    • @LearnFlutterwithMe
      @LearnFlutterwithMe  3 года назад

      Hi! Yes I believe the way people would normally do this is to create an api on your web app that you call from your flutter app in your various crud calls in file.dart. A little bit complicated to put into a single comment. I have plans to discuss apis in the future I'll see if I can get to it sooner than later. Thanks for watching!

  • @abdullaaeham
    @abdullaaeham 2 года назад

    👌👏

  • @TheMRTIMBUK2
    @TheMRTIMBUK2 2 года назад

    Nice Speed Coding ...

    • @LearnFlutterwithMe
      @LearnFlutterwithMe  2 года назад +1

      Well, I cheated. haha! I speed up the code parts in editing so y'all don't have to sit through all that!

  • @davelogan77
    @davelogan77 2 года назад

    this is legit.

  • @dandy8121
    @dandy8121 2 года назад

    Just to avoid future updates, i reccommend using an if else statement on the floatingactionbutton to where if the textcontroller is empty, it wont do anything, else does as it suppose to. not necessary but its a good add-on

    • @LearnFlutterwithMe
      @LearnFlutterwithMe  2 года назад

      Yep! I think any fool proofing is worth the time! Thanks for sharing!

    • @Revamiko
      @Revamiko Год назад

      are you know how to do that? please help me

  • @sathiesha
    @sathiesha 2 года назад

    Kudos for the excellent videos. Really appreciate the way you made the videos keeping in mind what the viewers' want - particularly fast-forwarding the typing :) !

  • @Revamiko
    @Revamiko Год назад +1

    please help me, how do I do it so that if the input is empty then we can't add it to the list?

    • @omersar9120
      @omersar9120 Год назад

      put a if function in floatingActionButton like " if (textController.text != ' ') "

  • @dsdridi5362
    @dsdridi5362 2 года назад

    😍

  • @davidowens9597
    @davidowens9597 3 года назад

    Another great video. I was curious why you like using Android Studio rather than VS Code? Thanks.

    • @LearnFlutterwithMe
      @LearnFlutterwithMe  3 года назад +1

      Thank you! Well its funny you ask that... I just switch to vs code because android studio was using an excessive amount of memory and it was causing me problems recording videos on my older MacBook. The next video will have vscode.

    • @jemmytech5474
      @jemmytech5474 3 года назад

      Oh i use android studio as well on my mac m1. Lemme switch to VS. Though I’ve installed earlier but the interface was quite different

    • @LearnFlutterwithMe
      @LearnFlutterwithMe  3 года назад

      @@jemmytech5474 there ARE themes that will change your colors to the same as Android. I'll try to remember to post it here or maybe search for "android studio theme for vs" or something. Assuming thata's what you want it to look like of course

  • @maccachan64
    @maccachan64 2 года назад

    so if i want to use both firebase and sqlite at the same time, possible?

  • @ricgor3441
    @ricgor3441 2 года назад

    The Full Source Code Button, is not working.

  • @jemmytech5474
    @jemmytech5474 2 года назад

    Sir how to search instantly in the listview? This video helped me a lot, my assignment is almost completed except the searching functionality. Please I’ll be waiting for you.

    • @jemmytech5474
      @jemmytech5474 2 года назад

      I solved this. Check out in my channel

  • @kamalCode
    @kamalCode 3 года назад

    Sir, flutter package Development tuotorial

  • @jemmytech5474
    @jemmytech5474 2 года назад +1

    Sir my app is to add new user and show it in the listview. But my listview does not update dynamically when i click on the add button. It always needs to reopen the app.
    Please help me , this video helped me a lot but only the above problem still occurring

    • @lephichung
      @lephichung 2 года назад +1

      You need to add setState to re-render the app

    • @jemmytech5474
      @jemmytech5474 2 года назад

      @@lephichung where should I add the setState? In the add button?

    • @lephichung
      @lephichung 2 года назад +1

      @@jemmytech5474 yes, in add button

  • @westleykooseenlin356
    @westleykooseenlin356 2 года назад

    very good video , btw may i know the background music ?

    • @LearnFlutterwithMe
      @LearnFlutterwithMe  2 года назад

      Thank you! It is called "Leave it Alone" by Underbelly. I've tried to find another one so I'm not always using the same song, but this one works so well I haven't been able to replace it!

  • @noblenetdk
    @noblenetdk 2 года назад

    You talk about two pevious videos - wirch onces?

    • @LearnFlutterwithMe
      @LearnFlutterwithMe  2 года назад +1

      Hey Kim! They are "Flutter Firebase Tutorial" ruclips.net/video/WuYOGBEOEOo/видео.html
      and "Flutter Widget Basics: ListView" ruclips.net/video/2jTP9Po04ms/видео.html
      Sorry about that!

  • @mbithi_ke
    @mbithi_ke Год назад

    used this video just today and guess what, my app went unresponsive when i try adding to database, an update needed or something?

    • @LearnFlutterwithMe
      @LearnFlutterwithMe  Год назад

      I will review it and see if I can put out an update soon! Thanks for letting me know!