mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-21 21:58:46 -04:00
ui cleanup, new themes
This commit is contained in:
parent
94988718e8
commit
44fe198e5d
31 changed files with 1051 additions and 407 deletions
27
lib/theme/views/styled_scaffold.dart
Normal file
27
lib/theme/views/styled_scaffold.dart
Normal file
|
@ -0,0 +1,27 @@
|
|||
import 'package:awesome_extensions/awesome_extensions.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../theme.dart';
|
||||
|
||||
class StyledScaffold extends StatelessWidget {
|
||||
const StyledScaffold({required this.appBar, required this.body, super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final scale = theme.extension<ScaleScheme>()!;
|
||||
final scaleConfig = theme.extension<ScaleConfig>()!;
|
||||
|
||||
return clipBorder(
|
||||
clipEnabled: true,
|
||||
borderEnabled: scaleConfig.useVisualIndicators,
|
||||
borderRadius: 16 * scaleConfig.borderRadiusScale,
|
||||
borderColor: scale.primaryScale.border,
|
||||
child: Scaffold(appBar: appBar, body: body, key: key))
|
||||
.paddingAll(32);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
final PreferredSizeWidget? appBar;
|
||||
final Widget? body;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue