This commit is contained in:
Felipe
2024-03-18 17:46:03 -05:00
parent b7b66c389f
commit bb840260ba
15 changed files with 259 additions and 30 deletions
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
import 'package:prosappco/components/general_drawer.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:professional_repository/professional_repository.dart';
import 'package:prosappco/blocs/professional_bloc/professional_bloc.dart';
class ProfessionalProfileScreen extends StatefulWidget {
const ProfessionalProfileScreen({super.key});
@@ -14,11 +16,34 @@ class _ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Perfil Profesional'),
title: const Text('Perfil Profesional'),
),
body: Center(
child: Text('Perfil profesional'),
body: BlocBuilder<ProfessionalBloc, ProfessionalState>(
builder: (context, state) {
return Scaffold(
body: Center(
child: content(context, state),
),
);
},
),
);
}
content(BuildContext context, ProfessionalState state) {
if (state is LoadedModeProState) {
if (state.isProModeActive) {
if (state.proInfo == null) {
return const Text('Loading...');
} else {
return body(state.proInfo!);
}
}
}
return const Text('Go back');
}
body(ProfessionalEntity proInfo) {
return Text('Bienvenido Profesional ${proInfo.address}');
}
}