backdrop 0.0.8 backdrop: ^0.0.8 copied to clipboard
Backdrop implementaion in dart. (https://material.io/design/components/backdrop.html)
import 'package:backdrop/backdrop.dart';
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Backdrop Demo',
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: new MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key}) : super(key: key);
@override
_MyHomePageState createState() => new _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage>
with SingleTickerProviderStateMixin {
AnimationController controller;
@override
void initState() {
super.initState();
controller = AnimationController(
vsync: this, duration: Duration(milliseconds: 100), value: 1.0);
}
@override
void dispose() {
super.dispose();
controller.dispose();
}
@override
Widget build(BuildContext context) {
return BackdropScaffold(
controller: controller,
title: Text("Backdrop Example"),
backpanel: Center(
child: Text("Backpanel"),
),
body: Center(
child: Text("Body"),
),
);
}
}