Flutter Web - doesn't take a space bar key in TextFields - textfield

when I press the space bar, the space does not appear and by continuing to press it, a "." and it no longer allows me to edit the text.
I state that duranter the debug works correctly but using publishing the website does not work anymore.
i am using the command: flutter build web --web-renderer html --release for deploy webapp.
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.6 21G115 darwin-arm,
locale it-IT)
• Flutter version 3.0.5 at /Users/mauriziomancini/FlutterDev/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f1875d570e (2 mesi fa), 2022-07-13 11:24:16 -0700
• Engine revision e85ea0e79c
• Dart version 2.17.6
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK
version 33.0.0-rc1)
• Android SDK at /Users/mauriziomancini/Library/Android/sdk
• Platform android-33, build-tools 33.0.0-rc1
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
[✓] VS Code (version 1.71.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.48.0
[✓] Connected device (3 available)
• iPhone 14 Pro Max (mobile) • 8D8DCB54-F212-4551-9CD4-B367955056BB • ios •
com.apple.CoreSimulator.SimRuntime.iOS-16-0 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.6 21G115 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 105.0.5195.125
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
here you will find an excerpt of the code
Scaffold(
appBar: AppBar(
backgroundColor: coloreApp,
title: Image.asset("lib/assets/titolo.png"),
actions: [
IconButton(
onPressed: () async {
await FirebaseAuth.instance.signOut();
setState(() {});
},
icon: const Icon(Icons.login_rounded),
),
],
),
body: SingleChildScrollView(
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(20),
child: SizedBox(
child: Image.asset("lib/assets/icona.png"),
height: 80,
),
),
Padding(
padding: const EdgeInsets.all(paddingNumber),
child: TextField(
controller: emailController,
keyboardType: TextInputType.emailAddress,
decoration: inputDecoration("Email"),
),
),
Padding(
padding: const EdgeInsets.all(paddingNumber),
child: TextField(
controller: passwordController,
obscureText: true,
keyboardType: TextInputType.visiblePassword,
decoration: inputDecoration("Password"),
),
),
],
)),
);
you can find a non-working example on www.leonardowebapp.it

Since you can scroll using spacebar also, most probably when you hit space its getting captured by scroll. Check if configuring shortcuts in MaterialApp helps - -
#override
Widget build(BuildContext context) {
final shortcuts = Map.of(WidgetsApp.defaultShortcuts);
shortcuts[LogicalKeySet(LogicalKeyboardKey.space)] = ActivateIntent();
return MaterialApp(
shortcuts: kIsWeb? shortcuts : null,
scrollBehavior: MyCustomScrollBehavior(),
home: HomeScreen(),
);
}

Related

Vuepress multiple sidebar don't show all items

I'm learning about vuepress and i'm trouble to config the sidbar.
Description
Following the docs I replicated the multiple-sidebar configuration without success.
Only the first path it is showed. What am i doing worg?
My config js:
module.exports = {
title: "Jhonatan Morais",
description: "Welcome to my documentation site",
editLinks: true,
smoothScroll: true,
themeConfig: {
sidebar: {
"/foo/": ["", "one"],
"/bar/": ["", "three"],
// fallback
"/": ["" /* / */],
},
},
postcss: {
plugins: [require("autoprefixer"), require("tailwindcss")("./tailwind.js")],
},
};
My project organization
My render results from yarn docs:dev
Some others details
If i browse the pages by url they are there
Here is my system info:
Environment Info:
System:
OS: Windows
CPU: (8) x64 Intel(R) Core(TM) i7-4770 CPU # 3.40GHz
Binaries:
Node: 10.16.2 - C:\Users\JHONAT~1.MOR\AppData\Local\Temp\yarn--1593443655966-0.6783257365479927\node.CMD
Yarn: 1.22.4 - C:\Users\JHONAT~1.MOR\AppData\Local\Temp\yarn--1593443655966-0.6783257365479927\yarn.CMD
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
npmPackages:
#vuepress/core: 1.5.2
#vuepress/theme-default: 1.5.2
vuepress: ^1.5.2 => 1.5.2
npmGlobalPackages:
vuepress: Not Found
I believe this is working as designed. You will only see the /foo/ sidebar when the route starts with /foo/. So, you won't see the /bar/ sidebar until you go to a route/page that starts with /bar/. You may want to use Sidebar Groups if you want to group links together in a single sidebar that is displayed for every route.

