SwipeJobs/lib/theme/gradient_scaffold.dart
2025-06-19 13:26:25 +02:00

42 lines
1.1 KiB
Dart

import 'package:flutter/material.dart';
import 'app_theme.dart';
class GradientScaffold extends StatelessWidget {
final PreferredSizeWidget? appBar;
final Widget? body;
final Widget? drawer;
final Widget? floatingActionButton;
final FloatingActionButtonLocation? floatingActionButtonLocation;
const GradientScaffold({
super.key,
this.appBar,
this.body,
this.drawer,
this.floatingActionButton,
this.floatingActionButtonLocation,
});
@override
Widget build(BuildContext context) {
return Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [AppTheme.gradientStart, AppTheme.gradientEnd],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
tileMode: TileMode.clamp,
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: appBar,
drawer: drawer,
body: body,
floatingActionButton: floatingActionButton,
floatingActionButtonLocation: floatingActionButtonLocation,
),
);
}
}