Initialize project and update portal port configuration
Set default portal port to 8081, fix Dart build issue in cart screen, and update setup documentation. Co-Authored-By: Oz <oz-agent@warp.dev>
This commit is contained in:
34
lib/main.dart
Normal file
34
lib/main.dart
Normal file
@ -0,0 +1,34 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'screens/auth_gate.dart';
|
||||
import 'services/app_config_service.dart';
|
||||
import 'services/cart_service.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await AppConfigService.instance.initialize();
|
||||
runApp(const EcommercePortalApp());
|
||||
}
|
||||
|
||||
class EcommercePortalApp extends StatelessWidget {
|
||||
const EcommercePortalApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MultiProvider(
|
||||
providers: [
|
||||
ChangeNotifierProvider(create: (_) => CartService()),
|
||||
],
|
||||
child: MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'Flutter E-Commerce Portal',
|
||||
theme: ThemeData(
|
||||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.indigo),
|
||||
useMaterial3: true,
|
||||
),
|
||||
home: const AuthGate(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user