TextInput event onContentSizeChange not firing

I am trying to make my TextInput grow in height when the entered text reaches the second line. However I don't receive an event when my text gets wrapped to the second line (without using a new line character). This results in partial hiding of the text within the input.
From the documentation I can not find any event which returns content size besides onContentSizeChange.
I am testing on an Android device.
I can not upgrade React-Native, I am stuck on 0.58.1
class SomeComponent extends React.component
{
...
handleContentSizeChange = (event) => {
console.log('Handling contentSizeChange');
}
render() {
return (
<TextInput ... multiline={true} onContentSizeChange={this.handleContentSizeChange}/>
)
}
}
React Native Environment Info:
System:
OS: macOS 10.15.4
CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU # 2.60GHz
Memory: 882.73 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.8.0 - ~/.nvm/versions/node/v11.8.0/bin/node
Yarn: 1.5.1 - /usr/local/bin/yarn
npm: 6.5.0 - ~/.nvm/versions/node/v11.8.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 21, 23, 26, 27, 28, 29
Build Tools: 27.0.0, 27.0.3, 28.0.0, 28.0.2, 28.0.3, 29.0.0
System Images: android-22 | Google APIs Intel x86 Atom, android-26 | Google Play Intel x86 Atom, chromeos-67 | Chrome OS 67
IDEs:
Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.58.1 => 0.58.1
npmGlobalPackages:
react-native-cli: 2.0.1
You shouldn't need to use onContentSizeChange at all. The height should increase automatically as you type, provided you haven't fixed a height for the input or have limited it by fixed heights of the components around it.

Can not find PsiClass in my Intellij plugin project

