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
pub points
82%
popularity

Publisher

unverified uploader

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