@@ -283,7 +283,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
283283 ),
284284 children: [
285285 _UserPreferenceLimitsForm (
286- userRole: UserRole .guestUser,
286+ userRole: UserRoles .guestUser,
287287 appConfig: appConfig,
288288 onConfigChanged: (newConfig) {
289289 context.read <AppConfigurationBloc >().add (
@@ -303,7 +303,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
303303 ),
304304 children: [
305305 _UserPreferenceLimitsForm (
306- userRole: UserRole .standardUser,
306+ userRole: UserRoles .standardUser,
307307 appConfig: appConfig,
308308 onConfigChanged: (newConfig) {
309309 context.read <AppConfigurationBloc >().add (
@@ -323,7 +323,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
323323 ),
324324 children: [
325325 _UserPreferenceLimitsForm (
326- userRole: UserRole .premiumUser,
326+ userRole: UserRoles .premiumUser,
327327 appConfig: appConfig,
328328 onConfigChanged: (newConfig) {
329329 context.read <AppConfigurationBloc >().add (
@@ -359,7 +359,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
359359 ),
360360 children: [
361361 _AdConfigForm (
362- userRole: UserRole .guestUser,
362+ userRole: UserRoles .guestUser,
363363 appConfig: appConfig,
364364 onConfigChanged: (newConfig) {
365365 context.read <AppConfigurationBloc >().add (
@@ -379,7 +379,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
379379 ),
380380 children: [
381381 _AdConfigForm (
382- userRole: UserRole .standardUser,
382+ userRole: UserRoles .standardUser,
383383 appConfig: appConfig,
384384 onConfigChanged: (newConfig) {
385385 context.read <AppConfigurationBloc >().add (
@@ -399,7 +399,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
399399 ),
400400 children: [
401401 _AdConfigForm (
402- userRole: UserRole .premiumUser,
402+ userRole: UserRoles .premiumUser,
403403 appConfig: appConfig,
404404 onConfigChanged: (newConfig) {
405405 context.read <AppConfigurationBloc >().add (
@@ -438,7 +438,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
438438 ),
439439 children: [
440440 _AccountActionConfigForm (
441- userRole: UserRole .guestUser,
441+ userRole: UserRoles .guestUser,
442442 appConfig: appConfig,
443443 onConfigChanged: (newConfig) {
444444 context.read <AppConfigurationBloc >().add (
@@ -458,7 +458,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
458458 ),
459459 children: [
460460 _AccountActionConfigForm (
461- userRole: UserRole .standardUser,
461+ userRole: UserRoles .standardUser,
462462 appConfig: appConfig,
463463 onConfigChanged: (newConfig) {
464464 context.read <AppConfigurationBloc >().add (
@@ -779,7 +779,7 @@ class _UserPreferenceLimitsForm extends StatefulWidget {
779779 required this .buildIntField,
780780 });
781781
782- final UserRole userRole;
782+ final String userRole;
783783 final AppConfig appConfig;
784784 final ValueChanged <AppConfig > onConfigChanged;
785785 final Widget Function (
@@ -936,7 +936,7 @@ class _UserPreferenceLimitsFormState extends State<_UserPreferenceLimitsForm> {
936936 final userPreferenceLimits = widget.appConfig.userPreferenceLimits;
937937
938938 switch (widget.userRole) {
939- case UserRole .guestUser:
939+ case UserRoles .guestUser:
940940 return Column (
941941 children: [
942942 widget.buildIntField (
@@ -975,7 +975,7 @@ class _UserPreferenceLimitsFormState extends State<_UserPreferenceLimitsForm> {
975975 ),
976976 ],
977977 );
978- case UserRole .standardUser:
978+ case UserRoles .standardUser:
979979 return Column (
980980 children: [
981981 widget.buildIntField (
@@ -1015,7 +1015,7 @@ class _UserPreferenceLimitsFormState extends State<_UserPreferenceLimitsForm> {
10151015 ),
10161016 ],
10171017 );
1018- case UserRole .premiumUser:
1018+ case UserRoles .premiumUser:
10191019 return Column (
10201020 children: [
10211021 widget.buildIntField (
@@ -1055,10 +1055,12 @@ class _UserPreferenceLimitsFormState extends State<_UserPreferenceLimitsForm> {
10551055 ),
10561056 ],
10571057 );
1058- case UserRole .admin:
1058+ case UserRoles .admin:
10591059 // Admin role might not have specific limits here, or could be
10601060 // a separate configuration. For now, return empty.
10611061 return const SizedBox .shrink ();
1062+ default :
1063+ return const SizedBox .shrink ();
10621064 }
10631065 }
10641066}
@@ -1071,7 +1073,7 @@ class _AdConfigForm extends StatefulWidget {
10711073 required this .buildIntField,
10721074 });
10731075
1074- final UserRole userRole;
1076+ final String userRole;
10751077 final AppConfig appConfig;
10761078 final ValueChanged <AppConfig > onConfigChanged;
10771079 final Widget Function (
@@ -1271,7 +1273,7 @@ class _AdConfigFormState extends State<_AdConfigForm> {
12711273 final adConfig = widget.appConfig.adConfig;
12721274
12731275 switch (widget.userRole) {
1274- case UserRole .guestUser:
1276+ case UserRoles .guestUser:
12751277 return Column (
12761278 children: [
12771279 widget.buildIntField (
@@ -1329,7 +1331,7 @@ class _AdConfigFormState extends State<_AdConfigForm> {
13291331 ),
13301332 ],
13311333 );
1332- case UserRole .standardUser:
1334+ case UserRoles .standardUser:
13331335 return Column (
13341336 children: [
13351337 widget.buildIntField (
@@ -1391,7 +1393,7 @@ class _AdConfigFormState extends State<_AdConfigForm> {
13911393 ),
13921394 ],
13931395 );
1394- case UserRole .premiumUser:
1396+ case UserRoles .premiumUser:
13951397 return Column (
13961398 children: [
13971399 widget.buildIntField (
@@ -1450,7 +1452,9 @@ class _AdConfigFormState extends State<_AdConfigForm> {
14501452 ),
14511453 ],
14521454 );
1453- case UserRole .admin:
1455+ case UserRoles .admin:
1456+ return const SizedBox .shrink ();
1457+ default :
14541458 return const SizedBox .shrink ();
14551459 }
14561460 }
@@ -1464,7 +1468,7 @@ class _AccountActionConfigForm extends StatefulWidget {
14641468 required this .buildIntField,
14651469 });
14661470
1467- final UserRole userRole;
1471+ final String userRole;
14681472 final AppConfig appConfig;
14691473 final ValueChanged <AppConfig > onConfigChanged;
14701474 final Widget Function (
@@ -1553,7 +1557,7 @@ class _AccountActionConfigFormState extends State<_AccountActionConfigForm> {
15531557 final accountActionConfig = widget.appConfig.accountActionConfig;
15541558
15551559 switch (widget.userRole) {
1556- case UserRole .guestUser:
1560+ case UserRoles .guestUser:
15571561 return Column (
15581562 children: [
15591563 widget.buildIntField (
@@ -1576,7 +1580,7 @@ class _AccountActionConfigFormState extends State<_AccountActionConfigForm> {
15761580 ),
15771581 ],
15781582 );
1579- case UserRole .standardUser:
1583+ case UserRoles .standardUser:
15801584 return Column (
15811585 children: [
15821586 widget.buildIntField (
@@ -1599,8 +1603,10 @@ class _AccountActionConfigFormState extends State<_AccountActionConfigForm> {
15991603 ),
16001604 ],
16011605 );
1602- case UserRole .premiumUser:
1603- case UserRole .admin:
1606+ case UserRoles .premiumUser:
1607+ case UserRoles .admin:
1608+ return const SizedBox .shrink ();
1609+ default :
16041610 return const SizedBox .shrink ();
16051611 }
16061612 }
0 commit comments