mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 14:07:59 -06:00
fix: Fix language and theme not updating in sliver components
This commit is contained in:
23
lib/core/widgets/material/search/colored_tab_bar.dart
Normal file
23
lib/core/widgets/material/search/colored_tab_bar.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ColoredTabBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
const ColoredTabBar({
|
||||
super.key,
|
||||
this.color,
|
||||
required this.tabBar,
|
||||
});
|
||||
|
||||
final TabBar tabBar;
|
||||
final Color? color;
|
||||
|
||||
@override
|
||||
Size get preferredSize => tabBar.preferredSize;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ColoredBox(
|
||||
color: color ?? Theme.of(context).colorScheme.background,
|
||||
child: tabBar,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user