Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target of URI hasn't been generated: ''goods.g.dart''. Try running the generator that will generate the file referenced by the URI. #1129

Open
maralerdene opened this issue Dec 30, 2022 · 0 comments
Labels
problem An unconfirmed bug.

Comments

@maralerdene
Copy link

I want to try hive implementation. But when i add part 'goods.g.dart' it's return below error.

Target of URI hasn't been generated: ''goods.g.dart''. Try running the generator that will generate the file referenced by the URI.

Here is my code:

import 'package:hive/hive.dart';

part 'goods.g.dart';

@HiveType(typeId: 0)
class Goods extends HiveObject {
@HiveField(0)
final String? title;
@HiveField(1)
final String? type;
@HiveField(2)
final int? episodes;
@HiveField(3)
final String? status;
@HiveField(4)
final String? startDate;
@HiveField(5)
final String? endDate;
@HiveField(6)
final String? startingSeason;
@HiveField(7)
final String? broadcastTime;

Goods({
this.title,
this.type,
this.episodes,
this.status,
this.startDate,
this.endDate,
this.startingSeason,
this.broadcastTime,
});
}

Here is my pubspec.yml

d```
ependencies:
flutter:
sdk: flutter

get: ^4.6.5
dio: ^4.0.6
geocoding: ^2.0.5
flutter_svg: ^1.1.5
grouped_list: ^5.1.2
image_picker: ^0.8.6
carousel_slider: ^4.1.1
cupertino_icons: ^1.0.2
dotted_border: ^2.0.0+2
connectivity_plus: ^3.0.2
google_maps_flutter: ^2.2.1
cached_network_image: ^3.2.2
firebase_auth: ^4.1.2
firebase_core: ^2.2.0
cloud_firestore: ^4.2.0
firebase_messaging: ^14.1.2
firebase_dynamic_links: ^5.0.5
hive: ^2.2.3
hive_flutter: ^1.1.0
mime: ^1.0.2
intl: ^0.17.0
timeago: ^3.3.0
share_plus: ^6.3.0
flutter_typeahead: ^4.1.1
pin_code_text_field: ^1.8.0
geolocator: ^9.0.2
otp_autofill: ^2.1.0
firebase_storage: ^11.0.7
provider: ^6.0.4
flutter_local_notifications: ^13.0.0
fluttertoast: ^8.1.2
bubble: ^1.1.9+1
flutter_native_image: ^0.0.6+1
build_runner: ^2.3.3
json_serializable: ^6.5.4
dev_dependencies:
flutter_test:
sdk: flutter

@maralerdene maralerdene added the problem An unconfirmed bug. label Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem An unconfirmed bug.
Projects
None yet
Development

No branches or pull requests

1 participant