flutter snap to bottom of screen
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
onClick() {
print('Button Clicked');
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Place Widget at Bottom of Screen'),
),
body: Center(
child: Align(
alignment: Alignment.bottomCenter,
child: RaisedButton(
onPressed: () => onClick(),
child: const Text('Sample Button'),
textColor: Colors.white,
color: Colors.green,
padding: const EdgeInsets.fromLTRB(10, 10, 10, 10),
),
)),
),
);
}
}