feat: change profile button
parent
686657628a
commit
98b45aabca
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue