diff --git a/TDDE43/labb0/main.dart b/TDDE43/labb0/main.dart new file mode 100644 index 0000000000000000000000000000000000000000..7d628b64a474b996fe60c32bb3a3cae5c754377c --- /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', + ), + ), + ), + ], + ), + ), + ), + ], + ), + ); + } +}