mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 20:13:50 +08:00
TextPaint to use TextStyle instead of TextPaintConfig (#1086)
* `TextPaint` to use `TextStyle` instead of `TextPaintConfig` * Update packages/flame/lib/src/text.dart Co-authored-by: Pasha Stetsenko <stpasha@google.com> * Removed BaseTextConfig and TextPaintConfig * Update text docs * Apply suggestions from code review Co-authored-by: Erick <erickzanardoo@gmail.com> * Remove generics * Update TextBoxExample * Update text examples variable names * Fix TextPaint in collision_detection example Co-authored-by: Pasha Stetsenko <stpasha@google.com> Co-authored-by: Erick <erickzanardoo@gmail.com>
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
import 'dart:ui';
|
||||
import 'dart:ui' hide TextStyle;
|
||||
|
||||
import 'package:flame/components.dart';
|
||||
import 'package:flame/game.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class LogoCompomnent extends SpriteComponent with HasGameRef<DebugGame> {
|
||||
static const int speed = 150;
|
||||
@ -35,9 +36,7 @@ class LogoCompomnent extends SpriteComponent with HasGameRef<DebugGame> {
|
||||
|
||||
class DebugGame extends FlameGame with FPSCounter {
|
||||
static final fpsTextPaint = TextPaint(
|
||||
config: const TextPaintConfig(
|
||||
color: Color(0xFFFFFFFF),
|
||||
),
|
||||
style: const TextStyle(color: Color(0xFFFFFFFF)),
|
||||
);
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user