|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/flutter-sqlite-database/
课程评论:没有评论
课程名称:Flutter SQLite数据库 课程概述: 在这门Flutter课程中,我们将学习使用drift包进行本地数据存储。drift包让我们更轻松地创建和编写SQL查询,它内部使用SQLite 3,并且在Android和iOS平台上均表现良好。课程将介绍Flutter中的状态管理,使用流行的Provider包,从基础到高级的状态管理方法都有涉及。通过使用Provider,我们可以避免手动编写InheritedWidget,获得以下优势: 1. 简化资源的分配和释放 2. 延迟加载 3. 大幅减少每次创建新类时所需的样板代码 4. 友好的开发工具支持,使应用程序的状态可在Flutter开发工具中可视化 5. 提高了类的扩展性,适用于具有监听机制的复杂类(如ChangeNotifier) Drift是一种为Flutter和Dart构建的响应式持久化库,建立在SQLite之上。它具备以下特点: - 灵活性:支持使用SQL和Dart编写查询,提供两种语言的流畅API。可以过滤和排序结果,或使用联接在多个表上运行查询,支持复杂的SQL特性,如WITH和WINDOW子句。 - 功能丰富:内置支持事务、模式迁移、复杂过滤和表达式、批量更新和联接,甚至包含一个内置的SQL IDE。 - 模块化:内置对数据访问对象(DAOs)和SQL文件导入的支持,drift帮助你保持数据库代码的简单性。 - 安全性:drift根据你的表和查询生成类型安全的代码。如果查询中出现错误,drift将在编译时发现并提供有帮助的描述性提示。 - 快速性:尽管drift允许编写强大的查询,但性能依然能够与键值存储相媲美。drift是唯一具有内置线程支持的主要持久化库,可以使数据库代码在独立线程中运行,几乎不需要额外努力。 - 反应性:将任何SQL查询转换为自动更新的流,包括跨多个表的复杂查询。 - 跨平台支持:drift支持Android、iOS、macOS、Windows、Linux及Web。课程提供的Flutter待办事项应用程序可在所有平台上运行。 - 经过实战检验和生产就绪:drift经过广泛的单元和集成测试,稳定可靠,支持生产环境中的Flutter应用程序。 通过本课程,学员将掌握Flutter中的SQLite数据库使用和状态管理的相关知识,能够在实际应用中更好地管理数据存储和状态。
In this Flutter course we are going to learn about local data storage using drift package which help us to create and write SQL query more easily, it internally make use of SQLite 3 and work well both with Android and iOS.We will able learn about Flutter state management using Provider package which is really popular among Flutter developers. We will cover basic to advance state management using Provider package.By using provider instead of manually writing InheritedWidget, you get:simplified allocation/disposal of resourceslazy-loadinga vastly reduced boilerplate over making a new class every timedevtool friendly - using Provider, the state of your application will be visible in the Flutter devtoola common way to consume these InheritedWidgets (See Provider.of/Consumer/Selector)increased scalability for classes with a listening mechanism that grows exponentially in complexity (such as ChangeNotifier, which is O(N) for dispatching notifications).Drift is a reactive persistence library for Flutter and Dart, built on top of sqlite. Drift isFlexible: Drift let's you write queries in both SQL and Dart, providing fluent apis for both languages. You can filter and order results or use joins to run queries on multiple tables. You can even use complex sql features like WITH and WINDOW clauses.Feature rich: Drift has builtin support for transactions, schema migrations, complex filters and expressions, batched updates and joins. We even have a builtin IDE for SQL!Modular: Thanks to builtin support for daos and imports in sql files, drift helps you keep your database code simple.Safe: Drift generates typesafe code based on your tables and queries. If you make a mistake in your queries, drift will find it at compile time and provide helpful and descriptive lints.Fast: Even though drift lets you write powerful queries, it can keep up with the performance of key-value stores. Drift is the only major persistence library with builtin threading support, allowing you to run database code across isolates with zero additional effort.Reactive: Turn any sql query into an auto-updating stream! This includes complex queries across many tablesCross-Platform support: Drift works on Android, iOS, macOS, Windows, Linux and the web. This template is a Flutter todo app that works on all platformsBattle tested and production ready: Drift is stable and well tested with a wide range of unit and integration tests. It powers production Flutter apps.