Advertisement
amonnoris

main.dart

Oct 5th, 2024
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.88 KB | Source Code | 0 0
  1. import 'package:flutter/material.dart';
  2. import 'package:provider/provider.dart';
  3. import 'providers/app_state.dart';
  4. import 'pages/main_page.dart'; // Import the MainPage
  5.  
  6. void main() {
  7.   runApp(
  8.     MultiProvider(
  9.       providers: [
  10.         ChangeNotifierProvider(create: (_) => AppState()),
  11.         // Remove ThemeProvider if not needed anymore
  12.       ],
  13.       child: const MyApp(),
  14.     ),
  15.   );
  16. }
  17.  
  18. class MyApp extends StatelessWidget {
  19.   const MyApp({super.key});
  20.  
  21.   @override
  22.   Widget build(BuildContext context) {
  23.     return MaterialApp(
  24.       title: 'Flutter VPN App',
  25.       // Set the dark theme for the entire app
  26.       theme: ThemeData(
  27.         primarySwatch: Colors.blue,
  28.         brightness: Brightness.dark, // Force dark theme
  29.       ),
  30.       home: const MainPage(), // Set MainPage as the home widget
  31.       debugShowCheckedModeBanner: false,
  32.     );
  33.   }
  34. }
  35.  
Tags: Main.dart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement