From 98b45aabca86f8d74c5d080e7a89a562884befee Mon Sep 17 00:00:00 2001 From: 98spag Date: Fri, 16 Jun 2023 12:10:48 +0200 Subject: [PATCH] feat: change profile button --- lib/android/pages/nav_pages/main_page.dart | 35 ++++++++++++---------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/lib/android/pages/nav_pages/main_page.dart b/lib/android/pages/nav_pages/main_page.dart index 1c51891..d11c689 100644 --- a/lib/android/pages/nav_pages/main_page.dart +++ b/lib/android/pages/nav_pages/main_page.dart @@ -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 { @override Widget build(BuildContext context) { - final Box box = Hive.box("USER_BOX"); return Scaffold( extendBodyBehindAppBar: false, appBar: AppBar( @@ -54,17 +50,26 @@ class MainPageState extends State { ), ), ElevatedButton( - onPressed: () async { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => const SettingsPage()), - ); - }, - child: ProfilePicture( - name: "${box.get("FIRST_NAME_FIELD")}", - radius: 16, - fontsize: 14, - )) + onPressed: () async { + Navigator.push( + context, + MaterialPageRoute(builder: (context) => const SettingsPage()), + ); + }, + 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,