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:flutter/material.dart'; 6 : 7 : class BackgroundWrapper extends StatelessWidget { 8 : final int index; 9 : final Widget child; 10 : 11 0 : const BackgroundWrapper({ 12 : super.key, 13 : required this.index, 14 : required this.child, 15 : }); 16 : 17 0 : @override 18 : Widget build(BuildContext context) { 19 0 : return Container( 20 0 : color: index % 2 == 0 ? context.colorScheme.onSurface.withOpacity(0.015) : null, 21 0 : child: child, 22 : ); 23 : } 24 : }