|  |  |  | @ -1,6 +1,10 @@ | 
		
	
		
			
				|  |  |  |  | // ignore_for_file: always_specify_types | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  | import 'package:easy_localization/easy_localization.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:flutter/material.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:mohem_flutter_app/classes/colors.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:mohem_flutter_app/extensions/int_extensions.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:mohem_flutter_app/extensions/string_extensions.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:mohem_flutter_app/extensions/widget_extensions.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:mohem_flutter_app/generated/locale_keys.g.dart'; | 
		
	
		
			
				|  |  |  |  | import 'package:mohem_flutter_app/ui/marathon/marathon_provider.dart'; | 
		
	
	
		
			
				
					|  |  |  | @ -41,15 +45,29 @@ class MarathonFooter extends StatelessWidget { | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   @override | 
		
	
		
			
				|  |  |  |  |   Widget build(BuildContext context) { | 
		
	
		
			
				|  |  |  |  |     return provider.isUpComingMarathon && !provider.canPlayDemo | 
		
	
		
			
				|  |  |  |  |         ? DefaultButton( | 
		
	
		
			
				|  |  |  |  |     if (provider.isUpComingMarathon && !provider.canPlayDemo) { | 
		
	
		
			
				|  |  |  |  |       return Column( | 
		
	
		
			
				|  |  |  |  |         crossAxisAlignment: CrossAxisAlignment.center, | 
		
	
		
			
				|  |  |  |  |         children: [ | 
		
	
		
			
				|  |  |  |  |           if (provider.isButtonEnabled && (provider.totalSecondsToWaitForMarathon < 30 && provider.totalSecondsToWaitForMarathon > 0)) ...[ | 
		
	
		
			
				|  |  |  |  |             LocaleKeys.pleaseClickButtonToJoinMarathon.tr().toText18(color: MyColors.greenColor, isCentered: true), | 
		
	
		
			
				|  |  |  |  |             20.height, | 
		
	
		
			
				|  |  |  |  |           ] else if (!provider.isButtonEnabled && (provider.totalSecondsToWaitForMarathon <= 0)) ...[ | 
		
	
		
			
				|  |  |  |  |             LocaleKeys.youCannotJoinTheMarathon.tr().toText18(color: MyColors.redColor, isCentered: true), | 
		
	
		
			
				|  |  |  |  |             20.height, | 
		
	
		
			
				|  |  |  |  |           ], | 
		
	
		
			
				|  |  |  |  |           DefaultButton( | 
		
	
		
			
				|  |  |  |  |             LocaleKeys.joinMarathon.tr(), | 
		
	
		
			
				|  |  |  |  |             provider.isButtonEnabled ? () => provider.onJoinMarathonPressed(context) : null, | 
		
	
		
			
				|  |  |  |  |           ).insideContainer | 
		
	
		
			
				|  |  |  |  |         : DefaultButton( | 
		
	
		
			
				|  |  |  |  |             LocaleKeys.joinDemoMarathon.tr(), | 
		
	
		
			
				|  |  |  |  |             () => provider.onJoinDemoMarathonPressed(context), | 
		
	
		
			
				|  |  |  |  |             color: MyColors.yellowColorII, | 
		
	
		
			
				|  |  |  |  |           ).insideContainer; | 
		
	
		
			
				|  |  |  |  |           ) | 
		
	
		
			
				|  |  |  |  |         ], | 
		
	
		
			
				|  |  |  |  |       ).insideContainer; | 
		
	
		
			
				|  |  |  |  |     } else { | 
		
	
		
			
				|  |  |  |  |       return DefaultButton( | 
		
	
		
			
				|  |  |  |  |         LocaleKeys.joinDemoMarathon.tr(), | 
		
	
		
			
				|  |  |  |  |         () => provider.onJoinDemoMarathonPressed(context), | 
		
	
		
			
				|  |  |  |  |         color: MyColors.yellowColorII, | 
		
	
		
			
				|  |  |  |  |       ).insideContainer; | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | } | 
		
	
	
		
			
				
					|  |  |  | 
 |