색상정보 DB에 넣기 질문
470
작성한 질문수 8
제대로 한것 같은데 에러가 뜨네요 ㅠㅠ
에러 점검 부탁드립니다~~
lib/database/drift_database.dart:34:7: Error: The non-abstract class 'LocalDatabase' is missing implementations for these members:
- GeneratedDatabase.schemaVersion
- QueryExecutorUser.schemaVersion
Try to either
- provide an implementation,
- inherit an implementation from a superclass or mixin,
- mark the class as abstract, or
- provide a 'noSuchMethod' implementation.
class LocalDatabase extends _$LocalDatabase{
^^^^^^^^^^^^^
../../AppData/Local/Pub/Cache/hosted/pub.dev/drift-2.10.0/lib/src/runtime/api/db_base.dart:27:11: Context: 'GeneratedDatabase.schemaVersion' is defined here.
int get schemaVersion;
^^^^^^^^^^^^^
../../AppData/Local/Pub/Cache/hosted/pub.dev/drift-2.10.0/lib/src/runtime/executor/executor.dart:66:11: Context: 'QueryExecutorUser.schemaVersion' is defined here.
int get schemaVersion;
^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.
* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1201
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 7s
Exception: Gradle task assembleDebug failed with exit code 1
답변 1
0
안녕하세요!
특정 프로퍼티들을 까먹으신 듯 합니다.
한번 더 확인 해보시고 못찾으시면 레포지토리 공유해주시면 봐드리도록 하겠습니다!
감사합니다!
0
import 'package:drift/drift.dart';
import 'package:calendar_scheduler/model/category_color.dart';
import 'package:calendar_scheduler/model/schedule.dart';
import 'package:path/path.dart' as p;
import 'package:path_provider/path_provider.dart';
import 'dart:io';
import 'package:drift/native.dart';
part 'drift_database.g.dart';
@DriftDatabase(
tables: [
Schedules,
CategoryColors,
]
)
class LocalDatabase extends _$LocalDatabase{
LocalDatabase() : super(_openConnection());
Future<int> createSchedule(SchedulesCompanion data) =>
into(schedules).insert(data);
Future<int> createCategoryColor(CategoryColorsCompanion data) =>
into(categoryColors).insert(data);
Future<List<CategoryColor>> getCategoryColors() =>
select(categoryColors).get();
@override
int get schemaVerision => 1;
}
LazyDatabase _openConnection(){
return LazyDatabase(()async{
final dbFolder = await getApplicationDocumentsDirectory(); 를 가져옴
final file = File(p.join(dbFolder.path, 'db.sqlite'));
return NativeDatabase(file);
});
}
198강 (){onTap(e);}의 이해 돕기
0
39
1
video_call 플러그인 설치후 에러 발생
0
47
1
SDK 안드로이드 설치 질문!
0
62
1
코드팩토리 디스코드 링크 다시 부탁드려요~
0
92
1
Webview를 이용해서 URL 상의 페이지 출력 불가
0
71
1
홈스크린 함수를 함축해서 main.dart에 옮기는 문제
0
56
1
플레이스토어
0
60
1
아고라 엔진 init 함수의 반환타입이 Future<void> 이것의 의미는 무엇인가요?
0
56
1
가이드라인 질문
0
59
0
emulator 에러 환경설정 뭐가 문제 일까요??
0
78
1
emulator 실행 오류
0
95
3
Column을 가로방향 최대 사이즈를 차지하도록 하는 방법에 관련
0
73
1
pubspec.yaml에서 font를 추가하면서 weight 값을 지정하는 것이 의미가 있는 것인지 문의
0
44
1
setState()를 호출하지 않으면 build가 실행 안되는 건가요?
0
54
1
video_call 플러그인 설치시 에러문제
0
66
1
children 안의 if 문에서 { } 못쓰는 이유?
0
51
1
이렇게 오류가 떠요
0
66
1
AppBar 사용했는데
0
63
2
[문제해결] '오늘도 출첵!' 의 171번 강의에서 중요한 문제를 발견했습니다
0
58
1
StatefulWidget 실습 에러가 발생합니다.[해결완료]
0
65
1
Video Player 프로젝트에 대한 추가 질문
0
54
0
Row위젯이나 column위젯의 위치는 누가 정하나요??
0
43
1
geolocator 오류때문에 개발진행이 불가능입니다
0
64
1
API 관련 이슈
0
89
2





