Solved the Problems in Main

This commit is contained in:
Eggmac 2024-02-25 17:22:11 +01:00
parent 237648ee34
commit 6f900ac2f7
2 changed files with 7 additions and 5 deletions

View File

@ -1,9 +1,11 @@
import 'package:flutter/material.dart';
import 'package:learn_project/screens/home.dart';
void main() => runApp(MyApp());
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
@ -11,8 +13,8 @@ class MyApp extends StatelessWidget {
//title: 'Recipes',
theme: ThemeData(
colorScheme: ColorScheme.fromSwatch().copyWith(
primary: Color(0xff263341),
secondary: Color(0xff8DB646), // Your accent color
primary: const Color(0xff263341),
secondary: const Color(0xff8DB646), // Your accent color
),
),
home: HomePage(),

View File

@ -27,7 +27,7 @@ class HomePage extends StatelessWidget {
onPressed: () {},
),
),
SizedBox(
const SizedBox(
height: 60, //height of button
//width of button
width: 10,
@ -39,7 +39,7 @@ class HomePage extends StatelessWidget {
hintStyle: TextStyle(color: Colors.blue),
hintText: "Ingolstadt")),
),
SizedBox(
const SizedBox(
height: 60, //height of button
//width of button
width: 20,