Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Clicking CANCEL on TextInputSettingsTile causes an Exception to be thrown #100

Closed
omerhertz opened this issue Jul 31, 2022 · 4 comments
Closed

Comments

@omerhertz
Copy link

When clicking on the TextInputSettingsTile and then clicking on CANCEL, an Exception is being thrown.
You can see a usage example here- https://www.loom.com/share/74c0debe974f4abe9265470a87994cce

I think the problem is in
The Exception is:

======== Exception caught by gesture ===============================================================
The following _Exception was thrown while handling a gesture:
Exception: No Implementation Found

When the exception was thrown, this was the stack: 
#0      SharePreferenceCache.getValue (package:flutter_settings_screens/src/cache/cache_provider_impl.dart:111:5)
#1      Settings.getValue (package:flutter_settings_screens/src/settings.dart:100:27)
#2      _TextInputSettingsTileState.build.<anonymous closure>.<anonymous closure> (package:flutter_settings_screens/src/widgets/settings_widgets.dart:593:41)
#3      __ModalSettingsTileState._addActionWidgets.<anonymous closure> (package:flutter_settings_screens/src/widgets/base_widgets.dart:482:30)
#4      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:1005:21)
#5      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:198:24)
#6      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:613:11)
#7      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:298:5)
#8      BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:232:7)
#9      PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:563:9)
#10     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:94:12)
#11     PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:139:9)
#12     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:614:13)
#13     PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:137:18)
#14     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:123:7)
#15     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:445:19)
#16     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:425:22)
#17     RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:329:11)
#18     GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:380:7)
#19     GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:344:5)
#20     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:302:7)
#21     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:285:7)
#25     _invoke1 (dart:ui/hooks.dart:170:10)
#26     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:331:7)
#27     _dispatchPointerDataPacket (dart:ui/hooks.dart:94:31)
(elided 3 frames from dart:async)
Handler: "onTap"
Recognizer: TapGestureRecognizer#0201e
  debugOwner: GestureDetector
  state: possible
  won arena
  finalPosition: Offset(536.5, 243.5)
  finalLocalPosition: Offset(28.5, 18.5)
  button: 1
  sent tap down

This is my settings implementation:

SettingsScreen(
  title: "App Settings",
  children: [
    SettingsGroup(
      title: 'Device Details',
      children: <Widget>[
        SwitchSettingsTile(
          settingKey: 'remote-device',
          title: 'Remote Mode',
          defaultValue: true,
          enabledLabel: 'Yes',
          disabledLabel: 'No',
          leading: const Icon(Icons.settings_remote_outlined),
          onChange: (value) {
            logInfo('remote-device: $value');
          },
        ),
        SwitchSettingsTile(
          settingKey: 'device-connected',
          title: 'Is Connected?',
          defaultValue: false,
          enabledLabel: 'Yes',
          disabledLabel: 'No',
          leading: const Icon(Icons.connect_without_contact_outlined),
          onChange: (value) {
            logInfo('device-connected: $value');
          },
          childrenIfEnabled: <Widget>[
            TextInputSettingsTile(
              settingKey: 'text-settings',
              title: 'Text Settings',
              borderColor: Colors.blueAccent,
              errorColor: Colors.deepOrangeAccent,
            ),
          ],
        ),
      ],
    ),
  ],
);

I'm using version 0.3.3-null-safety+1

@nyxkn
Copy link
Contributor

nyxkn commented Jul 31, 2022

Cannot reproduce on master with your code. Maybe try to see if it still happens on master?

@omerhertz
Copy link
Author

You are right! It works when running with the master branch.
Thanks!
@nyxkn - do you know when does a new version suppose to be released?

@nyxkn
Copy link
Contributor

nyxkn commented Jul 31, 2022

@omerhertz Thanks for testing!
I don't know about releases. But now might be a good time for a release with the recent bugfixes. What do you think @GAM3RG33K ?

@GAM3RG33K
Copy link
Owner

Yeah, if all seems good in testing. We can have a quick release.

Let me see what I can do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants