zubairehman / flutter_boilerplate_project

A boilerplate project created in flutter using MobX and Provider.
http://zubairehman.surge.sh/
MIT License
2.26k stars 908 forks source link

Error: Using 'lib/stores/User/user_store.g.dart' #77

Closed wahyukodar closed 3 years ago

wahyukodar commented 3 years ago
lib/stores/User/User_store.dart:7:6: Error: Using 'lib/stores/User/user_store.g.dart' as part of 'package:my_project/stores/User/User_store.dart' but its 'part of' declaration says 'package:my_project/stores/User/user_store.dart'.
part 'user_store.g.dart';
     ^
lib/stores/User/User_store.dart:9:35: Error: Type '_$UserStore' not found.
class UserStore = _UserStore with _$UserStore;
                                  ^^^^^^^^^^^
lib/stores/User/User_store.dart:9:7: Error: The type '_$UserStore' can't be mixed in.
class UserStore = _UserStore with _$UserStore;
import 'package:mobx/mobx.dart';
import 'package:my_project/data/repository/user/user_repository.dart';
import 'package:my_project/models/user/user.dart';
import 'package:my_project/models/user/user_list.dart';
import 'package:my_project/stores/error/error_store.dart';

part 'user_store.g.dart';

class UserStore = _UserStore with _$UserStore;

abstract class _UserStore with Store {
  // repository instance
  UserRepository _repository;

...
}

I already run flutter packages pub run build_runner build --delete-conflicting-outputs

zubairehman commented 3 years ago

are you still facing the same issue?

if so, please clone the project and try again. I have made some updates and hopefully, your issue will be solved