info: split metadata according to width, regardless of orientation
This commit is contained in:
parent
0f015f5702
commit
7a068b226b
1 changed files with 1 additions and 3 deletions
|
@ -46,9 +46,7 @@ class MetadataSectionState extends State<MetadataSection> {
|
||||||
final directoryNames = metadataMap.keys.toList()..sort();
|
final directoryNames = metadataMap.keys.toList()..sort();
|
||||||
|
|
||||||
Widget content;
|
Widget content;
|
||||||
// use MediaQuery instead of unreliable OrientationBuilder
|
if (MediaQuery.of(context).size.width > 400) {
|
||||||
final orientation = MediaQuery.of(context).orientation;
|
|
||||||
if (orientation == Orientation.landscape) {
|
|
||||||
final threshold = (2 * directoryNames.length + directoryNames.map((k) => metadataMap[k].length).reduce((v, e) => v + e)) / 2;
|
final threshold = (2 * directoryNames.length + directoryNames.map((k) => metadataMap[k].length).reduce((v, e) => v + e)) / 2;
|
||||||
final first = <String>[], second = <String>[];
|
final first = <String>[], second = <String>[];
|
||||||
var processed = 0;
|
var processed = 0;
|
||||||
|
|
Loading…
Reference in a new issue