Line data Source code
1 : // Copyright 2023 The terCAD team. All rights reserved.
2 : // Use of this source code is governed by a CC BY-NC-ND 4.0 license that can be found in the LICENSE file.
3 :
4 : import 'package:app_finance/_ext/build_context_ext.dart';
5 : import 'package:material_ui/material_ui.dart';
6 :
7 : class BackgroundWrapper extends StatelessWidget {
8 : final int index;
9 : final Widget child;
10 :
11 1 : const BackgroundWrapper({
12 : super.key,
13 : required this.index,
14 : required this.child,
15 : });
16 :
17 1 : @override
18 : Widget build(BuildContext context) {
19 1 : return Container(
20 6 : color: index % 2 == 0 ? context.colorScheme.onSurface.withValues(alpha: 0.015) : null,
21 1 : child: child,
22 : );
23 : }
24 : }
|