mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
update flutter to 3.27.0 & update packages
This commit is contained in:
@@ -592,12 +592,16 @@ class _ReorderComicsPageState extends State<_ReorderComicsPage> {
|
||||
late var comics = LocalFavoritesManager().getAllComics(widget.name);
|
||||
bool changed = false;
|
||||
|
||||
Color lightenColor(Color color, double lightenValue) {
|
||||
int red = (color.red + ((255 - color.red) * lightenValue)).round();
|
||||
int green = (color.green + ((255 - color.green) * lightenValue)).round();
|
||||
int blue = (color.blue + ((255 - color.blue) * lightenValue)).round();
|
||||
static int _floatToInt8(double x) {
|
||||
return (x * 255.0).round() & 0xff;
|
||||
}
|
||||
|
||||
return Color.fromARGB(color.alpha, red, green, blue);
|
||||
Color lightenColor(Color color, double lightenValue) {
|
||||
int red = (_floatToInt8(color.r) + ((255 - color.r) * lightenValue)).round();
|
||||
int green = (_floatToInt8(color.g) * 255 + ((255 - color.g) * lightenValue)).round();
|
||||
int blue = (_floatToInt8(color.b) * 255 + ((255 - color.b) * lightenValue)).round();
|
||||
|
||||
return Color.fromARGB(_floatToInt8(color.a), red, green, blue);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -650,7 +654,7 @@ class _ReorderComicsPageState extends State<_ReorderComicsPage> {
|
||||
),
|
||||
],
|
||||
),
|
||||
body: ReorderableBuilder(
|
||||
body: ReorderableBuilder<FavoriteItem>(
|
||||
key: reorderWidgetKey,
|
||||
scrollController: _scrollController,
|
||||
longPressDelay: App.isDesktop
|
||||
@@ -659,14 +663,14 @@ class _ReorderComicsPageState extends State<_ReorderComicsPage> {
|
||||
onReorder: (reorderFunc) {
|
||||
changed = true;
|
||||
setState(() {
|
||||
comics = reorderFunc(comics) as List<FavoriteItem>;
|
||||
comics = reorderFunc(comics);
|
||||
});
|
||||
widget.onReorder(comics);
|
||||
},
|
||||
dragChildBoxDecoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
color: lightenColor(
|
||||
Theme.of(context).splashColor.withOpacity(1),
|
||||
Theme.of(context).splashColor.withAlpha(255),
|
||||
0.2,
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user