fixed style bug and added reveal check to buttons

This commit is contained in:
kima 2023-06-23 01:17:26 +02:00
parent fa8be89aaf
commit acdd47a49a

View File

@ -80,43 +80,46 @@ class _PersonalityBodyState extends State<PersonalityBody> {
: CrossFadeState.showSecond, : CrossFadeState.showSecond,
), ),
const SizedBox(height: 40), const SizedBox(height: 40),
Center( if (isRevealed)
child: Row( Center(
children: [ child: Row(
IconButton( mainAxisAlignment: MainAxisAlignment.center,
onPressed: () async { crossAxisAlignment: CrossAxisAlignment.center,
await sharePersonality(); children: [
}, IconButton(
icon: const Icon( onPressed: () async {
FeatherIcons.share, await sharePersonality();
color: Colors.white, },
size: 30, icon: const Icon(
FeatherIcons.share,
color: Colors.white,
size: 30,
),
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(
Colors.white.withOpacity(0.2)),
),
), ),
style: ButtonStyle( const SizedBox(
backgroundColor: MaterialStateProperty.all( width: 10,
Colors.white.withOpacity(0.2)),
), ),
), IconButton(
const SizedBox( onPressed: () async {
width: 10, await savePersonality();
), },
IconButton( icon: const Icon(
onPressed: () async { FeatherIcons.bookmark,
await savePersonality(); color: Colors.white,
}, size: 30,
icon: const Icon( ),
FeatherIcons.bookmark, style: ButtonStyle(
color: Colors.white, backgroundColor: MaterialStateProperty.all(
size: 30, Colors.white.withOpacity(0.2)),
),
), ),
style: ButtonStyle( ],
backgroundColor: MaterialStateProperty.all( ),
Colors.white.withOpacity(0.2)),
),
),
],
), ),
),
const SizedBox(height: 60), const SizedBox(height: 60),
]); ]);
} }