Files
clide/lib/widgets/src/clide_surface.dart
T
jpmschweitzerandClaude Opus 4.6 46329700d5 dissolve app/ into repo root (D-056)
Single Flutter package at the repo root. All code, tests, assets,
and platform directories moved from app/ to root. Package renamed
from clide_app to clide — all imports rewritten. Merged pubspec
combines core (ffi) and app (flutter, yaml, xterm) dependencies.
Makefile simplified: no APP_PRESENT conditionals, no cd, no daemon
lifecycle. 317 tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 00:37:20 +02:00

43 lines
1.1 KiB
Dart

import 'package:clide/kernel/src/theme/controller.dart';
import 'package:flutter/widgets.dart';
/// Themed container. Replaces Material's Card / Scaffold body surfaces
/// for clide widgets — pulls color, border, and padding from the
/// current theme's surface tokens.
class ClideSurface extends StatelessWidget {
const ClideSurface({
super.key,
this.child,
this.color,
this.border,
this.padding = EdgeInsets.zero,
this.width,
this.height,
this.borderRadius,
});
final Widget? child;
final Color? color;
final Color? border;
final EdgeInsetsGeometry padding;
final double? width;
final double? height;
final BorderRadius? borderRadius;
@override
Widget build(BuildContext context) {
final tokens = ClideTheme.of(context).surface;
return Container(
width: width,
height: height,
padding: padding,
decoration: BoxDecoration(
color: color ?? tokens.panelBackground,
border: border == null ? null : Border.all(color: border!, width: 1),
borderRadius: borderRadius,
),
child: child,
);
}
}