I followed the basic example, but when I run the command flutter pub run realm generate, it can’t run forever (about 30 minutes). Please help me. Thank you.
Ran on: Dell | Flutter 3.7.12 | Dart 2.19.6 | realm 1.0.3
What I’ve done:
Restart the terminal
Restart the computer
Repro Steps
Add the code snippet below (app.dart) to a flutter project
Run flutter pub run realm generate
Code Snippet
/lib/app.dart
import 'package:realm/realm.dart'; // import realm package
part 'app.g.dart'; // declare a part file.
@RealmModel() // define a data model class named `_Car`.
class _Car {
late String make;
late String model;
int? kilometers = 500;
}
This is a bit puzzling. Can I ask you to update to latest stable (3.10.1) and remove the realm_generator dev dependency (Realm will pull it in as normal dependency).
Thank you for your help. The problem has been resolved. The problem was caused by my network. I solved using VPN 1.1.1.1 and the command flutter pub run realm generate worked.