Thank you @specialk .
I guess you can’t open my website because China blocked.
Here’s the code:
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
Future main() async {
// set preferred orientations (landscape only)
await SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
]);
// disable all UI overlays (show fullscreen)
await SystemChrome.setEnabledSystemUIOverlays([]);
}
// start app
runApp(
Directionality(
textDirection: TextDirection.ltr,
child: Stack(
children: [
// placeholder for game
Container(
color: Color(0xff27ae60),
),
// joypad overlay
Container(),
],
),
),
);
the html:
<div class="code-toolbar"><pre class="wp-block-prismatic-blocks language-dart"><code class=" language-dart">import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
Future main() async {
// set preferred orientations (landscape only)
await SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
]);
// disable all UI overlays (show fullscreen)
await SystemChrome.setEnabledSystemUIOverlays([]);
}
// start app
runApp(
Directionality(
textDirection: TextDirection.ltr,
child: Stack(
children: [
// placeholder for game
Container(
color: Color(0xff27ae60),
),
// joypad overlay
Container(),
],
),
),
);</code></pre><div class="toolbar"><div class="toolbar-item"><span>Dart</span></div></div></div>
I noticed: using dart language will not be separated by “<span>”
Thank you.