@@ -28,31 +28,26 @@ class BaseConfigView<T extends BaseConfigModel> extends StatelessWidget {
2828
2929 @override
3030 Widget build (BuildContext context) {
31- return Center (
32- child: config.modelOrProblem.match (
33- (FileConfigFileLoadProblem e) {
34- return const _OpenErrorDisplay (
35- "Simple View currently not available for this config, due to errors.\n "
36- "You can use Advanced Mode to fix them." ,
37- );
38- },
39- (T model) {
40- return ConstrainedBox (
41- constraints: const BoxConstraints (maxWidth: 1500 ),
42- child: switch (model) {
43- CoreConfigModel () => const CoreConfigView (),
44- StartupConfigModel () => const StartupConfigView (),
45- WebappConfigModel () => const WebappConfigView (),
46- WebserverConfigModel () => const WebserverConfigView (),
47- MapConfigModel () => const MapConfigView (),
48- _ => const _OpenErrorDisplay (
49- "Simple View currently not available for this config.\n "
50- "Please use Advanced Mode for this config." ,
51- ),
52- },
53- );
54- },
55- ),
31+ return config.modelOrProblem.match (
32+ (FileConfigFileLoadProblem e) {
33+ return const _OpenErrorDisplay (
34+ "Simple View currently not available for this config, due to errors.\n "
35+ "You can use Advanced Mode to fix them." ,
36+ );
37+ },
38+ (T model) {
39+ return switch (model) {
40+ CoreConfigModel () => const CoreConfigView (),
41+ StartupConfigModel () => const StartupConfigView (),
42+ WebappConfigModel () => const WebappConfigView (),
43+ WebserverConfigModel () => const WebserverConfigView (),
44+ MapConfigModel () => const MapConfigView (),
45+ _ => const _OpenErrorDisplay (
46+ "Simple View currently not available for this config.\n "
47+ "Please use Advanced Mode for this config." ,
48+ ),
49+ };
50+ },
5651 );
5752 }
5853}
0 commit comments