INNER CODE UNIT · Dart

MyApp

mu-fazil-vk/FluxTube · lib/main.dart:54

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
  @override
  void initState() {
    super.initState();
    WidgetsBinding.instance.addObserver(this);
    // Initialize services after the first frame
    // This ensures the Activity is fully attached and can show permission dialogs
    WidgetsBinding.instance.addPostFrameCallback((_) {
      DownloadNotificationService().initialize();
      // Initialize audio service for background playback notification controls
      initAudioService();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…