Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

The getter 'pasteButtonLabel' was called on null #73

Closed
huangchaosysu opened this issue Dec 21, 2020 · 1 comment
Closed

The getter 'pasteButtonLabel' was called on null #73

huangchaosysu opened this issue Dec 21, 2020 · 1 comment

Comments

@huangchaosysu
Copy link

[✓] Flutter (Channel stable, 1.22.1, on macOS 11.0.1 20B50, locale zh-Hans-CN)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.51.1)
[✓] Connected device (1 available)

• No issues found!

The following NoSuchMethodError was thrown building _CupertinoTextSelectionToolbarWrapper(dirty,
2020-12-21 16:37:47.314775+0800 Runner[8088:3120447] flutter: dependencies: [_LocalizationsScope-[GlobalKey#2cc58], MediaQuery], state:
2020-12-21 16:37:47.314819+0800 Runner[8088:3120447] flutter: _CupertinoTextSelectionToolbarWrapperState#21883):
2020-12-21 16:37:47.314860+0800 Runner[8088:3120447] flutter: The getter 'pasteButtonLabel' was called on null.
2020-12-21 16:37:47.314896+0800 Runner[8088:3120447] flutter: Receiver: null
2020-12-21 16:37:47.314934+0800 Runner[8088:3120447] flutter: Tried calling: pasteButtonLabel
2020-12-21 16:37:47.314989+0800 Runner[8088:3120447] flutter:
2020-12-21 16:37:47.315157+0800 Runner[8088:3120447] flutter: The relevant error-causing widget was:
2020-12-21 16:37:47.315273+0800 Runner[8088:3120447] flutter: Overlay
2020-12-21 16:37:47.315544+0800 Runner[8088:3120447] flutter: file:///Users/huangchao/Documents/weride/flutter/.pub-cache/hosted/pub.dartlang.org/oktoast-2.2.0/lib/src/widget/oktoast.dart:60:19
2020-12-21 16:37:47.315688+0800 Runner[8088:3120447] flutter:
2020-12-21 16:37:47.315932+0800 Runner[8088:3120447] flutter: When the exception was thrown, this was the stack:
2020-12-21 16:37:47.316050+0800 Runner[8088:3120447] flutter: #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
2020-12-21 16:37:47.316351+0800 Runner[8088:3120447] flutter: #1 _CupertinoTextSelectionToolbarWrapperState.build (package:flutter/src/cupertino/text_selection.dart:195:38)
2020-12-21 16:37:47.316622+0800 Runner[8088:3120447] flutter: #2 StatefulElement.build (package:flutter/src/widgets/framework.dart:4744:28)
2020-12-21 16:37:47.316664+0800 Runner[8088:3120447] flutter: #3 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4627:15)
2020-12-21 16:37:47.316858+0800 Runner[8088:3120447] flutter: #4 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
2020-12-21 16:37:47.317360+0800 Runner[8088:3120447] flutter: #5 Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
2020-12-21 16:37:47.317513+0800 Runner[8088:3120447] flutter: #6 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4606:5)
2020-12-21 16:37:47.317620+0800 Runner[8088:3120447] flutter: #7 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4791:11)
2020-12-21 16:37:47.317664+0800 Runner[8088:3120447] flutter: #8 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4601:5)
2020-12-21 16:37:47.317700+0800 Runner[8088:3120447] flutter: ... Normal element mounting (27 frames)
2020-12-21 16:37:47.317737+0800 Runner[8088:3120447] flutter: #35 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
2020-12-21 16:37:47.317786+0800 Runner[8088:3120447] flutter: #36 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
2020-12-21 16:37:47.317832+0800 Runner[8088:3120447] flutter: #37 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5705:32)
2020-12-21 16:37:47.317867+0800 Runner[8088:3120447] flutter: #38 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6246:17)
2020-12-21 16:37:47.319225+0800 Runner[8088:3120447] flutter: #39 Element.updateChild (package:flutter/src/widgets/framework.dart:3314:15)
2020-12-21 16:37:47.319433+0800 Runner[8088:3120447] flutter: #40 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
2020-12-21 16:37:47.319485+0800 Runner[8088:3120447] flutter: #41 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
2020-12-21 16:37:47.319534+0800 Runner[8088:3120447] flutter: #42 Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
2020-12-21 16:37:47.319647+0800 Runner[8088:3120447] flutter: #43 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2730:33)
2020-12-21 16:37:47.319741+0800 Runner[8088:3120447] flutter: #44 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:913:20)
2020-12-21 16:37:47.319779+0800 Runner[8088:3120447] flutter: #45 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:302:5)
2020-12-21 16:37:47.320350+0800 Runner[8088:3120447] flutter: #46 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1117:15)
2020-12-21 16:37:47.320549+0800 Runner[8088:3120447] flutter: #47 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1055:9)
2020-12-21 16:37:47.320598+0800 Runner[8088:3120447] flutter: #48 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:971:5)
2020-12-21 16:37:47.320646+0800 Runner[8088:3120447] flutter: #52 _invoke (dart:ui/hooks.dart:251:10)
2020-12-21 16:37:47.320705+0800 Runner[8088:3120447] flutter: #53 _drawFrame (dart:ui/hooks.dart:209:3)
2020-12-21 16:37:47.320753+0800 Runner[8088:3120447] flutter: (elided 3 frames from dart:async)
2020-12-21 16:37:47.320799+0800 Runner[8088:3120447] flutter:
2020-12-21 16:37:47.320855+0800 Runner[8088:3120447] flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════

@AlexV525
Copy link
Member

AlexV525 commented Aug 1, 2021

Follow localizations setup tutorial in Flutter's website to solve. It's nothing related to the package.

@AlexV525 AlexV525 closed this as completed Aug 1, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants