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