fooder-app/lib/main.dart

33 lines
716 B
Dart
Raw Normal View History

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';
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 {
final Context ctx;
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(
ctx: ctx,
2023-07-29 20:01:56 +02:00
),
);
}
}
2023-07-29 18:10:10 +02:00
void main() async {
var ctx = await Context.create(
baseUrl: 'https://fooderapi.domandoman.xyz/api',
);
runApp(MyApp(ctx: ctx));
2023-07-29 18:10:10 +02:00
}