Skip to content
Snippets Groups Projects
Commit 406c3f47 authored by simda545's avatar simda545
Browse files

labb0 färdig

parent 70fab626
No related branches found
No related tags found
No related merge requests found
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',
),
),
),
],
),
),
),
],
),
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment