adding basic widget for device managment

This commit is contained in:
ashrafzarkanisala
2024-08-21 00:47:56 +03:00
parent bb959bcc61
commit f773c9e52c
12 changed files with 356 additions and 174 deletions

View File

@ -12,11 +12,10 @@ class WebAppBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BlocBuilder<HomeBloc, HomeState>(builder: (context, state) {
return Container(
height: 100,
decoration: const BoxDecoration(color: ColorsManager.secondaryColor),
padding: const EdgeInsets.all(10),
child: Expanded(
return Container(
height: 100,
decoration: const BoxDecoration(color: ColorsManager.secondaryColor),
padding: const EdgeInsets.all(10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -52,17 +51,16 @@ class WebAppBar extends StatelessWidget {
const SizedBox(
width: 10,
),
if(HomeBloc.user!=null)
Text(
'${HomeBloc.user!.firstName.toString() ?? ''} ${HomeBloc.user!.lastName.toString() ?? ''} ',
style: Theme.of(context).textTheme.bodyLarge,
),
if (HomeBloc.user != null)
Text(
'${HomeBloc.user!.firstName.toString()} ${HomeBloc.user!.lastName.toString()} ',
style: Theme.of(context).textTheme.bodyLarge,
),
],
)
],
),
),
);
});
);
});
}
}