Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Building Cross-Platform GUI Applications with Fyne

You're reading from  Building Cross-Platform GUI Applications with Fyne

Product type Book
Published in Jan 2021
Publisher Packt
ISBN-13 9781800563162
Pages 318 pages
Edition 1st Edition
Languages
Author (1):
Andrew Williams Andrew Williams
Profile icon Andrew Williams

Table of Contents (18) Chapters

Preface Section 1: Why Fyne? The Reason for Being and a Vision of the Future
Chapter 1: A Brief History of GUI Toolkits and Cross-Platform Development Chapter 2: The Future According to Fyne Section 2: Components of a Fyne App
Chapter 3: Window, Canvas, and Drawing Chapter 4: Layout and File Handling Chapter 5: Widget Library and Themes Chapter 6: Data Binding and Storage Chapter 7: Building Custom Widgets and Themes Section 3: Packaging and Distribution
Chapter 8: Project Structure and Best Practices Chapter 9: Bundling Resources and Preparing for Release Chapter 10: Distribution – App Stores and Beyond Other Books You May Enjoy Appendix A: Developer Tool Installation Appendix B: Installing Mobile Build Tools Appendix C: Cross-Compiling

Storing data using the Preferences API

It is a common requirement for applications to store many pieces of information, such as user configuration options, current input field contents, and a history of opened files. Using files to store this information would require additional code to format the information for storage; using a database would require additional servers or dependencies for an application. To help with this, Fyne provides a Preferences API, similar to those used by iOS and Android developers.

Data that is stored as Fyne preferences can be accessed by any code in an application using a specific string identifier, known as a key. Each value that is stored has a specific type, so developers do not have to handle any conversion or type checking. Any time that this data changes, it will be saved for future use.

In this section, we'll learn how to manage data using the Preferences API and see how we can avoid having to manually manage user data.

Get and set...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}