This commit is contained in:
@@ -50,20 +50,12 @@ class _EditMountScreenState extends State<EditMountScreen>
|
||||
),
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: constants.padding),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(constants.borderRadius),
|
||||
child: MountSettingsWidget(
|
||||
mount: widget.mount,
|
||||
settings: jsonDecode(
|
||||
jsonEncode(widget.mount.mountConfig.settings),
|
||||
),
|
||||
settings: jsonDecode(jsonEncode(widget.mount.mountConfig.settings)),
|
||||
showAdvanced: _showAdvanced,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: constants.padding),
|
||||
],
|
||||
);
|
||||
|
@@ -29,10 +29,6 @@ class _EditSettingsScreenState extends State<EditSettingsScreen>
|
||||
showBack: true,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: constants.padding),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(constants.borderRadius),
|
||||
child: FutureBuilder<Map<String, dynamic>>(
|
||||
future: _grabSettings(),
|
||||
initialData: const <String, dynamic>{},
|
||||
@@ -49,8 +45,6 @@ class _EditSettingsScreenState extends State<EditSettingsScreen>
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: constants.padding),
|
||||
],
|
||||
);
|
||||
|
@@ -65,14 +65,7 @@ class _HomeScreeState extends State<HomeScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: constants.padding),
|
||||
child: const MountListWidget(),
|
||||
),
|
||||
),
|
||||
],
|
||||
children: [Expanded(child: const MountListWidget())],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -55,7 +55,9 @@ class AppDropdown<T> extends StatelessWidget {
|
||||
}
|
||||
|
||||
double? _computedMaxWidth(BuildContext context) {
|
||||
if (!constrainToIntrinsic) return maxWidth;
|
||||
if (!constrainToIntrinsic) {
|
||||
return maxWidth;
|
||||
}
|
||||
|
||||
final theme = Theme.of(context);
|
||||
final scheme = theme.colorScheme;
|
||||
@@ -129,11 +131,11 @@ class AppDropdown<T> extends StatelessWidget {
|
||||
validator: validator,
|
||||
);
|
||||
|
||||
final maxW = _computedMaxWidth(context);
|
||||
final wrapped = maxW == null
|
||||
final maxWidth = _computedMaxWidth(context);
|
||||
final wrapped = maxWidth == null
|
||||
? field
|
||||
: ConstrainedBox(
|
||||
constraints: BoxConstraints(maxWidth: maxW),
|
||||
constraints: BoxConstraints(maxWidth: maxWidth),
|
||||
child: field,
|
||||
);
|
||||
|
||||
|
33
web/repertory/lib/widgets/section_card.dart
Normal file
33
web/repertory/lib/widgets/section_card.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
// section_card.dart
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:repertory/constants.dart' as constants;
|
||||
|
||||
class SectionCard extends StatelessWidget {
|
||||
const SectionCard({super.key, required this.title, required this.child});
|
||||
final String title;
|
||||
final Widget child;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
return Card(
|
||||
elevation: 0,
|
||||
margin: const EdgeInsets.symmetric(vertical: constants.paddingSmall),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(constants.borderRadiusSmall),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(constants.padding),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(title, style: theme.textTheme.titleMedium),
|
||||
const SizedBox(height: constants.paddingSmall),
|
||||
child,
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user