diff --git a/assets/defaultProfilePicture.png b/assets/defaultProfilePicture.png new file mode 100644 index 0000000000000000000000000000000000000000..5d743050db584d75db2c3acde64448c6c023edeb Binary files /dev/null and b/assets/defaultProfilePicture.png differ diff --git a/lib/bottom_navigation_bar_buttons/profile/profile.dart b/lib/bottom_navigation_bar_buttons/profile/profile.dart index 0236506ff003a238fe779d5d431846835b0e7378..547bc8dae865e911565a75ca4ce007c976506e55 100644 --- a/lib/bottom_navigation_bar_buttons/profile/profile.dart +++ b/lib/bottom_navigation_bar_buttons/profile/profile.dart @@ -1,13 +1,18 @@ 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), + ) + ], ); } }