PhoneInput inside a Form throws StackOverflow error when selecting country
I am using PhoneInput inside a Form like this:
final _phoneNumberKey = const PhoneInputKey('phoneNumberKey');
FormField<PhoneNumber>(
label: const Text('Phone Number'),
key: _phoneNumberKey,
child: PhoneInput(
onChanged: (value) {
setState(() {
// Update phone number state if needed
_phoneNumber = value;
});
},
initialValue: const PhoneNumber(Country.india, '9999999999'),
),
),
Using PhoneInput is throwing a StackOverflow error when trying to open the country code selector.
The following StackOverflowError was thrown building SurfaceCard(dependencies: [Theme, _InheritedModel]):
Stack Overflow
The relevant error-causing widget was:
Scaffold Scaffold:file:///Users/madhu/development/my_shadcn_app/lib/features/user_form.dart:313:20
When the exception was thrown, this was the stack:
#0 Element._debugCheckStateIsActiveForAncestorLookup.<anonymous closure> (package:flutter/src/widgets/framework.dart:4961:12)
framework.dart:4961
#1 Element._debugCheckStateIsActiveForAncestorLookup (package:flutter/src/widgets/framework.dart:4977:6)
framework.dart:4977
#2 Element.findAncestorWidgetOfExactType (package:flutter/src/widgets/framework.dart:5038:12)
framework.dart:5038
#3 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1101:31)
form.dart:1101
#4 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#5 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#6 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#7 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#8 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#9 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#10 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#11 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#12 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#13 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#14 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#15 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#16 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#17 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#18 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#19 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#20 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#21 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#22 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#23 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#24 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#25 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#26 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#27 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#28 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#29 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#30 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#31 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#32 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#33 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#34 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#35 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#36 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#37 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#38 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#39 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#40 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#41 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#42 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
#43 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1102:28)
form.dart:1102
2
Is this a bug or is PhoneInput not intended to be used inside a FormField?
I couldn't reproduce the issue, what version of shadcn_flutter are you on?
shadcn_flutter: ^0.0.36
Am I using the PhoneInput form the right way?
It would be helpful to have sample code for using various types of widgets within the form, such as PhoneInput, Select<String>, RadioGroup, etc.
Am I using the PhoneInput form the right way?
Can't really tell, FormField needs Form to work, and i don't know what widget did you put in between the Form and your FormField
BlocBuilder<Bloc, State>(
Form(
Column(
Column(
FormField(
All widgets are shadcn_flutter package. No material widgets. I face the same issue with Select<String> widget inside FormField as well. When I try to open the select to select an item, app crashes.
PhoneInput, Select<String> work fine when used without FormInput.
When I asked Copilot to debug the issue, this is what it said (it could be wrong):
The error is a StackOverflowError caused by infinite recursion in the shadcn_flutter form system, specifically in FormEntryState.reportNewFormValue. This happens when you use both: FormField (from shadcn_flutter) and a widget like PhoneInput, Select, or similar, and you update their value using setState or their own onChanged handler. The FormField and its child widget (like PhoneInput or Select) both try to update the form value, which triggers a rebuild, which then tries to update the value again, causing infinite recursion.
Then, it also said this:
Thank you for clarifying—the Stack Overflow occurs specifically when selecting the country code in the PhoneInput field from shadcn_flutter, even after following all best practices for form state.
What’s Actually Happening This is a known bug in some versions of shadcn_flutter's PhoneInput (and sometimes FormField) where:
The widget tree enters an infinite update loop when the country selector is opened or changed. This is not caused by your code, but by an internal recursion in the package, often triggered by the way FormField and PhoneInput interact.
How to Confirm If you replace PhoneInput with a simple TextField inside the same FormField, the error goes away. If you use PhoneInput outside of a FormField, the error also goes away.
Indeed, the issue went away when I use PhoneInput outside of a FormField.
Can you try master branch and see if the problem still exist?
Just tried with master branch and still getting the same error
shadcn_flutter:
git:
url: https://github.com/sunarya-thito/shadcn_flutter.git
ref: master
The moment I added FormField() and passed PhoneInput() as child, it resulted in StackOverflow. Without the FormField(), it works as expected.
@sunarya-thito checking in to see if you have any update on this issue?
@sunarya-thito Gentle ping on this issue. I created a new sample app with just four fields to test out the issue in isolation. This issue is still happening. Added an image to show the issue.
Couple of observations:
- Issue does not happen if it is not enclosed in a form field
- I tried to use PhoneInput without FormField. However, I also have a Select<String> widget later in the page. If a Select<String> widget is there on the same page as the PhoneInput, when I open the Select<String> widget, a StackOverflow error occurs when trying to open the Select Popover.
sdk: ^3.7.2 shadcn_flutter: ^0.0.37
form_sample.dart
import 'package:shadcn_flutter/shadcn_flutter.dart';
class FormView extends StatefulWidget {
const FormView({super.key});
@override
State<FormView> createState() => _FormViewState();
}
class _FormViewState extends State<FormView> {
final _playerDetailsFormController = FormController();
final _firstNameKey = const TextFieldKey('firstName');
final _lastNameKey = const TextFieldKey('lastName');
final _phoneNumberKey = const PhoneInputKey('phoneNumberKey');
final _occupationKey = const SelectKey<String>('occupation');
String? _selectedOccupation;
bool _isSubmitting = false;
final List<String> _occupationOptions = [
'Student',
'Software Engineer',
'Designer',
'Manager',
'Teacher',
'Healthcare Worker',
'Sales Representative',
'Other'
];
@override
void dispose() {
_playerDetailsFormController.dispose();
super.dispose();
}
void _handleSubmit(BuildContext context) async {
final values = _playerDetailsFormController.values;
final firstName = values[_firstNameKey] as String;
final lastName = values[_lastNameKey] as String;
final occupation = values[_occupationKey] as String?;
if (firstName.isEmpty || lastName.isEmpty || occupation == null) {
return;
}
setState(() {
_isSubmitting = true;
});
// Simulate API call
await Future.delayed(const Duration(seconds: 2));
if (mounted) {
setState(() {
_isSubmitting = false;
});
// Reset form
setState(() {
_selectedOccupation = null;
});
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
headers: [
AppBar(
title: const Text('Person Details Form'),
backgroundColor: Theme.of(context).colorScheme.primary,
),
],
child: Padding(
padding: const EdgeInsets.all(16),
child: SingleChildScrollView(
child: Form(
controller: _playerDetailsFormController,
onSubmit: (context, values) {
_handleSubmit(context);
},
child: Column(
children: [
// First Name
FormField(
key: _firstNameKey,
label: Row(children: [
const Text('First Name'),
Text('*', style: TextStyle(color: Colors.red[700])),
],),
validator: const LengthValidator(min: 2),
showErrors: const {
FormValidationMode.changed,
FormValidationMode.submitted
},
child: TextField(
placeholder: const Text('Enter your first name'),
autocorrect: false,
),
),
const Gap(16),
// Last Name
FormField(
key: _lastNameKey,
label: Row(children: [
const Text('Last Name'),
Text('*', style: TextStyle(color: Colors.red[700])),
],),
validator: const LengthValidator(min: 2),
showErrors: const {
FormValidationMode.changed,
FormValidationMode.submitted
},
child: TextField(
placeholder: const Text('Enter your last name'),
autocorrect: false,
),
),
const Gap(16),
// Phone Number
FormField(
key: _phoneNumberKey,
label: Row(children: [
const Text('Phone Number'),
Text('*', style: TextStyle(color: Colors.red[700])),
],),
validator: const NonNullValidator(message: 'Phone number is required'),
showErrors: const {
FormValidationMode.changed,
FormValidationMode.submitted
},
child: PhoneInput(
initialCountry: Country.india,
),
),
const Gap(16),
// Occupation Selection
FormField(
key: _occupationKey,
label: Row(children: [
const Text('Occupation'),
Text('*', style: TextStyle(color: Colors.red[700])),
],),
validator: const NonNullValidator(message: 'Occupation is required'),
showErrors: const {
FormValidationMode.changed,
FormValidationMode.submitted
},
child: SizedBox(
width: double.infinity,
child: Select<String>(
value: _selectedOccupation,
onChanged: (value) {
setState(() {
_selectedOccupation = value;
});
},
itemBuilder: (context, item) => Text(item),
popup: const SelectPopup.noVirtualization(
items: SelectItemList(
children: [
SelectItemButton(value: 'Student', child: Text('Student')),
SelectItemButton(value: 'Software Engineer', child: Text('Software Engineer')),
SelectItemButton(value: 'Designer', child: Text('Designer')),
SelectItemButton(value: 'Manager', child: Text('Manager')),
SelectItemButton(value: 'Teacher', child: Text('Teacher')),
SelectItemButton(value: 'Healthcare Worker', child: Text('Healthcare Worker')),
SelectItemButton(value: 'Sales Representative', child: Text('Sales Representative')),
SelectItemButton(value: 'Other', child: Text('Other')),
],
),
),
placeholder: const Text('Select your occupation'),
),
),
),
const Gap(24),
// Submit Button
FormErrorBuilder(
builder: (context, errors, child) {
return SizedBox(
width: double.infinity,
child: PrimaryButton(
onPressed: errors.isEmpty && !_isSubmitting ? () => context.submitForm() : null,
child: _isSubmitting
? const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 16,
height: 16,
child: CircularProgressIndicator(),
),
SizedBox(width: 8),
Text('Submitting...'),
],
)
: const Text('Submit Form'),
),
);
},
),
const Gap(16),
],
),
),
),
),
);
}
}
main.dart
import 'package:flutter/material.dart' as material;
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:go_router/go_router.dart';
import 'package:flutter_sample_app/theme/bloc/theme_bloc.dart';
import 'package:flutter_sample_app/theme/bloc/theme_state.dart';
import 'package:shadcn_flutter/shadcn_flutter.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_sample_app/routes.dart';
import 'package:flutter_sample_app/form_sample.dart';
import 'package:flutter_sample_app/themes.dart';
// Configure Routing
final _rootNavigatorKey = GlobalKey<NavigatorState>();
final _router = GoRouter(
navigatorKey: _rootNavigatorKey, // Add root navigator key
initialLocation: '/', // Explicitly set initial location
routes: <RouteBase>[
...routes(),
],
// It's good practice to have an error builder
errorBuilder: (context, state) => material.Scaffold(
appBar: material.AppBar(title: const Text('Error')),
body: Center(
child: Text('Page not found: ${state.error}'),
),
),
);
void main() {
runApp(
MultiBlocProvider(
providers: [
BlocProvider(create: (context) => ThemeBloc()),
],
child: BlocBuilder<ThemeBloc, ThemeState>(
builder: (context, state) {
return const MyApp();
},
),
),
);
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return BlocBuilder<ThemeBloc, ThemeState>(
builder: (context, state) {
return ShadcnApp.router(
debugShowCheckedModeBanner: false,
title: 'Sample App',
theme: lightTheme,
darkTheme: darkTheme,
themeMode: state.themeMode,
routerConfig: _router,
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: const [
Locale('en', 'US'),
Locale('en', 'IN'),
],
);
},
);
}
}
Error:
════════ Exception caught by widgets library ═══════════════════════════════════
The following StackOverflowError was thrown building SurfaceCard(dependencies: [Theme, _InheritedModel]):
Stack Overflow
The relevant error-causing widget was:
Scaffold Scaffold:file:///Users/madhu/development/flutter_sample_app/lib/form_sample.dart:72:12
When the exception was thrown, this was the stack:
#0 Element._debugCheckStateIsActiveForAncestorLookup.<anonymous closure> (package:flutter/src/widgets/framework.dart:4943:12)
framework.dart:4943
#1 Element._debugCheckStateIsActiveForAncestorLookup (package:flutter/src/widgets/framework.dart:4959:6)
framework.dart:4959
#2 Element.findAncestorWidgetOfExactType (package:flutter/src/widgets/framework.dart:5020:12)
framework.dart:5020
#3 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1109:31)
form.dart:1109
#4 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#5 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#6 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#7 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#8 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#9 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#10 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#11 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#12 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#13 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#14 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#15 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#16 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#17 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#18 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#19 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#20 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#21 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#22 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#23 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#24 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#25 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#26 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#27 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#28 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#29 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#30 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#31 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#32 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#33 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#34 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#35 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#36 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#37 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#38 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#39 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#40 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#41 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#42 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
#43 FormEntryState.reportNewFormValue (package:shadcn_flutter/src/components/form/form.dart:1110:28)
form.dart:1110
2
...
#77147 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:7008:14)
framework.dart:7008
... Normal element mounting (10 frames)
#77157 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4539:16)
framework.dart:4539
#77158 Element.updateChild (package:flutter/src/widgets/framework.dart:4004:18)
framework.dart:4004
#77159 _LayoutBuilderElement._rebuildWithConstraints.updateChildCallback (package:flutter/src/widgets/layout_builder.dart:249:18)
layout_builder.dart:249
#77160 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:3046:19)
framework.dart:3046
#77161 _LayoutBuilderElement._rebuildWithConstraints (package:flutter/src/widgets/layout_builder.dart:272:12)
layout_builder.dart:272
#77162 RenderAbstractLayoutBuilderMixin.layoutCallback (package:flutter/src/widgets/layout_builder.dart:335:38)
layout_builder.dart:335
#77163 RenderObjectWithLayoutCallbackMixin.runLayoutCallback.<anonymous closure> (package:flutter/src/rendering/object.dart:4209:33)
object.dart:4209
#77164 RenderObject.invokeLayoutCallback.<anonymous closure> (package:flutter/src/rendering/object.dart:2941:17)
object.dart:2941
#77165 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:1209:15)
object.dart:1209
#77166 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:2940:14)
object.dart:2940
#77167 RenderObjectWithLayoutCallbackMixin.runLayoutCallback (package:flutter/src/rendering/object.dart:4209:5)
object.dart:4209
#77168 _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:449:5)
layout_builder.dart:449
#77169 RenderObject.layout (package:flutter/src/rendering/object.dart:2822:7)
object.dart:2822
#77170 RenderStack.layoutPositionedChild (package:flutter/src/rendering/stack.dart:549:11)
stack.dart:549
#77171 RenderStack.performLayout (package:flutter/src/rendering/stack.dart:684:13)
stack.dart:684
#77172 RenderObject.layout (package:flutter/src/rendering/object.dart:2822:7)
object.dart:2822
#77173 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:115:18)
proxy_box.dart:115
#77174 RenderObject.layout (package:flutter/src/rendering/object.dart:2822:7)
object.dart:2822