mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 13:05:11 +00:00
chore: Streamline background gradients
This commit is contained in:
parent
780986340f
commit
303181b566
3 changed files with 20 additions and 19 deletions
|
@ -41,6 +41,22 @@ abstract class FluffyThemes {
|
|||
titleSmall: fallbackTextStyle,
|
||||
);
|
||||
|
||||
static LinearGradient backgroundGradient(
|
||||
BuildContext context,
|
||||
int alpha,
|
||||
) {
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
return LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
colors: [
|
||||
colorScheme.primaryContainer.withAlpha(alpha),
|
||||
colorScheme.secondaryContainer.withAlpha(alpha),
|
||||
colorScheme.tertiaryContainer.withAlpha(alpha),
|
||||
colorScheme.primaryContainer.withAlpha(alpha),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
static const Duration animationDuration = Duration(milliseconds: 250);
|
||||
static const Curve animationCurve = Curves.easeInOut;
|
||||
|
||||
|
|
|
@ -146,7 +146,6 @@ class ChatView extends StatelessWidget {
|
|||
);
|
||||
}
|
||||
final bottomSheetPadding = FluffyThemes.isColumnMode(context) ? 16.0 : 8.0;
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
|
||||
return VWidgetGuard(
|
||||
onSystemPop: (redirector) async {
|
||||
|
@ -220,14 +219,9 @@ class ChatView extends StatelessWidget {
|
|||
else
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
colors: [
|
||||
colorScheme.primaryContainer.withAlpha(64),
|
||||
colorScheme.secondaryContainer.withAlpha(64),
|
||||
colorScheme.tertiaryContainer.withAlpha(64),
|
||||
colorScheme.primaryContainer.withAlpha(64),
|
||||
],
|
||||
gradient: FluffyThemes.backgroundGradient(
|
||||
context,
|
||||
64,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -48,18 +48,9 @@ class LoginScaffold extends StatelessWidget {
|
|||
: null,
|
||||
);
|
||||
if (isMobileMode) return scaffold;
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
colors: [
|
||||
colorScheme.primaryContainer.withAlpha(64),
|
||||
colorScheme.secondaryContainer.withAlpha(64),
|
||||
colorScheme.tertiaryContainer.withAlpha(64),
|
||||
colorScheme.primaryContainer.withAlpha(64),
|
||||
],
|
||||
),
|
||||
gradient: FluffyThemes.backgroundGradient(context, 156),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
|
|
Loading…
Reference in a new issue