mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-05-25 05:42:11 +00:00
fix new emoji not shown
This commit is contained in:
parent
805d7a66b3
commit
7283852ba5
7 changed files with 62 additions and 22 deletions
BIN
assets/fonts/NotoColorEmoji.ttf
Normal file
BIN
assets/fonts/NotoColorEmoji.ttf
Normal file
Binary file not shown.
|
|
@ -53,8 +53,12 @@ class EmojiPickerBottom extends StatelessWidget {
|
|||
config: Config(
|
||||
height: 400,
|
||||
locale: Localizations.localeOf(context),
|
||||
checkPlatformCompatibility: false,
|
||||
emojiTextStyle: TextStyle(
|
||||
fontSize: 24 * (Platform.isIOS ? 1.2 : 1),
|
||||
fontFamilyFallback: Platform.isAndroid
|
||||
? const ['NotoColorEmoji']
|
||||
: null,
|
||||
),
|
||||
emojiViewConfig: EmojiViewConfig(
|
||||
backgroundColor: context.color.surfaceContainer,
|
||||
|
|
|
|||
|
|
@ -1,15 +1,24 @@
|
|||
import 'dart:io';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
final ThemeData darkTheme = ThemeData.dark().copyWith(
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
brightness: Brightness.dark,
|
||||
seedColor: const Color(0xFF57CC99),
|
||||
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(),
|
||||
),
|
||||
);
|
||||
final ThemeData darkTheme = () {
|
||||
final base = ThemeData.dark().copyWith(
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
brightness: Brightness.dark,
|
||||
seedColor: const Color(0xFF57CC99),
|
||||
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,
|
||||
),
|
||||
);
|
||||
}();
|
||||
|
|
|
|||
|
|
@ -1,16 +1,25 @@
|
|||
import 'dart:io';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:twonly/src/utils/misc.dart';
|
||||
|
||||
const primaryColor = Color(0xFF57CC99);
|
||||
|
||||
final ThemeData lightTheme = ThemeData(
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: primaryColor,
|
||||
),
|
||||
inputDecorationTheme: const InputDecorationTheme(
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
);
|
||||
final ThemeData lightTheme = () {
|
||||
final base = ThemeData(
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: primaryColor,
|
||||
),
|
||||
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 ButtonStyle primaryColorButtonStyle = FilledButton.styleFrom(
|
||||
backgroundColor: primaryColor,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import 'dart:io';
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -242,7 +243,13 @@ class _ScreenshotEmojiState extends State<ScreenshotEmoji> {
|
|||
key: _boundaryKey,
|
||||
child: Text(
|
||||
widget.emoji,
|
||||
style: const TextStyle(fontSize: 94),
|
||||
style: TextStyle(
|
||||
fontSize: 94,
|
||||
fontFamily: Platform.isAndroid ? 'sans-serif' : null,
|
||||
fontFamilyFallback: Platform.isAndroid
|
||||
? const ['NotoColorEmoji']
|
||||
: null,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -305,6 +306,10 @@ class _ParticlePainter extends CustomPainter {
|
|||
style: TextStyle(
|
||||
fontSize: 24 * p.currentScale,
|
||||
color: Colors.black.withValues(alpha: p.opacity),
|
||||
fontFamily: Platform.isAndroid ? 'sans-serif' : null,
|
||||
fontFamilyFallback: Platform.isAndroid
|
||||
? const ['NotoColorEmoji']
|
||||
: null,
|
||||
),
|
||||
);
|
||||
textPainter
|
||||
|
|
|
|||
|
|
@ -212,3 +212,9 @@ flutter:
|
|||
- assets/passwords/
|
||||
- CHANGELOG.md
|
||||
|
||||
fonts:
|
||||
- family: NotoColorEmoji
|
||||
fonts:
|
||||
- asset: assets/fonts/NotoColorEmoji.ttf
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue