Adjust padding on carousel items

This commit is contained in:
Shawn 2022-12-22 13:37:22 -07:00
parent f7f75ff81f
commit c1c60ae56a
2 changed files with 2 additions and 3 deletions

View File

@ -8,14 +8,12 @@ class _CollapsingCarouselItem extends StatelessWidget {
required this.child, required this.child,
required this.indexOffset, required this.indexOffset,
required this.width, required this.width,
required this.bottom,
required this.onPressed, required this.onPressed,
required this.title}) required this.title})
: super(key: key); : super(key: key);
final Widget child; final Widget child;
final int indexOffset; final int indexOffset;
final double width; final double width;
final double bottom;
final VoidCallback onPressed; final VoidCallback onPressed;
final String title; final String title;
@override @override
@ -39,7 +37,7 @@ class _CollapsingCarouselItem extends StatelessWidget {
// Center item is portrait, the others are square // Center item is portrait, the others are square
height: indexOffset == 0 ? tallHeight : width, height: indexOffset == 0 ? tallHeight : width,
width: width, width: width,
padding: indexOffset == 0 ? EdgeInsets.all(0) : EdgeInsets.all(30), padding: indexOffset == 0 ? EdgeInsets.all(0) : EdgeInsets.all(width * .1),
child: child, child: child,
), ),
), ),

View File

@ -1,5 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:wonders/common_libs.dart'; import 'package:wonders/common_libs.dart';
import 'package:wonders/logic/collectibles_logic.dart'; import 'package:wonders/logic/collectibles_logic.dart';
import 'package:wonders/logic/data/collectible_data.dart'; import 'package:wonders/logic/data/collectible_data.dart';