@@ -8,6 +8,7 @@ import 'dart:typed_data';
88import 'dart:ui' as ui;
99
1010import 'package:animation_metadata/animation_metadata.dart' ;
11+ import 'package:flutter/cupertino.dart' ;
1112import 'package:flutter/foundation.dart' ;
1213import 'package:flutter/gestures.dart' ;
1314import 'package:flutter/material.dart' ;
@@ -34,19 +35,41 @@ class _Diagram extends StatelessWidget {
3435
3536 @override
3637 Widget build (BuildContext context) {
37- return new MaterialApp (
38- debugShowCheckedModeBanner: false ,
39- home: new Material (
40- child: new Builder (
41- builder: (BuildContext context) {
42- return new Center (
43- child: new RepaintBoundary (
44- key: boundaryKey,
45- child: child,
46- ),
47- );
48- },
49- ),
38+ return Directionality (
39+ textDirection: TextDirection .ltr,
40+ child: Overlay (
41+ initialEntries: < OverlayEntry > [
42+ OverlayEntry (
43+ builder: (BuildContext context) {
44+ return Localizations (
45+ locale: const Locale ('en' , 'US' ),
46+ delegates: < LocalizationsDelegate <dynamic >> [
47+ DefaultWidgetsLocalizations .delegate,
48+ DefaultMaterialLocalizations .delegate,
49+ DefaultCupertinoLocalizations .delegate,
50+ ],
51+ child: Theme (
52+ data: ThemeData (),
53+ child: MediaQuery (
54+ data: MediaQueryData .fromWindow (WidgetsBinding .instance.window),
55+ child: new Material (
56+ child: new Builder (
57+ builder: (BuildContext context) {
58+ return new Center (
59+ child: new RepaintBoundary (
60+ key: boundaryKey,
61+ child: child,
62+ ),
63+ );
64+ },
65+ ),
66+ ),
67+ ),
68+ ),
69+ );
70+ }
71+ )
72+ ],
5073 ),
5174 );
5275 }
0 commit comments