Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save naywin-programmer/c649d1617437365e02777f2791f1d92f to your computer and use it in GitHub Desktop.
Save naywin-programmer/c649d1617437365e02777f2791f1d92f to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
/// This Widget is the main application widget.
class MyApp extends StatelessWidget {
static const String _title = 'Flutter Code Sample';
@override
Widget build(BuildContext context) {
return MaterialApp(
title: _title,
home: Scaffold(
appBar: AppBar(title: const Text(_title)),
body: MyStatelessWidget(),
),
);
}
}
/// This is the stateless widget that the main application instantiates.
class MyStatelessWidget extends StatelessWidget {
MyStatelessWidget({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Center(
child: Stack(
children: <Widget>[
Card(
child: Padding(
padding: EdgeInsets.all(16.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
const ListTile(
leading: Icon(Icons.album),
title: Text('The Enchanted Nightingale'),
subtitle: Text('Music by Julie Gable. Lyrics by Sidney Stein.'),
),
],
),
),
),
Positioned(
bottom: -20,
child: RaisedButton(
onPressed: () {},
child: const Text(
'Get Coupon',
style: TextStyle(fontSize: 14)
),
),
),
],
alignment: AlignmentDirectional.bottomCenter,
overflow: Overflow.visible,
)
);
}
}
@naywin-programmer
Copy link
Author

Screen Shot 2020-08-07 at 23 00 07
Screen Shot 2020-08-07 at 22 59 54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment