chore: Adjust styles and animations
This commit is contained in:
parent
5c88133691
commit
9724b852bb
5 changed files with 644 additions and 749 deletions
|
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
|||
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/config/setting_keys.dart';
|
||||
import 'package:fluffychat/utils/account_config.dart';
|
||||
import 'package:fluffychat/utils/file_selector.dart';
|
||||
|
|
@ -111,32 +110,6 @@ class SettingsStyleController extends State<SettingsStyle> {
|
|||
ThemeMode get currentTheme => ThemeController.of(context).themeMode;
|
||||
Color? get currentColor => ThemeController.of(context).primaryColor;
|
||||
|
||||
static final List<Color?> customColors = [
|
||||
null,
|
||||
AppConfig.chatColor,
|
||||
Colors.indigo,
|
||||
Colors.blue,
|
||||
Colors.blueAccent,
|
||||
Colors.teal,
|
||||
Colors.tealAccent,
|
||||
Colors.green,
|
||||
Colors.greenAccent,
|
||||
Colors.yellow,
|
||||
Colors.yellowAccent,
|
||||
Colors.orange,
|
||||
Colors.orangeAccent,
|
||||
Colors.red,
|
||||
Colors.redAccent,
|
||||
Colors.pink,
|
||||
Colors.pinkAccent,
|
||||
Colors.purple,
|
||||
Colors.purpleAccent,
|
||||
Colors.blueGrey,
|
||||
Colors.grey,
|
||||
Colors.white,
|
||||
Colors.black,
|
||||
];
|
||||
|
||||
void switchTheme(ThemeMode? newTheme) {
|
||||
if (newTheme == null) return;
|
||||
switch (newTheme) {
|
||||
|
|
|
|||
|
|
@ -82,14 +82,13 @@ class SettingsStyleView extends StatelessWidget {
|
|||
Theme.of(context).brightness == Brightness.light
|
||||
? light?.primary
|
||||
: dark?.primary;
|
||||
final colors = List<Color?>.from(
|
||||
SettingsStyleController.customColors,
|
||||
);
|
||||
final colors = [null, AppConfig.chatColor, ...Colors.primaries];
|
||||
if (systemColor == null) {
|
||||
colors.remove(null);
|
||||
}
|
||||
return GridView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||
maxCrossAxisExtent: 64,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue