Skip to content

Instantly share code, notes, and snippets.

@vital-edu
Last active January 18, 2023 08:08
Show Gist options
  • Save vital-edu/825104f44446432166803c0473ea4437 to your computer and use it in GitHub Desktop.
Save vital-edu/825104f44446432166803c0473ea4437 to your computer and use it in GitHub Desktop.
Flutter view with two big buttons

Flutter view with two big buttons

Created with <3 with dartpad.dev.

import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter view with two big buttons',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Home(),
);
}
}
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Title'),
),
body: Padding(
padding: const EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Expanded(
child: Padding(
padding: const EdgeInsets.all(12),
child: OutlinedButton(
onPressed: () {},
child: const Text('Button A'),
),
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(12),
child: OutlinedButton(
onPressed: () {},
child: const Text('Button B'),
),
),
)
],
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment