Closed ghost closed 9 months ago
Hi @Mr-Anderson-01, thanks for getting involved!
Is there a reason you need a specific toggle, could you not do something like this?
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
builder: (context, child) => isDebugFlagEnabled ? AccessibilityTools(child: child) : child,
home: HomePage(),
);
}
}
In the readme I see you guys mentioned that it's only available in debug mode and not compiled into release mode. We need some way to allow this in release mode for different environments e.g QA/Stg which we can distribute to designers for reviewing all screens which have accessibility issues
The tools only run in debug mode, and are compiled out of release builds.
Hi @SAGARSURI! Have you found a solution?
I've got an idea that availability of the tools could be made customizable. There could be a flag that changes behaviour: defaultBehavior
would make it enabled in debug builds and disabled in release builds. alwaysOn
could force enable it in any build, alwaysOff
could force disable it in any build. Developers would be able to choose when tools are available based on app flavor, app state etc.
Is it something you're looking for?
I believe this comment answers the original question. For enabling tools in release mode please see #36
What: A toggle to enable and disable the whole tool.
Why: For example, we have an app with its own debug menu. It would be great to have a toggle to enable and disable the whole tool on a debug build within this debug menu.
I have a branch ready to go