Skip to content
Snippets Groups Projects
Commit a81cb7cb authored by benedikts's avatar benedikts Committed by Anager
Browse files

Improved look of ProfileEntry class

parent d6c30587
No related branches found
No related tags found
1 merge request!2Home page chaitanya
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:deggendorf_app/bottom_navigation_bar_buttons/settings/settings.dart';
class Profile extends StatefulWidget { class Profile extends StatefulWidget {
const Profile({Key? key}) : super(key: key); const Profile({Key? key}) : super(key: key);
...@@ -20,12 +18,7 @@ class _ProfilePage extends State<Profile> { ...@@ -20,12 +18,7 @@ class _ProfilePage extends State<Profile> {
appBar: AppBar( appBar: AppBar(
title: const Text('Konto'), title: const Text('Konto'),
actions: <Widget>[ actions: <Widget>[
IconButton(onPressed:(){ IconButton(onPressed: null, icon: Icon(Icons.settings))
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const SettingScreen()),
);
}, icon: Icon(Icons.settings))
], ],
backgroundColor: Colors.brown, backgroundColor: Colors.brown,
), ),
...@@ -66,9 +59,9 @@ class _ProfilePage extends State<Profile> { ...@@ -66,9 +59,9 @@ class _ProfilePage extends State<Profile> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
ProfileEntry( ProfileEntry(
category: "Name", description: "Very long example Name"), category: "Name", description: "A very long example Name"),
ProfileEntry(category: "Age", description: "123"), ProfileEntry(category: "Age", description: "123"),
ProfileEntry(category: "Birthday", description: "12.34.") ProfileEntry(category: "Birthday", description: "30.02.")
], ],
), ),
) )
...@@ -94,31 +87,27 @@ class ProfileEntry extends StatefulWidget { ...@@ -94,31 +87,27 @@ class ProfileEntry extends StatefulWidget {
class _ProfileEntryState extends State<ProfileEntry> { class _ProfileEntryState extends State<ProfileEntry> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return TextButton( return Row(
onPressed: () { }, children: [
style: TextButton.styleFrom(primary: Colors.brown), Expanded(
child: Row( flex: 30,
children: [ child: Container(
Expanded( padding: EdgeInsets.fromLTRB(0, 5, 10, 5),
flex: 30, child: Text(
child: Container( widget.category + ":",
padding: EdgeInsets.fromLTRB(0, 5, 10, 5), textAlign: TextAlign.right,
child: Text(
widget.category + ":",
textAlign: TextAlign.right,
),
), ),
), ),
Expanded( ),
flex: 70, Expanded(
child: Container( flex: 70,
padding: const EdgeInsets.fromLTRB(10, 5, 0, 5), child: Container(
child: Text(widget.description), padding: const EdgeInsets.fromLTRB(10, 5, 0, 5),
), child: Text(widget.description),
) ),
], )
), ],
); );
} }
} }
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