From 406c3f47b0cbca01070153e06c0bb94e0ac1ed1b Mon Sep 17 00:00:00 2001 From: simda545 <simda545@tlvm-4-3-3.ad.liu.se> Date: Fri, 22 Nov 2024 22:15:56 +0100 Subject: [PATCH] =?UTF-8?q?labb0=20f=C3=A4rdig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TDDE43/labb0/main.dart | 92 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 TDDE43/labb0/main.dart diff --git a/TDDE43/labb0/main.dart b/TDDE43/labb0/main.dart new file mode 100644 index 0000000..7d628b6 --- /dev/null +++ b/TDDE43/labb0/main.dart @@ -0,0 +1,92 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(MyApp()); +} + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: ExampleScreen(), + ); + } +} + +class ExampleScreen extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Example 1'), + backgroundColor: Colors.teal, + foregroundColor: Colors.white, + ), + body: Column( + children: [ + Container( + height: MediaQuery.of(context).size.height / 40, + width: MediaQuery.of(context).size.width, + color: const Color.fromARGB(255, 0, 180, 162), + ), + Expanded( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + CircleAvatar( + child: CircleAvatar( + radius: 30, + backgroundColor: Colors.white, + ), + radius: 60, + backgroundColor: Colors.redAccent, + ), + SizedBox(height: 40), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + ElevatedButton( + onPressed: () {}, + child: Text('BUTTON'), + ), + SizedBox(width: 10), + ElevatedButton( + onPressed: () {}, + child: Text('BUTTON'), + ), + ], + ), + SizedBox(height: 40), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + ElevatedButton( + onPressed: () {}, + child: Text('BUTTON'), + ), + SizedBox(width: 10), + ElevatedButton( + onPressed: () {}, + child: Text('BUTTON'), + ), + ], + ), + SizedBox(height: 40), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 30), + child: TextField( + decoration: InputDecoration( + labelText: 'Email', + ), + ), + ), + ], + ), + ), + ), + ], + ), + ); + } +} -- GitLab