This is the slide, "Supporting Large Screen on Flutter" on potatotips 84. #flutter #flutterjp #potatotips
2023.09.26Kenichi Kambara (@korodroid)potatotips #84Supporting Large Screen on Flutter
View Slide
About me•Mobile App Development•Speeches (e.g. 15 Int’l/100+ Domestic)•Writings (e.g. 8 Dev Books)•[Official] Evangelist at NTT TechnoCross•[Private] iplatform.orgKenichi Kambara (@korodroid)
About my Flutter product (Private works)Sekaiphone Pro(Flutter/Kotlin/Swift) MyToDo(Flutter)
My Motivation+ = 2 Pane6OEFSEFWFMPQNFOU
Providing better UI for Large Screen on Flutterhttps://learn.microsoft.com/en-us/dual-screen/flutter/mediaquery
Solution1. Using MediaQuery API2. Another approach
1. Using MediaQuery APIvar isTwoPane = MediaQuery.of(context).size.width >= 600;body: isTwoPane ? twoPaneWidget(): onePaneWidget(),
2. Another approachhttps://pub.dev/packages/dual_screen
2. Using TwoPane Widgetbody: TwoPane(startPane: mainWidget(),endPane: sideWidget(),paneProportion: 0.3,panePriority:isTwoPane ? TwoPanePriority.both : TwoPanePriority.start,),var isTwoPane = MediaQuery.of(context).size.width >= 600;
Screenshot
This package also supportsimport 'package:dual_screen/dual_screen.dart';DualScreenInfo.hingeAngleEvents.listen((double hingeAngle) {print(hingeAngle);});DualScreenInfo.hasHingeAngleSensor.then((bool hasHingeSensor) {print(hasHingeSensor);});https://pub.dev/packages/dual_screen#hinge-angle-sensor
Happy Coding for Large/Daul/Foldable with MediaQuery API, Useful packagesConclusion
Please let me know if you have any requests such as technical speeches, technical writings and so on.Facebook:http://fb.com/kanbara.kenichiX:@korodroidLinkedIn:http://www.linkedin.com/in/korodroidThank you so much