mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-01 10:38:17 +08:00
todo, fullscreen
This commit is contained in:
@ -1,12 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'dart:ui' as ui show TextStyle;
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
class Util {
|
||||
Future<Size> initialDimensions() async {
|
||||
// https://github.com/flutter/flutter/issues/5259
|
||||
@ -29,13 +28,21 @@ class Util {
|
||||
new _CustomBinder();
|
||||
}
|
||||
|
||||
Paragraph text(String text, { double fontSize = 24.0, Color color = Colors.white, fontFamily: 'Arial', double maxWidth = 180.0 }) {
|
||||
void fullScreen() {
|
||||
SystemChrome.setEnabledSystemUIOverlays([]);
|
||||
}
|
||||
|
||||
Paragraph text(String text,
|
||||
{double fontSize = 24.0,
|
||||
Color color = Colors.white,
|
||||
fontFamily: 'Arial',
|
||||
double maxWidth = 180.0}) {
|
||||
ParagraphBuilder paragraph = new ParagraphBuilder(new ParagraphStyle());
|
||||
paragraph.pushStyle(new ui.TextStyle(color: color, fontSize: fontSize, fontFamily: fontFamily));
|
||||
paragraph.pushStyle(new ui.TextStyle(
|
||||
color: color, fontSize: fontSize, fontFamily: fontFamily));
|
||||
paragraph.addText(text);
|
||||
return paragraph.build()..layout(new ParagraphConstraints(width: maxWidth));
|
||||
}
|
||||
}
|
||||
|
||||
class _CustomBinder extends BindingBase with ServicesBinding {
|
||||
}
|
||||
class _CustomBinder extends BindingBase with ServicesBinding {}
|
||||
|
||||
Reference in New Issue
Block a user