fixed broken albums on ipad
This commit is contained in:
parent
e15660bd92
commit
91bf374822
3 changed files with 60 additions and 14 deletions
31
.vscode/launch.json
vendored
31
.vscode/launch.json
vendored
|
@ -4,6 +4,7 @@
|
|||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
|
||||
{
|
||||
"name": "Android Prod",
|
||||
"request": "launch",
|
||||
|
@ -46,5 +47,35 @@
|
|||
"endpoint=http://localhost:8080",
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Tab",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"deviceId": "emulator-5554",
|
||||
"flutterMode": "debug",
|
||||
"program": "lib/main.dart",
|
||||
"args": [
|
||||
"--flavor",
|
||||
"independent"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Phone",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"deviceId": "emulator-5556",
|
||||
"flutterMode": "debug",
|
||||
"program": "lib/main.dart",
|
||||
"args": [
|
||||
"--flavor",
|
||||
"independent"
|
||||
]
|
||||
}
|
||||
],
|
||||
"compounds": [
|
||||
{
|
||||
"name": "Tab and Phone",
|
||||
"configurations": ["Tab", "Phone"]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -142,7 +142,7 @@ class _CollectionsGalleryWidgetState extends State<CollectionsGalleryWidget>
|
|||
);
|
||||
Size size = MediaQuery.of(context).size;
|
||||
int albumsCountInOneRow = max(size.width ~/ 220.0, 2);
|
||||
final double sideOfThumbnail = (size.width / 2) -
|
||||
final double sideOfThumbnail = (size.width / albumsCountInOneRow) -
|
||||
horizontalPaddingOfGridRow -
|
||||
((crossAxisSpacingOfGrid / 2) * (albumsCountInOneRow - 1));
|
||||
return SingleChildScrollView(
|
||||
|
@ -643,10 +643,16 @@ class CollectionItem extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const double horizontalPaddingOfGridRow = 16;
|
||||
const double crossAxisSpacingOfGrid = 5;
|
||||
Size size = MediaQuery.of(context).size;
|
||||
int albumsCountInOneRow = max(size.width ~/ 220.0, 2);
|
||||
double totalWhiteSpaceOfRow = (horizontalPaddingOfGridRow * 2) +
|
||||
(albumsCountInOneRow - 1) * crossAxisSpacingOfGrid;
|
||||
TextStyle albumTitleTextStyle =
|
||||
Theme.of(context).textTheme.subtitle1.copyWith(fontSize: 14);
|
||||
final double sideOfThumbnail =
|
||||
(MediaQuery.of(context).size.width / 2) - 18.5;
|
||||
final double sideOfThumbnail = (size.width / albumsCountInOneRow) -
|
||||
(totalWhiteSpaceOfRow / albumsCountInOneRow);
|
||||
return GestureDetector(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
|
|
@ -115,9 +115,10 @@ class _SharedCollectionGalleryState extends State<SharedCollectionGallery>
|
|||
const double crossAxisSpacingOfGrid = 5;
|
||||
Size size = MediaQuery.of(context).size;
|
||||
int albumsCountInOneRow = max(size.width ~/ 220.0, 2);
|
||||
final double sideOfThumbnail = (size.width / 2) -
|
||||
horizontalPaddingOfGridRow -
|
||||
((crossAxisSpacingOfGrid / 2) * (albumsCountInOneRow - 1));
|
||||
double totalWhiteSpaceOfRow = (horizontalPaddingOfGridRow * 2) +
|
||||
(albumsCountInOneRow - 1) * crossAxisSpacingOfGrid;
|
||||
final double sideOfThumbnail = (size.width / albumsCountInOneRow) -
|
||||
(totalWhiteSpaceOfRow / albumsCountInOneRow);
|
||||
return SingleChildScrollView(
|
||||
child: Container(
|
||||
margin: const EdgeInsets.only(bottom: 50),
|
||||
|
@ -391,10 +392,16 @@ class IncomingCollectionItem extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const double horizontalPaddingOfGridRow = 16;
|
||||
const double crossAxisSpacingOfGrid = 5;
|
||||
TextStyle albumTitleTextStyle =
|
||||
Theme.of(context).textTheme.subtitle1.copyWith(fontSize: 14);
|
||||
final double sideOfThumbnail =
|
||||
(MediaQuery.of(context).size.width / 2) - 18.5;
|
||||
Size size = MediaQuery.of(context).size;
|
||||
int albumsCountInOneRow = max(size.width ~/ 220.0, 2);
|
||||
double totalWhiteSpaceOfRow = (horizontalPaddingOfGridRow * 2) +
|
||||
(albumsCountInOneRow - 1) * crossAxisSpacingOfGrid;
|
||||
final double sideOfThumbnail = (size.width / albumsCountInOneRow) -
|
||||
(totalWhiteSpaceOfRow / albumsCountInOneRow);
|
||||
return GestureDetector(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
@ -451,14 +458,16 @@ class IncomingCollectionItem extends StatelessWidget {
|
|||
builder: (context, snapshot) {
|
||||
if (snapshot.hasData && snapshot.data > 0) {
|
||||
return RichText(
|
||||
text: TextSpan(
|
||||
style: albumTitleTextStyle.copyWith(
|
||||
color:
|
||||
albumTitleTextStyle.color.withOpacity(0.5)),
|
||||
children: [
|
||||
text: TextSpan(
|
||||
style: albumTitleTextStyle.copyWith(
|
||||
color: albumTitleTextStyle.color.withOpacity(0.5),
|
||||
),
|
||||
children: [
|
||||
TextSpan(text: " \u2022 "),
|
||||
TextSpan(text: snapshot.data.toString()),
|
||||
]));
|
||||
],
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue