App Bar - Backdrop

 Backdrop



Add  Dependencies in Pubspec.yaml:
Open [ pubspec.yaml ]

Copy and Paste in pubspec.yaml 
backdrop: ^0.6.2

Click  [ Pub upgrade ]  :- Note ; Internet Connection Required




Source Code




import 'package:flutter/material.dart';
import 'package:backdrop/backdrop.dart';



void main() {
runApp( MaterialApp(
title:" Backdrop ",
home:Scaffold(appBar: AppBar(title: Text(' Backdrop ',),),
body: Material(
child: Center(
child:
BackdropExample()
,
),
) ,
),
));
}



class BackdropExample extends StatelessWidget {
const BackdropExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return BackdropScaffold(
appBar: BackdropAppBar(
title: const Text('Backdrop demo'),
),
// Height of front layer when backlayer is shown.
headerHeight: 120.0,
frontLayer: const Center(
child: Text(
'(front layer) \n Click top-right button to show back layer.\n\n'
"There's no flutter official backdrop widget, this demo uses the "
"'backdrop' package.")),
backLayer: const Center(child: Text('(back layer)')),
);
}
}




Comments