Flutter SafeArea not working in iOS WebClips (web apps launched stand alone from Home Screen).
MediaQuery.paddingOf(context).bottom
returns zero in safari mode and in stand alone mode.
Flutter SafeArea not working in iOS WebClips (web apps launched stand alone from Home Screen).
MediaQuery.paddingOf(context).bottom
returns zero in safari mode and in stand alone mode.
Share Improve this question asked Feb 15 at 8:23 hodovhodov 693 silver badges7 bronze badges1 Answer
Reset to default 0cerealexx suggest a decision there, it works https://github/flutter/flutter/issues/84833
import 'package:universal_html/html.dart' as html;
// Check if it's an installed PWA
final isPwa = kIsWeb &&
html.window.matchMedia('(display-mode: standalone)').matches;
// Check if it's web iOS
final isWebiOS = kIsWeb &&
html.window.navigator.userAgent
.contains(RegExp(r'iPad|iPod|iPhone'));
// Use Container with color instead of Padding if you need to
return Padding(
padding: EdgeInsets.only(bottom: isPwa && isWebiOS ? 25 : 0),
child: YourApp(),
);