feat: change profile button

main
98spag 2023-06-16 12:10:48 +02:00
parent 686657628a
commit 98b45aabca
1 changed files with 20 additions and 15 deletions

View File

@ -4,9 +4,6 @@ import 'package:ernaehrung/android/pages/nav_pages/progress_page.dart';
import 'package:ernaehrung/android/pages/nav_pages/today_page.dart';
import 'package:ernaehrung/android/pages/settings.dart';
import 'package:flutter/material.dart';
import 'package:flutter_profile_picture/flutter_profile_picture.dart';
import 'package:hive/hive.dart';
import '../../models/user.dart';
import 'meal_plan_page.dart';
class MainPage extends StatefulWidget {
@ -40,7 +37,6 @@ class MainPageState extends State<MainPage> {
@override
Widget build(BuildContext context) {
final Box box = Hive.box<User>("USER_BOX");
return Scaffold(
extendBodyBehindAppBar: false,
appBar: AppBar(
@ -60,11 +56,20 @@ class MainPageState extends State<MainPage> {
MaterialPageRoute(builder: (context) => const SettingsPage()),
);
},
child: ProfilePicture(
name: "${box.get("FIRST_NAME_FIELD")}",
radius: 16,
fontsize: 14,
))
style: ElevatedButton.styleFrom(
backgroundColor: Colors.green, // Set the background color to green
),
child: Row(
children: const [
Icon(
Icons.account_circle,
size: 30,
color: Colors.white,
),
],
),
)
],
),
backgroundColor: Colors.transparent,