We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a Stacked view, which is generating fine, but as I add type to it, the stacked fails to generate routes for it.
Windows
No response
class LoadingView extends StatefulWidget { const LoadingView({ super.key, required this.future, required this.onSuccess, this.onError, }); final Future Function() future; final void Function(dynamic) onSuccess; final void Function(dynamic)? onError; @override State<StatefulWidget> createState() => _LoadingViewState(); } class _LoadingViewState extends State<LoadingView> { @override void initState() { super.initState(); widget.future().then( (value) => widget.onSuccess(value), onError: widget.onError ?? (e) { locator<NavigationService>().back(); MySnackBar.showError(e); }, ); } @override Widget build(BuildContext context) { return const Scaffold( body: SafeArea( child: Center( child: CircularProgressIndicator(), ), ), ); } }
class LoadingView<T> extends StatefulWidget { const LoadingView({ super.key, required this.future, required this.onSuccess, this.onError, }); final Future<T> Function() future; final void Function(T) onSuccess; final void Function(dynamic)? onError; @override State<StatefulWidget> createState() => _LoadingViewState<T>(); } class _LoadingViewState<T> extends State<LoadingView<T>> { @override void initState() { super.initState(); widget.future().then( (value) => widget.onSuccess(value), onError: widget.onError ?? (e) { locator<NavigationService>().back(); MySnackBar.showError(e); }, ); } @override Widget build(BuildContext context) { return const Scaffold( body: SafeArea( child: Center( child: CircularProgressIndicator(), ), ), ); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
I have a Stacked view, which is generating fine, but as I add type to it, the stacked fails to generate routes for it.
What operating system do you use?
Windows
Information about the installed tooling
No response
Steps to reproduce the issue
Expected behavior
No response
Screenshots
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: