authProvider static method
lib/providers/auth_provider.dart: gives the config to dox_auth
Implementation
static String authProvider(String app) {
return '''
import 'package:dox_auth/dox_auth.dart';
import 'package:dox_core/dox_core.dart';
import 'package:$app/config/auth.dart';
/// Auth provider
/// --------------------------
/// Gives the config of lib/config/auth.dart to dox_auth at startup.
/// If this project does not need auth, delete this file
/// (Dox finds every DoxProvider class, see lib/generated/container.g.dart).
class AppAuthProvider extends DoxProvider {
@override
void setup() {
Auth.initialize(authConfig);
}
}
''';
}