mirror of https://github.com/AMT-Cheif/drift.git
`Map<String, Object>` -> `Map<String, dynamic>`
This commit is contained in:
parent
c13b0ff17f
commit
c24f3caff2
|
@ -23,7 +23,7 @@ class TodoEntry {
|
||||||
category: intType.mapFromDatabaseResponse(data['category']),
|
category: intType.mapFromDatabaseResponse(data['category']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Map<String, Object> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return {
|
return {
|
||||||
'id': id,
|
'id': id,
|
||||||
'content': content,
|
'content': content,
|
||||||
|
@ -137,7 +137,7 @@ class Category {
|
||||||
description: stringType.mapFromDatabaseResponse(data['`desc`']),
|
description: stringType.mapFromDatabaseResponse(data['`desc`']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Map<String, Object> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return {
|
return {
|
||||||
'id': id,
|
'id': id,
|
||||||
'description': description,
|
'description': description,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:recase/recase.dart';
|
|
||||||
import 'package:moor_generator/src/model/specified_table.dart';
|
import 'package:moor_generator/src/model/specified_table.dart';
|
||||||
|
import 'package:recase/recase.dart';
|
||||||
|
|
||||||
class DataClassWriter {
|
class DataClassWriter {
|
||||||
final SpecifiedTable table;
|
final SpecifiedTable table;
|
||||||
|
@ -98,7 +98,7 @@ class DataClassWriter {
|
||||||
}
|
}
|
||||||
|
|
||||||
void _writeToJson(StringBuffer buffer) {
|
void _writeToJson(StringBuffer buffer) {
|
||||||
buffer.write('Map<String, Object> toJson() {\n return {');
|
buffer.write('Map<String, dynamic> toJson() {\n return {');
|
||||||
|
|
||||||
for (var column in table.columns) {
|
for (var column in table.columns) {
|
||||||
final getter = column.dartGetterName;
|
final getter = column.dartGetterName;
|
||||||
|
|
Loading…
Reference in New Issue