Last active
January 28, 2021 22:00
-
-
Save arn3la/4f30af99c6ee09cd27319b86c38fe7bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class HomePage extends StatelessWidget { | |
const HomePage({Key key, this.onPressed}) : super(key: key); | |
final VoidCallback onPressed; | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Center( | |
child: Column( | |
children: [ | |
Padding( | |
padding: EdgeInsets.symmetric(vertical: 50), | |
child: Text( | |
'Hello World!', | |
style: TextStyle(fontSize: 24), | |
), | |
), | |
Padding( | |
padding: EdgeInsets.symmetric(horizontal: 32), | |
child: ElevatedButton( | |
onPressed: () => onPressed?.call(), | |
style: ElevatedButton.styleFrom(primary: Colors.blue), | |
child: Row( | |
children: [ | |
Padding( | |
padding: EdgeInsets.fromLTRB(0, 8, 16, 8), | |
child: Icon( | |
Icons.wb_sunny, | |
key: Key('icon_weather'), | |
), | |
), | |
Text('Weather today'), | |
], | |
), | |
), | |
), | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment