mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-04 00:59:50 +08:00
18
lib/common/widgets/reorder_mixin.dart
Normal file
18
lib/common/widgets/reorder_mixin.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
mixin ReorderMixin<T extends StatefulWidget> on State<T> {
|
||||
late ColorScheme scheme;
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
scheme = ColorScheme.of(context);
|
||||
}
|
||||
|
||||
Widget proxyDecorator(Widget child, _, _) {
|
||||
return ColoredBox(
|
||||
color: scheme.onInverseSurface,
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user