I want to dynamically hide and show App Bar on DoubleTap on Container with some animation on hiding, but the solution from this link doesn't work for my project: Flutter - How can I dynamically show or hide App Bars on pages
Image of the app:
Code:
import 'package:flutter/material.dart';
class GeneratedCouponScreen extends StatelessWidget {
bool ShowAppBar = true;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: ShowAppBar ? AppBar(
title: Text('Makdolan Flutter'),
) : null ,
backgroundColor: Colors.white,
body: GestureDetector(
onDoubleTap: () {
ShowAppBar = false;
},
child: Container(
padding: EdgeInsets.all(16.0),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('DATA WYDANIA:', style: TextStyle(color: Colors.black),),
Text('10/09/2019', style: TextStyle(color: Colors.black))
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('UNIKALNY KOD:', style: TextStyle(color: Colors.black)),
Text('e-86-tC-9', style: TextStyle(color: Colors.black))
],
)
],
),
Column(
children: [
SizedBox(height: 8.0),
Image.asset('assets/images/coupon_hamburger.png',)
],
)
],
)
),
));
}
}