Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiagonevestia/cc457d10a8261f2c7c84f06d10952b83 to your computer and use it in GitHub Desktop.
Save tiagonevestia/cc457d10a8261f2c7c84f06d10952b83 to your computer and use it in GitHub Desktop.
Rectangular notched Fab
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
title: const Text('Notched Rectangular Fab'),
backgroundColor: Colors.indigo,
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: FloatingActionButton.extended(
backgroundColor: Colors.pink,
onPressed: () {},
icon: Icon(Icons.add),
label: Text("Add TODO")),
bottomNavigationBar: BottomAppBar(
color: Colors.indigo,
notchMargin: 6.0,
shape: AutomaticNotchedShape(
RoundedRectangleBorder(),
StadiumBorder(
side: BorderSide(),
),
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: new Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
IconButton(
icon: Icon(
Icons.person_outline,
color: Colors.white,
),
onPressed: () {},
),
IconButton(
icon: Icon(
Icons.info_outline,
color: Colors.white,
),
onPressed: () {},
),
],
),
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment