mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-09-01 15:04:08 +00:00
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
28 lines
962 B
Dart
28 lines
962 B
Dart
import 'dart:io';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:twonly/src/visual/themes/light.dart';
|
|
|
|
ThemeData getDarkTheme([Color primary = defaultPrimaryColor]) {
|
|
final base = ThemeData.dark().copyWith(
|
|
colorScheme: ColorScheme.fromSeed(
|
|
brightness: Brightness.dark,
|
|
seedColor: primary,
|
|
primary: primary,
|
|
surface: const Color.fromARGB(255, 20, 18, 23),
|
|
surfaceContainer: const Color.fromARGB(255, 45, 41, 54),
|
|
surfaceContainerLow: const Color.fromARGB(255, 38, 34, 45),
|
|
surfaceContainerHigh: const Color.fromARGB(255, 52, 48, 62),
|
|
),
|
|
inputDecorationTheme: const InputDecorationTheme(
|
|
border: OutlineInputBorder(),
|
|
),
|
|
);
|
|
return base.copyWith(
|
|
textTheme: base.textTheme.apply(
|
|
fontFamily: Platform.isAndroid ? 'sans-serif' : null,
|
|
fontFamilyFallback: Platform.isAndroid ? const ['NotoColorEmoji'] : null,
|
|
),
|
|
);
|
|
}
|
|
|
|
final ThemeData darkTheme = getDarkTheme();
|