notes page finished, messing with theme and navbar things

This commit is contained in:
Kima
2024-03-04 22:58:34 +01:00
parent e6fc1fd656
commit 7363fc81cb
8 changed files with 425 additions and 40 deletions

View File

@@ -0,0 +1,22 @@
import 'package:flutter/material.dart';
class ColorsUtils {
Color darken(Color color, {double amount = .1}) {
assert(amount >= 0 && amount <= 1);
final hsl = HSLColor.fromColor(color);
final hslDark = hsl.withLightness((hsl.lightness - amount).clamp(0.0, 1.0));
return hslDark.toColor();
}
Color lighten(Color color, {double amount = .1}) {
assert(amount >= 0 && amount <= 1);
final hsl = HSLColor.fromColor(color);
final hslLight =
hsl.withLightness((hsl.lightness + amount).clamp(0.0, 1.0));
return hslLight.toColor();
}
}