Shared Preferences

กลไกเก็บข้อมูลง่าย ๆ บน local device ใน Flutter

จุดสำคัญ

  • เก็บข้อมูลแบบ key-value บนเครื่อง
  • ใช้สำหรับข้อมูลเล็ก ๆ เช่น user settings, preferences, tokens
  • ไม่เหมาะกับข้อมูลใหญ่หรือซับซ้อน (ใช้ SQLite หรือ Hive แทน)
  • Flutter — framework ที่ใช้ Shared Preferences
  • Dart — ภาษาที่ใช้เขียน