2023-07-29 18:10:10 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2023-07-30 15:31:36 +02:00
|
|
|
import 'package:fooder/screens/login.dart';
|
2024-08-04 20:14:14 +02:00
|
|
|
import 'package:fooder/context.dart';
|
2024-04-04 19:03:41 +02:00
|
|
|
import 'package:fooder/theme.dart';
|
2023-07-29 20:01:56 +02:00
|
|
|
|
|
|
|
class MyApp extends StatelessWidget {
|
2024-08-04 20:14:14 +02:00
|
|
|
final Context ctx;
|
2024-08-04 19:20:57 +02:00
|
|
|
|
2024-08-04 20:14:14 +02:00
|
|
|
const MyApp({required this.ctx, super.key});
|
2023-07-29 20:01:56 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return MaterialApp(
|
2023-07-30 13:21:45 +02:00
|
|
|
title: 'FOODER',
|
2024-04-04 19:03:41 +02:00
|
|
|
theme: MainTheme.light(),
|
|
|
|
darkTheme: MainTheme.dark(),
|
2024-03-28 16:25:49 +01:00
|
|
|
themeMode: ThemeMode.system,
|
|
|
|
debugShowCheckedModeBanner: false,
|
2023-07-29 20:01:56 +02:00
|
|
|
home: LoginScreen(
|
2024-08-04 20:14:14 +02:00
|
|
|
ctx: ctx,
|
2023-07-29 20:01:56 +02:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2023-07-29 18:10:10 +02:00
|
|
|
|
2024-08-04 19:20:57 +02:00
|
|
|
void main() async {
|
2024-08-04 20:14:14 +02:00
|
|
|
var ctx = await Context.create(
|
2024-08-04 19:20:57 +02:00
|
|
|
baseUrl: 'https://fooderapi.domandoman.xyz/api',
|
|
|
|
);
|
|
|
|
|
2024-08-04 20:14:14 +02:00
|
|
|
runApp(MyApp(ctx: ctx));
|
2023-07-29 18:10:10 +02:00
|
|
|
}
|