Instantly share code, notes, and snippets.
Created
July 25, 2019 13:31
Flutter Web: How to Build a Google Search
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_web/material.dart'; | |
class GoogleMenuOptions extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
child: Padding( | |
padding: const EdgeInsets.only(top: 8.0, right: 8.0), | |
child: Row( | |
mainAxisAlignment: MainAxisAlignment.end, | |
children: <Widget>[ | |
Text( | |
"Gmail", | |
style: TextStyle( | |
fontSize: 15, | |
fontWeight: FontWeight.w300, | |
fontFamily: 'arial'), | |
), | |
Padding( | |
padding: const EdgeInsets.all(8.0), | |
child: Text("Images", | |
style: TextStyle( | |
fontSize: 15, | |
fontWeight: FontWeight.w300, | |
fontFamily: 'arial')), | |
), | |
Padding( | |
padding: const EdgeInsets.all(8.0), | |
child: Image.asset( | |
'images/menu1.png', | |
fit: BoxFit.cover, | |
height: 20, | |
width: 20, | |
), | |
), | |
Container( | |
margin: EdgeInsets.only(left: 10, right: 10, top: 13, bottom: 13), | |
child: RaisedButton( | |
elevation: 0.0, | |
color: Colors.blueAccent, | |
onPressed: () {}, | |
child: Text( | |
'Sign in', | |
style: TextStyle( | |
fontFamily: 'arial', | |
color: Colors.white, | |
fontSize: 15, | |
fontWeight: FontWeight.w500), | |
), | |
), | |
) | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment