[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:get_it/get_it_impl.dart': Failed assertion: line 333 pos 7: 'type != null || const Object() is! T': GetIt: The compiler could not infer the type. You have to provide a type and optionally a name. Did you accidentally do var sl=GetIt.instance();
instead of var sl=GetIt.instance;
void main() async { WidgetsFlutterBinding.ensureInitialized(); configureDependencies(); await _init();}
import 'package:injectable/injectable.dart';
import 'package:taktik/injectable.config.dart';
final getIt = GetIt.instance;
@InjectableInit(
initializerName: 'init', // default
preferRelativeImports: true, // default
asExtension: true,
)
void configureDependencies() => getIt.init()();```
`
I tried
Get getIt = GetIt.instance; still didn't work