mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-09 08:08:14 -06:00
Added translations, fixed chips theming
This commit is contained in:
23
lib/core/workarounds/colored_chip.dart
Normal file
23
lib/core/workarounds/colored_chip.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ColoredChipWrapper extends StatelessWidget {
|
||||
final Color? backgroundColor;
|
||||
final Widget child;
|
||||
const ColoredChipWrapper({
|
||||
super.key,
|
||||
this.backgroundColor,
|
||||
required this.child,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Color color = backgroundColor ?? Colors.lightGreen[50]!;
|
||||
|
||||
return Theme(
|
||||
data: Theme.of(context).copyWith(
|
||||
canvasColor: color,
|
||||
),
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user