Flutter_Pinput
Flutter_Pinput copied to clipboard
error: FocusTrapArea isn't defined for the class '_PinputState'.
pub.flutter-io.cn/pinput-2.2.11/lib/src/pinput_state.dart:334:14: Error: The method 'FocusTrapArea' isn't defined for the class '_PinputState'.
Flutter 3.1.0-0.0.pre.2002 • channel master • https://github.com/flutter/flutter.git Framework • revision 5535b48e94 (24 minutes ago) • 2022-07-30 20:25:05 -0400 Engine • revision 0093991aa1 Tools • Dart 2.19.0 (build 2.19.0-47.0.dev) • DevTools 2.16.0
Running flutter doctor... Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel master, 3.1.0-0.0.pre.2002, on macOS 12.1 21C52 darwin-x64, locale zh-Hans-CN) [!] Android toolchain - develop for Android devices (Android SDK version 33.0.0) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.2) [✓] Connected device (3 available) [✓] HTTP Host Availability
Looks like the issue is related to master channel, could you try if it's working on stable?
pub.flutter-io.cn/pinput-2.2.11/lib/src/pinput_state.dart:334:14: Error: The method 'FocusTrapArea' isn't defined for the class '_PinputState'.
你切换到稳定版本就好,3.0.5这个版本中是有FocusTrapArea这个组件的,希望对你有帮助
any update on the issue
any update on the issue
Are you using Stable Flutter channel?
By this PR FocusTrapArea was replaced with TapRegion on master branch of the Flutter repository, and I'll replace it as well after merging it to stable branch.
Here is the patch and you can directly depend on it if you are using Flutter master channel
pinput:
git:
url: https://github.com/Tkko/Flutter_Pinput
ref: dev
any update on this issue??
any update on this issue??
https://github.com/Tkko/Flutter_Pinput/issues/98#issuecomment-1212291722
Is this problem solved?
Is this problem solved?
https://github.com/Tkko/Flutter_Pinput/issues/98#issuecomment-1212291722
any update on this issue??
this error
/C:/Users/REZA/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/pinput-2.2.12/lib/src/pinput_state.dart:337:14: Error: The method 'FocusTrapArea' isn't defined for the class '_PinputState'.
- '_PinputState' is from 'package:pinput/src/pinput.dart' ('/C:/Users/REZA/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/pinput-2.2.12/lib/src/pinput.dart'). Try correcting the name to the name of an existing method, or defining a method named 'FocusTrapArea'. child: FocusTrapArea( ^^^^^^^^^^^^^
[√] Flutter (Channel master, 3.4.0-19.0.pre.58, on Microsoft Windows [Version 10.0.19044.1889], locale en-US) • Flutter version 3.4.0-19.0.pre.58 on channel master at C:\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 3014d57368 (15 hours ago), 2022-09-02 22:38:54 -0400 • Engine revision feb1729235 • Dart version 2.19.0 (build 2.19.0-159.0.dev) • DevTools version 2.16.0
Is this problem solved?
Switch to stable channel or use
pinput:
git:
url: https://github.com/Tkko/Flutter_Pinput
ref: dev
Is this problem solved?
Switch to stable channel or use
pinput: git: url: https://github.com/Tkko/Flutter_Pinput ref: dev
Thankful
Is this problem solved?
Switch to stable channel or use
pinput: git: url: https://github.com/Tkko/Flutter_Pinput ref: dev
Still the same issue and I'm in stable channel:

Is this problem solved?
Switch to stable channel or use
pinput:
git:
url: https://github.com/Tkko/Flutter_Pinputref: devStill the same issue and I'm in stable channel:
![]()
Flutter version?
Is this problem solved?
Switch to stable channel or use
pinput:
git:
url: https://github.com/Tkko/Flutter_Pinputref: devStill the same issue and I'm in a stable channel:
Flutter version?
Don't worry anymore, I found another package that works fine with the newest version (3.0.5).
@Messhias good luck with using another package, and for the record pinput works fine with every stable version > 2.0.0
By this PR FocusTrapArea was replaced with TapRegion on master branch of the Flutter repository, and I'll replace it as well after merging it to stable branch.
Here is the patch and you can directly depend on it if you are using Flutter master channel
pinput:
git:
url: https://github.com/Tkko/Flutter_Pinput
ref: dev
It doesn't, I already tried to do that, and didn't work out.
Thanks anyway the other package works well for me.
Em ter., 4 de out. de 2022 às 14:22, Tornike @.***> escreveu:
@Messhias https://github.com/Messhias good luck with using another package, and for the record pinput works fine with every stable version > 2.0.0
By this PR https://github.com/flutter/flutter/pull/107262 FocusTrapArea was replaced with TapRegion on master branch of the Flutter repository, and I'll replace it as well after merging it to stable branch.
Here is the patch and you can directly depend on it if you are using Flutter master channel
pinput: git: url: https://github.com/Tkko/Flutter_Pinput ref: dev
— Reply to this email directly, view it on GitHub https://github.com/Tkko/Flutter_Pinput/issues/98#issuecomment-1266989855, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3QQ7A5PBCELBALB4RRL3WBQVPVANCNFSM55ECCR2A . You are receiving this because you were mentioned.Message ID: @.***>
As you can see FocusTrapArea is used inside the TextField on the stable channel, that being said if you are using the Flutter's stable channel Pinput should work as well
https://github.com/flutter/flutter/blob/eb6d86ee27deecba4a83536aa20f366a6044895c/packages/flutter/lib/src/material/text_field.dart#L1323
People are quick to complain, this did not even reach stable on the flutter channel. You have the patience of a saint.
Anyway, please update here if you don't mind when this reach pub.dev, so we don't forget to change the hardcoded dependency