| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -167,69 +167,71 @@ class _LoginPageState extends State<LoginPage> { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                              ], | 
					 | 
					 | 
					 | 
					                              ], | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            ), | 
					 | 
					 | 
					 | 
					                            ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                          ) | 
					 | 
					 | 
					 | 
					                          ) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    : Center( | 
					 | 
					 | 
					 | 
					                    : Builder( | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        child: Scrollbar( | 
					 | 
					 | 
					 | 
					                        builder: (final context) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                          interactive: true, | 
					 | 
					 | 
					 | 
					                          final branding = Provider.of<Branding>(context, listen: false); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                          child: SingleChildScrollView( | 
					 | 
					 | 
					 | 
					                          return Center( | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            padding: const EdgeInsets.symmetric(vertical: 40, horizontal: 20), | 
					 | 
					 | 
					 | 
					                            child: Scrollbar( | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            primary: true, | 
					 | 
					 | 
					 | 
					                              interactive: true, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            child: Column( | 
					 | 
					 | 
					 | 
					                              child: SingleChildScrollView( | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                              children: [ | 
					 | 
					 | 
					 | 
					                                padding: const EdgeInsets.symmetric(vertical: 40, horizontal: 20), | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                SvgPicture.asset( | 
					 | 
					 | 
					 | 
					                                primary: true, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                  'assets/logo.svg', | 
					 | 
					 | 
					 | 
					                                child: Column( | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                  width: 100, | 
					 | 
					 | 
					 | 
					                                  children: [ | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                  height: 100, | 
					 | 
					 | 
					 | 
					                                    branding.logo, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                ), | 
					 | 
					 | 
					 | 
					                                    Text( | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                Text( | 
					 | 
					 | 
					 | 
					                                      branding.name, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                  Provider.of<Branding>(context, listen: false).name, | 
					 | 
					 | 
					 | 
					                                      style: Theme.of(context).textTheme.titleLarge, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                  style: Theme.of(context).textTheme.titleLarge, | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                ), | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                const SizedBox( | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                  height: 30, | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                ), | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                Text(AppLocalizations.of(context).loginWorksWith), | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                const SizedBox( | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                  height: 20, | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                ), | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                const NextcloudLogo(), | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                Form( | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                  key: _formKey, | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                  child: TextFormField( | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    focusNode: _focusNode, | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    decoration: const InputDecoration( | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                      hintText: 'https://...', | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    ), | 
					 | 
					 | 
					 | 
					                                    ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    keyboardType: TextInputType.url, | 
					 | 
					 | 
					 | 
					                                    const SizedBox( | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    initialValue: widget.serverURL, | 
					 | 
					 | 
					 | 
					                                      height: 30, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    validator: (final input) => validateHttpUrl(context, input), | 
					 | 
					 | 
					 | 
					                                    ), | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    onFieldSubmitted: (final input) { | 
					 | 
					 | 
					 | 
					                                    Text(AppLocalizations.of(context).loginWorksWith), | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                      if (_formKey.currentState!.validate()) { | 
					 | 
					 | 
					 | 
					                                    const SizedBox( | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                        _loginBloc.setServerURL(input); | 
					 | 
					 | 
					 | 
					                                      height: 20, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                      } else { | 
					 | 
					 | 
					 | 
					                                    ), | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                        _focusNode.requestFocus(); | 
					 | 
					 | 
					 | 
					                                    const NextcloudLogo(), | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                      } | 
					 | 
					 | 
					 | 
					                                    Form( | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    }, | 
					 | 
					 | 
					 | 
					                                      key: _formKey, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                  ), | 
					 | 
					 | 
					 | 
					                                      child: TextFormField( | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                ), | 
					 | 
					 | 
					 | 
					                                        focusNode: _focusNode, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                NeonLinearProgressIndicator( | 
					 | 
					 | 
					 | 
					                                        decoration: const InputDecoration( | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                  visible: serverConnectionStateSnapshot.data == ServerConnectionState.loading, | 
					 | 
					 | 
					 | 
					                                          hintText: 'https://...', | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                        ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                        keyboardType: TextInputType.url, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                        initialValue: widget.serverURL, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                        validator: (final input) => validateHttpUrl(context, input), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                        onFieldSubmitted: (final input) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                          if (_formKey.currentState!.validate()) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                            _loginBloc.setServerURL(input); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                          } else { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                            _focusNode.requestFocus(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                          } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                        }, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                      ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                    ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                    NeonLinearProgressIndicator( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                      visible: serverConnectionStateSnapshot.data == ServerConnectionState.loading, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                    ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                    if (serverConnectionStateSnapshot.data == ServerConnectionState.unreachable) ...[ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                      NeonException( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                        AppLocalizations.of(context).errorUnableToReachServer, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                        onRetry: _loginBloc.refresh, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                      ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                    ], | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                    if (serverConnectionStateSnapshot.data == | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                        ServerConnectionState.maintenanceMode) ...[ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                      NeonException( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                        AppLocalizations.of(context).errorServerInMaintenanceMode, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                        onRetry: _loginBloc.refresh, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                      ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                    ], | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                                  ], | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                ), | 
					 | 
					 | 
					 | 
					                                ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                if (serverConnectionStateSnapshot.data == ServerConnectionState.unreachable) ...[ | 
					 | 
					 | 
					 | 
					                              ), | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                  NeonException( | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    AppLocalizations.of(context).errorUnableToReachServer, | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    onRetry: _loginBloc.refresh, | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                  ), | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                ], | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                if (serverConnectionStateSnapshot.data == ServerConnectionState.maintenanceMode) ...[ | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                  NeonException( | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    AppLocalizations.of(context).errorServerInMaintenanceMode, | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                    onRetry: _loginBloc.refresh, | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                  ), | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                                ], | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                              ], | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                            ), | 
					 | 
					 | 
					 | 
					                            ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                          ), | 
					 | 
					 | 
					 | 
					                          ); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                        ), | 
					 | 
					 | 
					 | 
					                        }, | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                      ), | 
					 | 
					 | 
					 | 
					                      ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					              ), | 
					 | 
					 | 
					 | 
					              ), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            ), | 
					 | 
					 | 
					 | 
					            ), | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |