Skip to content

Instantly share code, notes, and snippets.

@horgag1
Created October 2, 2018 13:45
Show Gist options
  • Save horgag1/ea7f673e60b8216066b8fd3af5b66525 to your computer and use it in GitHub Desktop.
Save horgag1/ea7f673e60b8216066b8fd3af5b66525 to your computer and use it in GitHub Desktop.
Rounded button ... suitable for login button on home page
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Title',
home: LoginButt(),
);
}
}
class LoginButt extends StatelessWidget{
@override
Widget build(BuildContext context) {
return Container(
width: MediaQuery.of(context).size.width,
margin: const EdgeInsets.only(left: 30.0, right: 30.0, top: 150.0),
alignment: Alignment.center,
child: Row(
children: <Widget>[
Expanded(
child: OutlineButton(
color: Colors.red,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30.0)
),
onPressed: null),
),
]),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment