skip to Main Content

Flutter: The values in a const list literal must be constants. Try removing the keyword 'const' from the list literal

Here is the Widget that is getting the error: The values in a const list literal must be constants. Try removing the keyword 'const' from the list literal. ResponsiveCenter( padding: EdgeInsets.symmetric( horizontal: ResponsiveCenterEdgeInsets.horizontal, vertical: ResponsiveCenterEdgeInsets.vertical), child: PrimaryButton( text: 'Weight', isLoading:…

VIEW QUESTION

How to open dialog above all screens in flutter, when using go_router?

final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>(); class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return BlocProvider<InactivityCubit>( create: (_) => inject<InactivityCubit>(), child: MaterialApp.router( builder: (context, widget) { return Container( child: BlocListener<InactivityCubit, InactivityState>( listener: (context, state) => state.whenOrNull( showDialog:…

VIEW QUESTION
Back To Top
Search