pro info
This commit is contained in:
@@ -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}');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user