mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-03 23:05:00 -04:00
clean up build
This commit is contained in:
parent
b54868cc55
commit
5703da0802
30 changed files with 377 additions and 74 deletions
|
@ -1,20 +1,38 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'log/loggy.dart';
|
||||
import 'log/state_logger.dart';
|
||||
import 'veilid_support/veilid_log.dart';
|
||||
import 'theme/theme_service.dart';
|
||||
import 'log/log.dart';
|
||||
import 'veilid_support/veilid_support.dart';
|
||||
import 'theming/theming.dart';
|
||||
import 'app.dart';
|
||||
import 'dart:io';
|
||||
|
||||
void main() async {
|
||||
// Disable all debugprints in release mode
|
||||
if (kReleaseMode) {
|
||||
debugPrint = (String? message, {int? wrapWidth}) {};
|
||||
}
|
||||
|
||||
// Print our PID for debugging
|
||||
if (!kIsWeb) {
|
||||
debugPrint('VeilidChat PID: $pid');
|
||||
}
|
||||
|
||||
// Logs
|
||||
initLoggy();
|
||||
initVeilidLog();
|
||||
|
||||
// Run the app
|
||||
// Prepare theme
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
final themeService = await ThemeService.instance;
|
||||
var initTheme = themeService.initial;
|
||||
|
||||
// Start up Veilid and Veilid processor in the background
|
||||
unawaited(initializeVeilid());
|
||||
|
||||
// Run the app
|
||||
// Hot reloads will only restart this part, not Veilid
|
||||
runApp(
|
||||
ProviderScope(
|
||||
observers: const [StateLogger()],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue