sliver_fab 1.0.0 copy "sliver_fab: ^1.0.0" to clipboard
sliver_fab: ^1.0.0 copied to clipboard

A wrapper widget allowing to place a widget on the edge of FlexibleSpacebar

example/lib/main.dart

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(),
                    ));
              },
            ),
          ],
        ),
      ),
    );
  }
}
77
likes
40
points
39
downloads

Publisher

unverified uploader

Weekly Downloads

A wrapper widget allowing to place a widget on the edge of FlexibleSpacebar

Repository (GitHub)
View/report issues

License

BSD-2-Clause (license)

Dependencies

flutter

More

Packages that depend on sliver_fab