clear before notificaciones
This commit is contained in:
+1
-6
@@ -6,7 +6,6 @@ import 'package:prosappco/blocs/my_user_bloc/my_user_bloc.dart';
|
||||
import 'package:prosappco/blocs/professional_bloc/professional_bloc.dart';
|
||||
import 'package:prosappco/blocs/professional_profile_bloc/professional_profile_bloc.dart';
|
||||
import 'package:prosappco/blocs/profile_bloc/profile_bloc.dart';
|
||||
import 'package:prosappco/blocs/score_bloc/score_bloc.dart';
|
||||
|
||||
import 'app_view.dart';
|
||||
|
||||
@@ -23,9 +22,6 @@ class MainApp extends StatelessWidget {
|
||||
BlocProvider<MyUserBloc>(
|
||||
create: (context) => Injector.appInstance.get<MyUserBloc>(),
|
||||
),
|
||||
// BlocProvider<ScoreBloc>(
|
||||
// create: (context) => Injector.appInstance.get(),
|
||||
// ),
|
||||
BlocProvider<ProfileBloc>(
|
||||
create: (context) => Injector.appInstance.get<ProfileBloc>(),
|
||||
),
|
||||
@@ -33,8 +29,7 @@ class MainApp extends StatelessWidget {
|
||||
create: (context) => Injector.appInstance.get<ProfessionalBloc>(),
|
||||
),
|
||||
BlocProvider<ProfessionalProfileBloc>(
|
||||
create: (context) =>
|
||||
Injector.appInstance.get<ProfessionalProfileBloc>(),
|
||||
create: (context) => Injector.appInstance.get<ProfessionalProfileBloc>(),
|
||||
)
|
||||
],
|
||||
child: BlocBuilder<MyUserBloc, MyUserState>(
|
||||
|
||||
+5
-4
@@ -37,16 +37,17 @@ class MyAppView extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
home: BlocBuilder<AuthenticationBloc, AuthenticationState>(
|
||||
builder: (context, state) {
|
||||
return getScreen(state);
|
||||
}),
|
||||
builder: (context, state) {
|
||||
return getScreen(state);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
getScreen(AuthenticationState state) {
|
||||
switch (state.status) {
|
||||
case AuthenticationStatus.authenticated:
|
||||
return const HomeScreen();
|
||||
return HomeScreen();
|
||||
|
||||
case AuthenticationStatus.unauthenticated:
|
||||
return WelcomeScreen();
|
||||
|
||||
@@ -163,12 +163,6 @@
|
||||
// }
|
||||
// }
|
||||
|
||||
// // splash: 'images/splashgif.gif',
|
||||
// // backgroundColor: Colors.black,
|
||||
// // nextScreen: const LoginScreen(),
|
||||
// // splashIconSize: 50,
|
||||
// // duration: 80000,
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
@@ -62,6 +62,7 @@ class ScheduleItem extends StatelessWidget {
|
||||
visible: schedule.enabled,
|
||||
child: hoursRangesBody(context),
|
||||
),
|
||||
const Divider(),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -486,6 +486,18 @@ class _UserMapScreenState extends State<UserMapScreen> {
|
||||
} else {
|
||||
// TODO: error inesperado
|
||||
}
|
||||
|
||||
// clear inputs
|
||||
fechaSeleccionada = null;
|
||||
horaSeleccionada = null;
|
||||
profesionalSeleccionado = null;
|
||||
isClearButtonVisible = false;
|
||||
_observationController.text = '';
|
||||
serviceLocationPreference = null;
|
||||
|
||||
polylines.clear();
|
||||
markers.clear();
|
||||
setState(() {});
|
||||
},
|
||||
style: FilledButton.styleFrom(
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
|
||||
@@ -9,6 +9,7 @@ import 'package:intl/intl.dart';
|
||||
import 'package:professional_repository/professional_repository.dart';
|
||||
import 'package:prosappco/blocs/service_bloc/service_bloc.dart';
|
||||
import 'package:prosappco/components/general_primary_button.dart';
|
||||
import 'package:prosappco/components/general_secondary_button.dart';
|
||||
import 'package:service_repository/service_repository.dart';
|
||||
import 'package:setting_repository/setting_repository.dart';
|
||||
import 'package:user_repository/user_repository.dart';
|
||||
@@ -245,8 +246,17 @@ class _UserServiceScreenState extends State<UserServiceScreen> {
|
||||
Expanded(
|
||||
child: customMessageStatus(service),
|
||||
),
|
||||
customButton(service, context),
|
||||
const SizedBox(height: 20),
|
||||
const Divider(
|
||||
height: 1,
|
||||
thickness: 0.5,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 10,
|
||||
horizontal: 15,
|
||||
),
|
||||
child: customButton(service, context),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -341,10 +351,10 @@ class _UserServiceScreenState extends State<UserServiceScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
GeneralPrimaryButton customButton(
|
||||
GeneralSecondaryButton customButton(
|
||||
ServiceEntity service, BuildContext context) {
|
||||
if (service.status == ServiceStatus.pending) {
|
||||
return GeneralPrimaryButton(
|
||||
return GeneralSecondaryButton(
|
||||
onPressed: () {
|
||||
final currentState = context.read<ServiceBloc>().state;
|
||||
if (currentState is ServiceLoaded) {
|
||||
@@ -361,7 +371,7 @@ class _UserServiceScreenState extends State<UserServiceScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
return GeneralPrimaryButton(
|
||||
return GeneralSecondaryButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user