Skip to content

Commit

Permalink
fix a large screen layout problem
Browse files Browse the repository at this point in the history
  • Loading branch information
kidozh committed Dec 1, 2024
1 parent 57e8db8 commit d640a49
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions lib/app/MainApp.dart
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,24 @@ class MainTwoPaneState extends State<MainTwoPaneStatefulWidget>
super.dispose();
}

@override
void initState() {

super.initState();
changeLayoutToMaterialIfInTablet();
}

Future<void> changeLayoutToMaterialIfInTablet() async{
if(isCupertino(context) && widget.type != TwoPaneType.smallScreen){
// change it to material despite the setting
// if(isCupertino(context))
Future.delayed(const Duration(seconds: 1), (){
PlatformProvider.of(context)?.changeToMaterialPlatform();
});

}
}

@override
Widget build(BuildContext context) {
var panePriority = TwoPanePriority.both;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.5.2+83
version: 1.5.3+84

environment:
sdk: ">=3.0.0 <4.0.0"
Expand Down

0 comments on commit d640a49

Please sign in to comment.