- introPage.dart: Convert fireItems to proper static function closure - mainDrawer.dart: Convert unreadCount int to String for Text widget
29 lines
825 B
Dart
29 lines
825 B
Dart
import 'package:comunes_flutter/comunes_flutter.dart';
|
|
import 'package:redux/src/store.dart';
|
|
import 'package:sentry_flutter/sentry_flutter.dart';
|
|
|
|
import 'globals.dart' as globals;
|
|
import 'mainCommon.dart';
|
|
import 'models/appState.dart';
|
|
|
|
Future<void> main() async {
|
|
globals.isDevelopment = false;
|
|
|
|
// Load secrets to get Sentry DSN
|
|
final Map<String, dynamic> secrets = await loadSecrets();
|
|
|
|
await SentryFlutter.init(
|
|
(SentryFlutterOptions options) {
|
|
options.dsn = secrets['sentryDSN'] as String?;
|
|
},
|
|
appRunner: () => mainCommon(<Middleware<AppState>>[]),
|
|
);
|
|
}
|
|
|
|
Future<Map<String, dynamic>> loadSecrets() async {
|
|
return SecretLoader(
|
|
secretPath: globals.isDevelopment
|
|
? 'assets/private-settings-dev.json'
|
|
: 'assets/private-settings.json')
|
|
.load();
|
|
}
|