sliver_fab 1.0.0 sliver_fab: ^1.0.0 copied to clipboard
A wrapper widget allowing to place a widget on the edge of FlexibleSpacebar
import './exampleOneScreen.dart';
import './exampleTwoScreen.dart';
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Sliver Fab Example',
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: new MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: AppBar(
title: Text("Examples"),
),
body: Center(
child: Column(
children: <Widget>[
Padding(
padding: EdgeInsets.all(16),
child: RaisedButton(
child: Text("Example 1"),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ExampleOneScreen(),
));
},
),
),
RaisedButton(
child: Text("Example 2"),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ExampleTwoScreen(),
));
},
),
],
),
),
);
}
}