animation fix
This commit is contained in:
parent
69afc51781
commit
7ac591172b
4 changed files with 5 additions and 2 deletions
Binary file not shown.
|
|
@ -157,6 +157,7 @@ class _CardGamePageState extends State<CardGamePage> {
|
|||
left: 10.0.w,
|
||||
right: 10.0.w,
|
||||
bottom: 10.0.h,
|
||||
top: 10.0.h,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
|
|
|
|||
|
|
@ -223,6 +223,7 @@ class _CardBuilder extends StatelessWidget {
|
|||
animation: a,
|
||||
builder: (context, child) => GameCardDecoration(
|
||||
alpha: a.value,
|
||||
borderColor: cardPack.color?.asColor,
|
||||
child: FrontCard(
|
||||
card,
|
||||
card.memoryImage!,
|
||||
|
|
|
|||
|
|
@ -200,8 +200,8 @@ class FrontCard extends StatelessWidget {
|
|||
if (constrains.maxHeight.isInfinite) {
|
||||
ar = 16 / 9;
|
||||
}
|
||||
final textScale = min(1.0, ar / targetTextAr) * alpha;
|
||||
final imageScale = min(1.0, pow(ar / targetImageAr, 1.5 * alpha));
|
||||
final textScale = min(1.0, ar / targetTextAr) * alpha * alpha;
|
||||
final imageScale = 0.9 * min(1.0, pow(ar / targetImageAr, 1.5 * alpha));
|
||||
return Material(
|
||||
borderOnForeground: false,
|
||||
type: MaterialType.transparency,
|
||||
|
|
@ -310,6 +310,7 @@ class FrontCard extends StatelessWidget {
|
|||
syncDuration: Duration.zero,
|
||||
),
|
||||
),
|
||||
if (card.mnemo?.isNotEmpty == true)
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
final sp = await SharedPreferences.getInstance();
|
||||
|
|
|
|||
Loading…
Reference in a new issue