Skip to content
Snippets Groups Projects
Commit 1ced495c authored by Anager's avatar Anager
Browse files

Merge remote-tracking branch 'flutter/Profile_Benedikt' into settings_Harald

# Conflicts:
#	lib/main.dart
parents 17d9a8ad 86235b73
No related branches found
No related tags found
1 merge request!2Home page chaitanya
assets/defaultProfilePicture.png

23.3 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.")
],
),
)
],
),
//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 TextButton(
onPressed: () { },
style: TextButton.styleFrom(primary: Colors.brown),
child: Row(
children: [
Expanded(
flex: 30,
child: Container(
padding: EdgeInsets.fromLTRB(0, 5, 10, 5),
child: Text(
widget.category + ":",
textAlign: TextAlign.right,
),
),
),
Expanded(
flex: 70,
child: Container(
padding: const EdgeInsets.fromLTRB(10, 5, 0, 5),
child: Text(widget.description),
),
)
],
),
);
}
}
......@@ -2,6 +2,7 @@ import 'package:deggendorf_app/bottom_navigation_bar_buttons/weather/current_wea
import 'package:flutter/material.dart';
import 'bottom_navigation_bar_buttons/forum/forum.dart';
import 'bottom_navigation_bar_buttons/profile/profile.dart';
import 'bottom_navigation_bar_buttons/settings/settings.dart';
void main() {
......@@ -52,7 +53,6 @@ class _MyHomePageState extends State<MyHomePage> {
//Index: 3
SecondRoute(),
//Index: 4
SettingScreen(),
];
void _onItemTapped(int index) {
......@@ -72,6 +72,7 @@ class _MyHomePageState extends State<MyHomePage> {
body: Center(
child: _widgetOptions.elementAt(_selectedIndex),
),
/*
From here are the bottom navigation bar's buttons
Each button has an icon, a label and a colour, each of which are optional
......@@ -98,11 +99,6 @@ class _MyHomePageState extends State<MyHomePage> {
label: 'Konto',
backgroundColor: Colors.brown,
),
BottomNavigationBarItem(
icon: Icon(Icons.settings),
label: 'Einstellung',
backgroundColor: Colors.pink,
),
],
currentIndex: _selectedIndex,
selectedItemColor: Colors.amber[800],
......
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