Тёмный
No video :(

shared_preferences (Package of the Week) 

Flutter
Подписаться 574 тыс.
Просмотров 96 тыс.
50% 1

Learn more about shared_preferences → goo.gle/3LJQITK
Your app runs everywhere and you want to save some simple data, but persistent storage requires platform-specific code … shared_preferences abstracts away all of the platform-specific code for accessing persistent storage so that you can write your code once and have it work across platforms.
This video is also subtitled in Chinese, Indonesian, Italian, Japanese, Korean, Portuguese, Spanish, Arabic, and Vietnamese.
Learn everything about Flutter at → goo.gle/2WAhEN1
Get more tips! → goo.gle/Flutte...
Subscribe to Flutter! → goo.gle/FlutterYT
#PackageoftheWeek #Widgets #Flutter

Опубликовано:

 

25 май 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 67   
@scottgreen3703
@scottgreen3703 2 года назад
This is the first plugin i looked for when i started learning flutter
@muhammadahmadkhan5046
@muhammadahmadkhan5046 2 года назад
Your previous development experience should be android development.
@niralnaik16
@niralnaik16 2 года назад
+1
@niralnaik16
@niralnaik16 2 года назад
@@muhammadahmadkhan5046 that's also true 🥳
@merlinchiodo8943
@merlinchiodo8943 Год назад
Why do i see this just now after 3 months of programming haha
@Rick-ng3lr
@Rick-ng3lr 2 года назад
I didn’t know there’s no guaranteed write with shared_preferences. Good to know. Thx!
@HarveyJoness
@HarveyJoness Год назад
well, it is up to the condition of the storage of your device.
@dllizheng
@dllizheng Год назад
@@HarveyJoness what does that mean?
@HarveyJoness
@HarveyJoness Год назад
@@dllizheng If your storage is full or not working properly for any reason it's not guaranteed to save your data as it is told in the video.
@dllizheng
@dllizheng Год назад
@@HarveyJoness Doesn't it return an error or throw some exception when saving?
@HarveyJoness
@HarveyJoness Год назад
@@dllizheng Yes it does. But If your storage is broken someway after you saved your data succesfully, there is no chance to save your data back. And obviously no chance to throw an exception.
@luchitv1
@luchitv1 2 года назад
Flutter dev.. please look into the device default fonts to be used instead of the Flutter default. It is very important. Make the Flutter apps to adapt to the selected default fonts on the device.
@keidev7717
@keidev7717 2 года назад
flutter is already implemented this by default
@luchitv1
@luchitv1 2 года назад
@@keidev7717 no it doesn't work. The app uses default font of flutter instead of the device selected fonts
@mohamedayman5240
@mohamedayman5240 Год назад
whats the problem with that .. u will use your custom fonts anyway
@kartikgarasia5685
@kartikgarasia5685 2 года назад
Alternative to this hive!
@StemLG
@StemLG 2 года назад
get_storage is another cool persistent storage widget
@user-uz8gf5kv6y
@user-uz8gf5kv6y 2 года назад
This a package of decade))
@MehediHasan-co5qz
@MehediHasan-co5qz 2 года назад
Love you Flutter❤️❤️❤️
@crazy-man
@crazy-man 2 года назад
also a good package, but get_storage package is more convenient, only I use it now because I don’t need to use async
@SethuSenthil
@SethuSenthil 2 года назад
This is so true. It often times makes life so much easier too, no need for unnecessary future builders for reading simple values from the disk. Wish I knew this before!
@biigsmokee
@biigsmokee Год назад
Do not use getx-based packages, they are bad
@hydernotes
@hydernotes 6 месяцев назад
I'm getting.init() error in get storage. I'm thinking to revert back to the shared preferences.
@umitkirtil
@umitkirtil 2 года назад
Auth tokens ? Is it a bad practice to save user token to shared pteferences ?
@desther
@desther 2 года назад
It would be better IMO to use flutter_secure_storage for this usecase.
@umitkirtil
@umitkirtil 2 года назад
@@desther thnk you very much. i will look into it
@raglandasir6885
@raglandasir6885 2 года назад
If Flutter uses local storage for the web to store shared_preferences, then it could be a problem
@umitkirtil
@umitkirtil 2 года назад
@@raglandasir6885 hi i use flutter for mobile only. but flutter_secure_storage looks more useful
@te6989
@te6989 2 года назад
For unknown reason, on some iPhone, the shared preference doesn't work We tried on two same model of iPhone with the same OS version, but on one it works like a charm but not on the other one
@joeng7424
@joeng7424 2 года назад
Deja Vu? I thought this package was mentioned long ago?
@AntonioMdrtt
@AntonioMdrtt 2 года назад
Nice!
@ChrisHalden007
@ChrisHalden007 2 года назад
Great!
@michalstefanak9914
@michalstefanak9914 2 года назад
Is there something to save files in the local storage? Like songs in music directory on Android. Or just saving in Download dir.
@flutterdev
@flutterdev Год назад
Hello Michael, we'd recommend checking out the following guide for the shared_preferences Package of the Week: goo.gle/3yWIowo
@mike2005546
@mike2005546 2 года назад
not DataStore in Android???
@PRATAPSINGHSHEKHAWAT
@PRATAPSINGHSHEKHAWAT 2 года назад
Already using.
@abishekab21
@abishekab21 10 месяцев назад
We don't care.
@PlayingCode
@PlayingCode 2 года назад
If this is not reliable then what to use for critical info storage?
@noahderebe
@noahderebe 2 года назад
sqflite and other persistent storage methods.
@richardjecooke8036
@richardjecooke8036 2 года назад
So how do we store data across devices in local storage, where we *can* rely on it being written to disk?
@Abdullah-vp2tl
@Abdullah-vp2tl 2 года назад
You can use dart:io library but it doesn't support web applications
@richardjecooke8036
@richardjecooke8036 2 года назад
@@Abdullah-vp2tl Yeah, there's no way of doing it, I looked at all packages. And then I realised a PWA works on web, mobile, and desktop, so I gave up on Flutter and went back to advanced web dev.
@Drasius
@Drasius 2 года назад
hive for me
@sumanmitraYTC
@sumanmitraYTC 2 года назад
anyone using Hive instead of shared_preference?
@what-tk9cc
@what-tk9cc 2 года назад
Most would prefer hive over shared_preferences
@naxcall
@naxcall 2 года назад
Get storage for me 😆
@what-tk9cc
@what-tk9cc 2 года назад
Hive > sqflite > shared_preferences
@subrotoxing8214
@subrotoxing8214 2 года назад
skip this... and go hive....
@jousis_
@jousis_ 2 года назад
Isar ftw ! (By the same dev)
@feruzboymuratov
@feruzboymuratov 2 года назад
First like and firs comment. Google wait for me. I'm coming as a developer from Asia
@crazy-man
@crazy-man 2 года назад
we are all waiting for you)
@flutterdev
@flutterdev 2 года назад
You got this, Feruz! Happy Developing 🥳🙌
@dammy_tv
@dammy_tv Год назад
Is shared preferences secured?🔐
@navasshareef1990
@navasshareef1990 2 года назад
😍
@Horizon-tr6iy
@Horizon-tr6iy 2 года назад
Hive it's better
@kawhao3757
@kawhao3757 2 года назад
Wow
@TheCodeWhisperer0o0
@TheCodeWhisperer0o0 11 месяцев назад
Yo Yo, she talks so fast! I'm gonna have to download the video and slow it down
@amitmondal7427
@amitmondal7427 2 года назад
But shared preferences deprecated.
@werrutkyupnext
@werrutkyupnext 2 года назад
bro I am not willing to take 17,000 hours and 23 tb of storage just to install flutter, I wanted to do this at first now I am uninterested... please make easier to install
@eraysona
@eraysona 3 месяца назад
this is too theoritical we need more code more examples. at least I need
@wafienezi4137
@wafienezi4137 2 года назад
If you make channel with Arabic language plz
@flutterdev
@flutterdev 2 года назад
Auto-translate is now available on all channels. Click on settings, subtitles and auto-translate to pick the language you would like ✨
@mrwalkan
@mrwalkan 2 года назад
1:46 I think they mean encryption not persistent.
@yaqub3567
@yaqub3567 2 года назад
So never ever try to save widgets state with this package
@michasengotta2295
@michasengotta2295 2 года назад
No they meant "persisted", because preferences may also be stored in temporary memory, for instance if a user uses the incognito mode in their browser.
Далее
google_fonts (Package of the Week)
1:31
Просмотров 99 тыс.
Freezed (Package of the Week)
2:57
Просмотров 182 тыс.
35 Flutter Tips That Will Change Your Life
10:53
Просмотров 299 тыс.
Keeping it local: Managing a Flutter app's data
44:57
Top 30 Flutter Tips and Tricks
6:50
Просмотров 547 тыс.
RepaintBoundary (Widget of the Week)
2:20
Просмотров 95 тыс.
Most overpowered way to build mobile apps?
8:33
Просмотров 761 тыс.