mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
get user info and access management page
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_web/pages/home/bloc/home_bloc.dart';
|
||||
import 'package:syncrow_web/pages/home/bloc/home_state.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
|
||||
class WebAppBar extends StatelessWidget {
|
||||
@ -8,7 +11,8 @@ class WebAppBar extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
return BlocBuilder<HomeBloc, HomeState>(builder: (context, state) {
|
||||
return Container(
|
||||
height: 120,
|
||||
decoration: const BoxDecoration(color: ColorsManager.secondaryColor),
|
||||
padding: const EdgeInsets.all(10),
|
||||
@ -48,8 +52,9 @@ class WebAppBar extends StatelessWidget {
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
if(HomeBloc.user!=null)
|
||||
Text(
|
||||
'mohamamd alnemer ',
|
||||
'${HomeBloc.user!.firstName.toString() ?? ''} ${HomeBloc.user!.lastName.toString() ?? ''} ',
|
||||
style: Theme.of(context).textTheme.bodyLarge,
|
||||
),
|
||||
],
|
||||
@ -58,5 +63,6 @@ class WebAppBar extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user