Many tutorials mention a class - PsiClass, but I can't find this class in my project.
My build.gradle as below:
plugins {
id 'java'
id 'org.jetbrains.intellij' version '0.4.16'
id 'org.jetbrains.kotlin.jvm' version '1.3.61'
id 'idea'
}
apply plugin: "org.jetbrains.intellij"
apply plugin: 'java'
apply plugin: 'idea'
group 'com.github.boybeak.adapter'
version '0.1'
sourceCompatibility = 1.8
repositories {
/*google()
jcenter()*/
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
// implementation group: 'com.github.boybeak', name: 'any-adapter', version: '1.1.2'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
intellij {
/*version '192.7142.36'*/
type 'AI'
plugins 'android'
localPath '/Applications/Android Studio.app'
}
My IDEA version:
IntelliJ IDEA 2019.3.1 (Community Edition)
Build #IC-193.5662.53, built on December 18, 2019
Runtime version: 11.0.5+10-b520.17 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.3
GC: ParNew, ConcurrentMarkSweep
Memory: 990M
Cores: 4
Registry:
Non-Bundled Plugins: DBN, OdpsStudio, no.tornado.tornadofx.idea
Should I add some more libraries in my project?
After a little more searching, I find a solution.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/360005055559-Missing-classes-after-upgrade-to-2019-2-2
Change my Gradle like this:
intellij {
/*version '192.7142.36'*/
type 'AI'
plugins 'android', 'java'
localPath '/Applications/Android Studio.app'
}
Add Java plugin after android
Adding a Kotlin Script solution if you're using build.gradle.kts
intellij {
...
setPlugins("java")
}
The newest Idea Plugin template suggests gradle.properties as a source of plugin dependencies
// gradle.properties
platformPlugins = ...
// build.gradle.kts
val platformPlugins: String by project
intellij {
setPlugins(*platformPlugins.split(',').map(String::trim).filter(String::isNotEmpty).toTypedArray())
}
I was able to fix this by adding this to the build.gradle.kts file:
intellij {
version.set("2021.3.3")
type.set("IC") // Target IDE Platform
plugins.set(listOf("com.intellij.java")) // Add this
}
When I did that, this little guy popped up:
I clicked on that and then I was able to import the PsiClass.

How to disable autolinking on iOS?

I've installed react-native-localization in my react native project (v0.6). Library is not supporting autolinker yet so I need to disable it for iOS and Android in react-native.config.js.
I already tried to add dependencies in react-native.config.js. After that, I did react-native link react-native-localization command and build an app.
This is my react-native.config.js file:
'use strict';
const ios = require('#react-native-community/cli-platform-ios');
const android = require('#react-native-community/cli-platform-android');
module.exports = {
dependencies: {
'react-native-localization': {
platforms: {
android: null, // disable Android platform, other platforms will still autolink if provided
ios: null,
},
},
},
commands: [...ios.commands, ...android.commands],
platforms: {
ios: {
linkConfig: ios.linkConfig,
projectConfig: ios.projectConfig,
dependencyConfig: ios.dependencyConfig,
},
android: {
linkConfig: android.linkConfig,
projectConfig: android.projectConfig,
dependencyConfig: android.dependencyConfig,
},
},
/**
* Used when running RNTester (with React Native from source)
*/
reactNativePath: '.',
project: {
ios: {
project: './RNTester/RNTester.xcodeproj',
},
android: {
sourceDir: './RNTester',
},
},
};
Error in simulator says:
"Please check your configuration. Did you run 'react-native link'?
As now, react-native has added the support for CocoaPods inside of his projects. (https://github.com/facebook/react-native/releases)
Sadly, i don't know why, but the autolinking feature never works for me on iOS but always goes trough in Android. The only solution i found is to do a react-native link only for iOS (renaming the android folder to something else), then do cd ios and pod install. After that, in the majority of the cases, it would work out of the box, while other libs needs still to be updated to have a full integration with RN 0.60.
Hope all this will be fixed soon but until that we only have to wait and hope that the libs work without any other complications

EXPO - OTA is still working even update.enable=false

Even I set updates.enable=false in app.json, still clients getting updated versions from expo server automatically (without deploying apk/ios to store’s).
I set updates.enable=false in version 1.1.7. Clients with version 1.1.7, 1.1.8 and 1.1.9 got 1.2.0 version automatically without putting new version (1.2.0) into store(s).
I’m using expo build:android and expo build:ios commands for build.
Could anyone can help me about this problem? Is there any way to prevent update on code level?
You can find my app.json content below:
{
“expo”: {
“name”: “XXX”,
“slug”: “XXX”,
“privacy”: “public”,
“sdkVersion”: “31.0.0”,
“platforms”: [
“ios”,
“android”
],
“version”: “1.2.0”,
“orientation”: “portrait”,
“icon”: “./assets/icon.png”,
“splash”: {
“image”: “./assets/icon.png”,
“resizeMode”: “contain”,
“backgroundColor”: “#FFCB09”
},
“notification”: {
“icon”: “./assets/icon96gs.png”,
“color”: “#ffcd00”,
“androidMode”: “collapse”,
“androidCollapsedTitle”: “XXX”
},
“updates”: {
“enabled”:false
},
“assetBundlePatterns”: [
“**/*”
],
“android”:{
“package”:“com.xxx.yyy”,
“permissions” : [“CAMERA”, “LOCATION_HARDWARE”,“ACCESS_COARSE_LOCATION”,“ACCESS_FINE_LOCATION”],
“versionCode”: 17
},
“ios”: {
“bundleIdentifier”: “com.xxx.yyyt”,
“buildNumber” : “17”
},
“scheme” : “xxx”
}
}
you should upload your app in apple store and google play store. only after that updates will be switched off.
Because you created a stand-alone app with Expokit, the commands in the setup do not apply.
You have to set up your own settings in Android Studio and xcode.
"updates"
Configuration for how and when the app should request OTA JavaScript updates
{
"updates": {
/*
If set to false, your standalone app will never download any code.
And will only use code bundled locally on the device.
In that case, all updates to your app must be submitted through Apple review.
Defaults to true.
Note that this will not work out of the box with ExpoKit projects.
*/
"enabled": BOOLEAN,
...
}
ExpoKit: To change the value of enabled, edit ios//Supporting/EXShell.plist and android/app/src/main/java/host/exp/exponent/generated/AppConstants.java. All other properties are set at runtime.