Skip to content

Commit 9a359cc

Browse files
committed
Update documentation
1 parent fe913ad commit 9a359cc

3 files changed

Lines changed: 5 additions & 13 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Provides Flutter-specific widgets and utilities to easily integrate `declarative
3333
A build-time code generator that creates boilerplate code for you, enhancing productivity and reducing errors.
3434

3535
**Key Features:**
36-
- **Typed Record Classes**: Automatically generates typed getters, setters, and `fromMap` constructors for your `DbRecord` classes based on your schema.
36+
- **Typed Record Classes**: Automatically generates typed getters and setters for your `DbRecord` classes based on your schema.
3737
- **Factory Registration**: Generates code to automatically register your typed record factories, simplifying database setup.
3838

3939
### 🚀 Demo Application (`demo`)

declarative_sqlite_generator/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ dev_dependencies:
3535
3636
@GenerateDbRecord('users')
3737
class User extends DbRecord {
38-
User(Map<String, Object?> data, String tableName, DeclarativeDatabase database)
39-
: super(data, tableName, database);
38+
User(Map<String, Object?> data, DeclarativeDatabase database)
39+
: super(data, 'users', database);
4040
4141
// Typed accessors will be generated automatically
4242
// Generated extension will provide:

docs/docs/generator/intro.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,8 @@ part 'task.db.dart';
7575
7676
@GenerateDbRecord('tasks')
7777
class Task extends DbRecord {
78-
// The constructor must match the DbRecord signature.
79-
Task(Map<String, Object?> data, String tableName, DeclarativeDatabase database)
80-
: super(data, tableName, database);
81-
82-
// Convenient getters and setters using the base class methods
83-
String get title => getValue('title')!;
84-
set title(String value) => setValue('title', value);
85-
86-
bool get completed => getValue('completed') == 1;
87-
set completed(bool value) => setValue('completed', value ? 1 : 0);
78+
Task(Map<String, Object?> data, DeclarativeDatabase database)
79+
: super(data, 'tasks', database);
8880
}
8981
```
9082

0 commit comments

Comments
 (0)