Answers for "flutter snap to bottom of screen"

0

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),
          ),
        )),
      ),
    );
  }
}
Posted by: Guest on April-20-2022

Code answers related to "flutter snap to bottom of screen"

Browse Popular Code Answers by Language