[feat]: Refine category UI and card theming
adopted for florid theme
This commit is contained in:
@@ -121,9 +121,9 @@ class _CategoriesScreenState extends State<CategoriesScreen>
|
||||
padding: const EdgeInsets.all(16),
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
crossAxisSpacing: 12,
|
||||
mainAxisSpacing: 12,
|
||||
childAspectRatio: 2,
|
||||
crossAxisSpacing: 8,
|
||||
mainAxisSpacing: 8,
|
||||
childAspectRatio: 2.5,
|
||||
),
|
||||
itemCount: categories.length,
|
||||
itemBuilder: (context, index) {
|
||||
@@ -275,11 +275,11 @@ class _CategoryCard extends StatelessWidget {
|
||||
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
child: Card(
|
||||
margin: EdgeInsets.zero,
|
||||
elevation: 0,
|
||||
color: categoryColor.withOpacity(0.1),
|
||||
color: categoryColor.withValues(alpha: 0.2),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
child: Row(
|
||||
@@ -291,7 +291,6 @@ class _CategoryCard extends StatelessWidget {
|
||||
child: Text(
|
||||
category,
|
||||
style: theme.textTheme.titleSmall?.copyWith(
|
||||
// fontWeight: FontWeight.w600,
|
||||
color: theme.colorScheme.onSurface,
|
||||
),
|
||||
maxLines: 2,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:florid/providers/settings_provider.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
@@ -43,8 +44,11 @@ class _CategoryAppsScreenState extends State<CategoryAppsScreen> {
|
||||
appBar: AppBar(
|
||||
title: Consumer<AppProvider>(
|
||||
builder: (context, appProvider, child) {
|
||||
final settings = context.watch<SettingsProvider>();
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment: settings.themeStyle == ThemeStyle.florid
|
||||
? CrossAxisAlignment.center
|
||||
: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
widget.category,
|
||||
|
||||
@@ -60,7 +60,7 @@ class AppThemes {
|
||||
).surfaceContainer,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
side: BorderSide(width: 0),
|
||||
side: BorderSide(width: 0, style: BorderStyle.none),
|
||||
),
|
||||
),
|
||||
chipTheme: ChipThemeData(
|
||||
@@ -186,8 +186,15 @@ class AppThemes {
|
||||
).onPrimary,
|
||||
),
|
||||
cardTheme: CardThemeData(
|
||||
elevation: 1,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
elevation: 0,
|
||||
color: ColorScheme.fromSeed(
|
||||
seedColor: kAppColor,
|
||||
brightness: Brightness.dark,
|
||||
).surfaceContainer,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
side: BorderSide(width: 0, style: BorderStyle.none),
|
||||
),
|
||||
),
|
||||
chipTheme: ChipThemeData(
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
||||
|
||||
Reference in New Issue
Block a user