@@ -75,7 +75,11 @@ class _AndroidHelloPageState extends State<AndroidHelloPage> {
75
75
child: Observer (builder: (context) {
76
76
if (accountStore.now != null &&
77
77
(Platform .isIOS || Platform .isAndroid)) {
78
- return _buildScaffold (context);
78
+ return LayoutBuilder (builder: (context, constraint) {
79
+ if (constraint.maxHeight > constraint.maxWidth)
80
+ return _buildPadScafford (context, constraint);
81
+ return _buildScaffold (context);
82
+ });
79
83
}
80
84
return LoginPage ();
81
85
}),
@@ -116,6 +120,26 @@ class _AndroidHelloPageState extends State<AndroidHelloPage> {
116
120
);
117
121
}
118
122
123
+ Widget _buildPadScafford (BuildContext context, BoxConstraints constraint) {
124
+ double radio = constraint.maxHeight / constraint.maxWidth;
125
+ double width = radio * constraint.maxHeight;
126
+ return Stack (children: [
127
+ _buildScaffold (context),
128
+ Container (
129
+ width: width,
130
+ child: Navigator (
131
+ onGenerateRoute: (RouteSettings routeSettings) {
132
+ return PageRouteBuilder (pageBuilder: (BuildContext context,
133
+ Animation <double > animation,
134
+ Animation <double > secondaryAnimation) {
135
+ return Container ();
136
+ });
137
+ },
138
+ ),
139
+ )
140
+ ]);
141
+ }
142
+
119
143
Widget _buildPageContent (BuildContext context) {
120
144
return PageView .builder (
121
145
itemBuilder: (context, index) {
0 commit comments