mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-25 06:52:35 +01:00
chore: Streamline background gradients
This commit is contained in:
parent
b2d9986cd3
commit
277885a61e
@ -41,6 +41,22 @@ abstract class FluffyThemes {
|
|||||||
titleSmall: fallbackTextStyle,
|
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 Duration animationDuration = Duration(milliseconds: 250);
|
||||||
static const Curve animationCurve = Curves.easeInOut;
|
static const Curve animationCurve = Curves.easeInOut;
|
||||||
|
|
||||||
|
@ -146,7 +146,6 @@ class ChatView extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
final bottomSheetPadding = FluffyThemes.isColumnMode(context) ? 16.0 : 8.0;
|
final bottomSheetPadding = FluffyThemes.isColumnMode(context) ? 16.0 : 8.0;
|
||||||
final colorScheme = Theme.of(context).colorScheme;
|
|
||||||
|
|
||||||
return VWidgetGuard(
|
return VWidgetGuard(
|
||||||
onSystemPop: (redirector) async {
|
onSystemPop: (redirector) async {
|
||||||
@ -220,14 +219,9 @@ class ChatView extends StatelessWidget {
|
|||||||
else
|
else
|
||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient: LinearGradient(
|
gradient: FluffyThemes.backgroundGradient(
|
||||||
begin: Alignment.topCenter,
|
context,
|
||||||
colors: [
|
64,
|
||||||
colorScheme.primaryContainer.withAlpha(64),
|
|
||||||
colorScheme.secondaryContainer.withAlpha(64),
|
|
||||||
colorScheme.tertiaryContainer.withAlpha(64),
|
|
||||||
colorScheme.primaryContainer.withAlpha(64),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -48,18 +48,9 @@ class LoginScaffold extends StatelessWidget {
|
|||||||
: null,
|
: null,
|
||||||
);
|
);
|
||||||
if (isMobileMode) return scaffold;
|
if (isMobileMode) return scaffold;
|
||||||
final colorScheme = Theme.of(context).colorScheme;
|
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient: LinearGradient(
|
gradient: FluffyThemes.backgroundGradient(context, 156),
|
||||||
begin: Alignment.topCenter,
|
|
||||||
colors: [
|
|
||||||
colorScheme.primaryContainer.withAlpha(64),
|
|
||||||
colorScheme.secondaryContainer.withAlpha(64),
|
|
||||||
colorScheme.tertiaryContainer.withAlpha(64),
|
|
||||||
colorScheme.primaryContainer.withAlpha(64),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
|
Loading…
Reference in New Issue
Block a user