Skip to content

Instantly share code, notes, and snippets.

@Wizpna Wizpna/main.dart
Created Jul 25, 2019

Embed
What would you like to do?
Flutter Web: How to Build a Google Search
import 'package:flutter_web/material.dart';
import 'footerOptions.dart';
import 'googleMenuOptions.dart';
import 'googleSearch.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: MyHomePage(),
theme: ThemeData(
primaryColor: Colors.black,
),
title: 'Google',
);
}
}
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: Column(
children: [
//A Flexible widget controls how a child of a Row, Column, or Flex flexes.
//I gave
Flexible(
flex: 1,
child: GoogleMenuOptions(),
),
Flexible(
flex: 8,
child: GoogleSearch(),
),
Flexible(
flex: 1,
child: FooterOptions(),
),
],
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.