@@ -283,7 +283,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
283
283
),
284
284
children: [
285
285
_UserPreferenceLimitsForm (
286
- userRole: UserRole .guestUser,
286
+ userRole: UserRoles .guestUser,
287
287
appConfig: appConfig,
288
288
onConfigChanged: (newConfig) {
289
289
context.read <AppConfigurationBloc >().add (
@@ -303,7 +303,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
303
303
),
304
304
children: [
305
305
_UserPreferenceLimitsForm (
306
- userRole: UserRole .standardUser,
306
+ userRole: UserRoles .standardUser,
307
307
appConfig: appConfig,
308
308
onConfigChanged: (newConfig) {
309
309
context.read <AppConfigurationBloc >().add (
@@ -323,7 +323,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
323
323
),
324
324
children: [
325
325
_UserPreferenceLimitsForm (
326
- userRole: UserRole .premiumUser,
326
+ userRole: UserRoles .premiumUser,
327
327
appConfig: appConfig,
328
328
onConfigChanged: (newConfig) {
329
329
context.read <AppConfigurationBloc >().add (
@@ -359,7 +359,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
359
359
),
360
360
children: [
361
361
_AdConfigForm (
362
- userRole: UserRole .guestUser,
362
+ userRole: UserRoles .guestUser,
363
363
appConfig: appConfig,
364
364
onConfigChanged: (newConfig) {
365
365
context.read <AppConfigurationBloc >().add (
@@ -379,7 +379,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
379
379
),
380
380
children: [
381
381
_AdConfigForm (
382
- userRole: UserRole .standardUser,
382
+ userRole: UserRoles .standardUser,
383
383
appConfig: appConfig,
384
384
onConfigChanged: (newConfig) {
385
385
context.read <AppConfigurationBloc >().add (
@@ -399,7 +399,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
399
399
),
400
400
children: [
401
401
_AdConfigForm (
402
- userRole: UserRole .premiumUser,
402
+ userRole: UserRoles .premiumUser,
403
403
appConfig: appConfig,
404
404
onConfigChanged: (newConfig) {
405
405
context.read <AppConfigurationBloc >().add (
@@ -438,7 +438,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
438
438
),
439
439
children: [
440
440
_AccountActionConfigForm (
441
- userRole: UserRole .guestUser,
441
+ userRole: UserRoles .guestUser,
442
442
appConfig: appConfig,
443
443
onConfigChanged: (newConfig) {
444
444
context.read <AppConfigurationBloc >().add (
@@ -458,7 +458,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage> {
458
458
),
459
459
children: [
460
460
_AccountActionConfigForm (
461
- userRole: UserRole .standardUser,
461
+ userRole: UserRoles .standardUser,
462
462
appConfig: appConfig,
463
463
onConfigChanged: (newConfig) {
464
464
context.read <AppConfigurationBloc >().add (
@@ -779,7 +779,7 @@ class _UserPreferenceLimitsForm extends StatefulWidget {
779
779
required this .buildIntField,
780
780
});
781
781
782
- final UserRole userRole;
782
+ final String userRole;
783
783
final AppConfig appConfig;
784
784
final ValueChanged <AppConfig > onConfigChanged;
785
785
final Widget Function (
@@ -936,7 +936,7 @@ class _UserPreferenceLimitsFormState extends State<_UserPreferenceLimitsForm> {
936
936
final userPreferenceLimits = widget.appConfig.userPreferenceLimits;
937
937
938
938
switch (widget.userRole) {
939
- case UserRole .guestUser:
939
+ case UserRoles .guestUser:
940
940
return Column (
941
941
children: [
942
942
widget.buildIntField (
@@ -975,7 +975,7 @@ class _UserPreferenceLimitsFormState extends State<_UserPreferenceLimitsForm> {
975
975
),
976
976
],
977
977
);
978
- case UserRole .standardUser:
978
+ case UserRoles .standardUser:
979
979
return Column (
980
980
children: [
981
981
widget.buildIntField (
@@ -1015,7 +1015,7 @@ class _UserPreferenceLimitsFormState extends State<_UserPreferenceLimitsForm> {
1015
1015
),
1016
1016
],
1017
1017
);
1018
- case UserRole .premiumUser:
1018
+ case UserRoles .premiumUser:
1019
1019
return Column (
1020
1020
children: [
1021
1021
widget.buildIntField (
@@ -1055,10 +1055,12 @@ class _UserPreferenceLimitsFormState extends State<_UserPreferenceLimitsForm> {
1055
1055
),
1056
1056
],
1057
1057
);
1058
- case UserRole .admin:
1058
+ case UserRoles .admin:
1059
1059
// Admin role might not have specific limits here, or could be
1060
1060
// a separate configuration. For now, return empty.
1061
1061
return const SizedBox .shrink ();
1062
+ default :
1063
+ return const SizedBox .shrink ();
1062
1064
}
1063
1065
}
1064
1066
}
@@ -1071,7 +1073,7 @@ class _AdConfigForm extends StatefulWidget {
1071
1073
required this .buildIntField,
1072
1074
});
1073
1075
1074
- final UserRole userRole;
1076
+ final String userRole;
1075
1077
final AppConfig appConfig;
1076
1078
final ValueChanged <AppConfig > onConfigChanged;
1077
1079
final Widget Function (
@@ -1271,7 +1273,7 @@ class _AdConfigFormState extends State<_AdConfigForm> {
1271
1273
final adConfig = widget.appConfig.adConfig;
1272
1274
1273
1275
switch (widget.userRole) {
1274
- case UserRole .guestUser:
1276
+ case UserRoles .guestUser:
1275
1277
return Column (
1276
1278
children: [
1277
1279
widget.buildIntField (
@@ -1329,7 +1331,7 @@ class _AdConfigFormState extends State<_AdConfigForm> {
1329
1331
),
1330
1332
],
1331
1333
);
1332
- case UserRole .standardUser:
1334
+ case UserRoles .standardUser:
1333
1335
return Column (
1334
1336
children: [
1335
1337
widget.buildIntField (
@@ -1391,7 +1393,7 @@ class _AdConfigFormState extends State<_AdConfigForm> {
1391
1393
),
1392
1394
],
1393
1395
);
1394
- case UserRole .premiumUser:
1396
+ case UserRoles .premiumUser:
1395
1397
return Column (
1396
1398
children: [
1397
1399
widget.buildIntField (
@@ -1450,7 +1452,9 @@ class _AdConfigFormState extends State<_AdConfigForm> {
1450
1452
),
1451
1453
],
1452
1454
);
1453
- case UserRole .admin:
1455
+ case UserRoles .admin:
1456
+ return const SizedBox .shrink ();
1457
+ default :
1454
1458
return const SizedBox .shrink ();
1455
1459
}
1456
1460
}
@@ -1464,7 +1468,7 @@ class _AccountActionConfigForm extends StatefulWidget {
1464
1468
required this .buildIntField,
1465
1469
});
1466
1470
1467
- final UserRole userRole;
1471
+ final String userRole;
1468
1472
final AppConfig appConfig;
1469
1473
final ValueChanged <AppConfig > onConfigChanged;
1470
1474
final Widget Function (
@@ -1553,7 +1557,7 @@ class _AccountActionConfigFormState extends State<_AccountActionConfigForm> {
1553
1557
final accountActionConfig = widget.appConfig.accountActionConfig;
1554
1558
1555
1559
switch (widget.userRole) {
1556
- case UserRole .guestUser:
1560
+ case UserRoles .guestUser:
1557
1561
return Column (
1558
1562
children: [
1559
1563
widget.buildIntField (
@@ -1576,7 +1580,7 @@ class _AccountActionConfigFormState extends State<_AccountActionConfigForm> {
1576
1580
),
1577
1581
],
1578
1582
);
1579
- case UserRole .standardUser:
1583
+ case UserRoles .standardUser:
1580
1584
return Column (
1581
1585
children: [
1582
1586
widget.buildIntField (
@@ -1599,8 +1603,10 @@ class _AccountActionConfigFormState extends State<_AccountActionConfigForm> {
1599
1603
),
1600
1604
],
1601
1605
);
1602
- case UserRole .premiumUser:
1603
- case UserRole .admin:
1606
+ case UserRoles .premiumUser:
1607
+ case UserRoles .admin:
1608
+ return const SizedBox .shrink ();
1609
+ default :
1604
1610
return const SizedBox .shrink ();
1605
1611
}
1606
1612
}
0 commit comments