Skip to content
Snippets Groups Projects
profile.dart 3.26 KiB

import 'package:flutter/material.dart';

class Profile extends StatefulWidget {
  const Profile({Key? key}) : super(key: key);

  @override
  _ProfilePage createState() => _ProfilePage();
}

/*
profile Page
 */

class _ProfilePage extends State<Profile> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Konto'),
        actions: <Widget>[
          IconButton(onPressed: null, icon: Icon(Icons.settings))
        ],
        backgroundColor: Colors.brown,
      ),
      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: "Very long example Name"),
                ProfileEntry(category: "Age", description: "123"),
                ProfileEntry(category: "Birthday", description: "12.34.")
              ],
            ),
          )
        ],
      ),