| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -21,15 +21,19 @@ void main() async {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  // widget bindings are initialized already.
 | 
					 | 
					 | 
					 | 
					  // widget bindings are initialized already.
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  WidgetsFlutterBinding.ensureInitialized();
 | 
					 | 
					 | 
					 | 
					  WidgetsFlutterBinding.ensureInitialized();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  final backgroundMode = PlatformInfos.isAndroid &&
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					      AppLifecycleState.detached == WidgetsBinding.instance.lifecycleState;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  Logs().nativeColors = !PlatformInfos.isIOS;
 | 
					 | 
					 | 
					 | 
					  Logs().nativeColors = !PlatformInfos.isIOS;
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  final store = await SharedPreferences.getInstance();
 | 
					 | 
					 | 
					 | 
					  final store = await SharedPreferences.getInstance();
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  final clients = await ClientManager.getClients(store: store);
 | 
					 | 
					 | 
					 | 
					  final clients = await ClientManager.getClients(
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    store: store,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    initialize: !backgroundMode,
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  );
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  // If the app starts in detached mode, we assume that it is in
 | 
					 | 
					 | 
					 | 
					  // If the app starts in detached mode, we assume that it is in
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  // background fetch mode for processing push notifications. This is
 | 
					 | 
					 | 
					 | 
					  // background fetch mode for processing push notifications. This is
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  // currently only supported on Android.
 | 
					 | 
					 | 
					 | 
					  // currently only supported on Android.
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  if (PlatformInfos.isAndroid &&
 | 
					 | 
					 | 
					 | 
					  if (backgroundMode) {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      AppLifecycleState.detached == WidgetsBinding.instance.lifecycleState) {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    // In the background fetch mode we do not want to waste ressources with
 | 
					 | 
					 | 
					 | 
					    // In the background fetch mode we do not want to waste ressources with
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    // starting the Flutter engine but process incoming push notifications.
 | 
					 | 
					 | 
					 | 
					    // starting the Flutter engine but process incoming push notifications.
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    BackgroundPush.clientOnly(clients.first);
 | 
					 | 
					 | 
					 | 
					    BackgroundPush.clientOnly(clients.first);
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |