Skip to content
Snippets Groups Projects
Commit c0305201 authored by benedikts's avatar benedikts
Browse files

Implemented crude look of Profile page

Created ProfileEntry class
parent 0dff5680
No related branches found
No related tags found
2 merge requests!1Profile benedikt,!2Home page chaitanya
assets/defaultProfilePicture.png

23.3 KiB

import 'package:flutter/material.dart';
import '../../main.dart';
class Profile extends StatefulWidget {
const Profile({Key? key}) : super(key: key);
@override
_ProfilePage createState() => _ProfilePage();
}
/*
profile Page
*/
class Profile extends StatelessWidget {
const Profile({Key? key}) : super(key: key);
class _ProfilePage extends State<Profile> {
@override
Widget build(BuildContext context) {
return Scaffold(
......@@ -18,8 +23,85 @@ class Profile extends StatelessWidget {
],
backgroundColor: Colors.brown,
),
body: const Center(
child: Text("Diese Seite wurde noch nicht entwickelt!!!")),
body: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(30),
child: Container(
alignment: Alignment.center,
decoration: BoxDecoration(
color: Colors.brown, shape: BoxShape.rectangle),
child: Padding(
padding: const EdgeInsets.all(5),
child: Text(
"Example Username",
maxLines: 2,
textScaleFactor: 2,
textAlign: TextAlign.center,
),
)),
),
Container(
alignment: Alignment.center,
decoration:
BoxDecoration(color: Colors.brown, shape: BoxShape.circle),
child: Padding(
padding: const EdgeInsets.all(5),
child: CircleAvatar(
radius: 60,
backgroundColor: Colors.brown,
backgroundImage:
AssetImage('assets/defaultProfilePicture.png'),
),
)),
Padding(
padding: const EdgeInsets.fromLTRB(30, 10, 30, 20),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ProfileEntry(
category: "Name", description: "A very long example Name"),
ProfileEntry(category: "Age", description: "123"),
ProfileEntry(category: "Birthday", description: "30.02.")
],
),
)
],
),
//const Center(child: Text("Diese Seite wurde noch nicht entwickelt!!!")),
);
}
}
class ProfileEntry extends StatefulWidget {
var category;
var description;
ProfileEntry({Key? key, required this.category, required this.description})
: super(key: key);
@override
_ProfileEntryState createState() => _ProfileEntryState();
}
class _ProfileEntryState extends State<ProfileEntry> {
@override
Widget build(BuildContext context) {
return Row(
children: [
Padding(
padding: const EdgeInsets.fromLTRB(0, 5, 70, 5),
child: Text(
widget.category,
textAlign: TextAlign.center,
),
),
Padding(
padding: const EdgeInsets.fromLTRB(10, 5, 0, 5),
child: Text(widget.description, textAlign: TextAlign.center),
)
],
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment