Skip to content

Instantly share code, notes, and snippets.

@Wizpna
Created July 25, 2019 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wizpna/57ffd6335d1f248469106cb419da3c12 to your computer and use it in GitHub Desktop.
Save Wizpna/57ffd6335d1f248469106cb419da3c12 to your computer and use it in GitHub Desktop.
Flutter Web: How to Build a Google Search
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